Windows Management Instrumentation (WMI) is a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components can provide information and notification. WMI is Microsoft’s implementation of the Web-Based Enterprise Management (WBEM) Standard from the Distributed Management Task Force (DMTF).
WMI allows scripting languages like VBScript to manage Microsoft Windows personal computers and servers, both locally and remotely. WMI is preinstalled in Windows Server 2003, Windows XP, Windows Me, and Windows 2000.
Microsoft also provides a command line interface to WMI called Windows Management Instrumentation Command-line (WMIC).
Some usefull commands when using WMIC:
wmic process [pid] delete
The rough equivalent (for you UNIX/Linux minded folks) of “kill -9 [pid]“
wmic process where name='cmd.exe' delete
It functions something like “killall -9 cmd.exe” would on a Linux box, where killall lets you kill processes by name.
wmic process list brief /every:1
Sort of like (but not exactly) the Linux/UNIX top command.
wmic useraccount
This one gives a lot more detail than the old “net user” command. With “wmic useraccount” you get user
names, SIDs, and various security settings.
wmic qfe
This one shows all hotfixes and service packs. QFE stands for Quick Fix Engineering.
wmic startup list full
This shows a whole bunch of stuff useful in malware analysis, including all files loaded at Startup and the
reg keys associated with autostart.
wmic process list brief | find "cmd.exe"
That works a little like a Linux “ps -aux | grep cmd.exe”.
wmic /record:test.xml process list brief
You can use the /record option in WMIC to record the WMIC commands you typed, their output, and a timestamp.
After the command runs, your results are stored in xml format. That’s the only format supported, but this
is a handy record of what you typed, when you typed it, and the results you got. The only down side, though,
is that it will overwrite a previous test.xml, rather than append to it. Still, not bad, as long as you make
sure to use different names for your record files.
Network interface configuration options offered by WMIC:
wmic nicconfig where IPEnabled='true'
That’ll give you a list of IP interfaces.
wmic nicconfig where Index=1 call EnableStatic ("10.10.10.10"), ("255.255.255.0")
To change the IP address at the command line
wmic nicconfig where Index=1 call EnableDHCP
Do this for DHCP, where the index is the number of the interface you get from that first nicconfig
command I put in this update.
1. Telnet into Exchange server hosting IMS service using TCP port 25. Command is telnet <servername> 25
2. Turn on local echo on your telnet client so that you can see what you are typing. On Win 9x and NT 3.5/4.0 Telnet client this done by selecting the “preferences” from the “terminal” pull down menu, and checking the local echo radio button. For Windows 2000 telnet client, issue command “set local_echo”, from the telnet command prompt.
3. Issue the following smtp command sequence
helo <your domain name><enter>
response should be as follows
250 OK
mail from: <your Email Address><enter> response should be as follows
250 OK - mail from <your Email address>
rcpt to: <recipient address><enter> response should be as follows
250 OK - Recipient <recipient address>
data<enter> response should be as follows
354 Send data. End with CRLF.CRLF
To: <recipient’s display name><enter>
From: <your display name><enter>
Subject: <Subject field of Email message><enter>
<Enter you body text><enter><enter> . <enter> response should be as follows
250 OK
My friend used to borrow my memory stick and I thought to trick him for fun. I created a fake folder (actually its just a file with 3 lines of code) called “my secrets” and saved on my memory stick. When returning back the memory stick he asked me “hey! how did you lock the folder?”, and I asked him to visit my website. :p
So, Do you also want to fool or test your mates? Follow the steps below:
Open notepad (Click start > Run > type Notepad.exe)
Copy the following code to Notepad [Shell]
Command=2
IconFile=explorer.exe,3
Save the file as “my secrets.scf” (with quotes, this is to prevent Notepad from appending .txt extension)
Simply copy and paste the following code into the root htaccess file of your site to enjoy a serious reduction in wasted bandwidth, stolen resources, and comment spam.
If you want to create a table without using your mouse and menus; try the following:
- Open MS Word - Type, +—–+—–+——+——-+ - Press Enter
You will see a table with 4 cells. You can create as many cells you want. for each cell type +——+ . Also if you want to make different size of cells you could try; +—–+———–+—–+—————+
If you are writing a program to send a mail with an attachment, then you might come across the problem with some random ATTXXXXX.dat file. if you you don’t attach a file with the email, then by default ASP.NET will send a weird random ATTxxxxxxx.dat file. To bypass this, put a validation in the file attachment. If Not String.IsNullOrEmpty(AttachmentFileFiled.FileName) Then put the attachment code here ‘ e.g mm.Attachments.Add(New Attachment(AttachmentFileField.PostedFile.InputStream, AttachmentFileField.FileName)) End If