WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Check Systems for the MSBlaster Virus

Keywords: MS Blaster Virus MSBlaster W32.Blaster.Worm W32/Lovsan.worm Win32.Poza Lovsan WORM_MSBLAST.A W32/Blaster-A W32/Blaster

Question:

I've written a script to deploy the hotfix to all our servers, but has anyone written one yet that'll go out and find out if anyone is infected? I was thinking you could just check the registry key (Run key) or something easy like that, but how would you go out and connect to every single workstation on your network to get the machine names to check so you can do it from your desk?

Answer:

  1. Use wntServerList to get list of all workstations.
  2. Use RegConnect to connect to remote registry and get back a "key"
  3. Use "key" in a RegQueryValue call to interrogate registry contents.
  4. Remember to RegCloseKey afterwards.
Maybe this code will help.
AddExtender("WWWNT34i.DLL")

file="C:\BLASTER.LOG" ; !!! CHANGE TO FIT YOUR NEEDS !!!
logfile = FileOpen(file,"WRITE")

; get a list of machines on the network
machinelist=wntServerList("","",1)

;For each machine
pccount=ItemCount(machinelist,@tab)
for xx=1 to pccount
	thispc=ItemExtract(xx,machinelist, @tab)
	ErrorMode(@OFF)
	; connect to the remote computer
	keyloc=RegConnect(thispc,@REGMACHINE)
	ErrorMode(@CANCEL)
	if keyloc == 0 then continue ;skip if cannot connect
	if RegExistValue(keyloc,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run[windows auto update]")
		value = RegQueryValue(keyloc,"SOFTWARE\Microsoft\Windows\CurrentVersion\Run[windows auto update]")
		if StrLower(value) == "msblast.exe"
			logtxt=StrCat(thispc, " is infected with MSBlaster")
			FileWrite(logfile, logtxt)
		endif
	endif
	RegCloseKey(keyloc)
next

FileClose(logfile)
See http://securityresponse.symantec.com/avcenter/venc/data/w32.blaster.worm.html for more information about this virus.
Article ID:   W15960
File Created: 2004:03:30:15:42:04
Last Updated: 2004:03:30:15:42:04