Page 1 of 2 12>
Topic Options
#147800 - 2005-09-14 08:26 PM Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
If not, is there a way to kill a windows process in KiX?
Top
#147801 - 2005-09-14 08:35 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
something like:

Code:

$PList = QS(Split(ListProcess('.'),@CRLF))

FOR EACH $proc IN $PList
kill $proc
NEXT


Top
#147802 - 2005-09-14 08:56 PM Re: Anyone written a WinFixer removal script??
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
look in the udf forum for EnumProcess()
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#147803 - 2005-09-14 09:25 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
that's an awesome function radimus. now how would I grab an array of processes to evauluate running EnumProcess() against them? Is there a function to put all running processes into an array?

Code:
$Procs		= "select * from Win32_Process where"
$ProcArray = GetObject($winmgmts).ExecQuery($Proc)



???


Edited by thepip3r (2005-09-14 09:28 PM)

Top
#147804 - 2005-09-14 09:31 PM Re: Anyone written a WinFixer removal script??
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I use PList() which returns an array that you can simply iterate through with a FOR loop.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#147805 - 2005-09-14 09:37 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
Is that an inherent function?? I couldn't find it in the UDF forum or on the KiXHelp UDF listing...
Top
#147806 - 2005-09-14 09:44 PM Re: Anyone written a WinFixer removal script??
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Hmm... not sure where I "inherited" it from but it is not an intrinsic function.

Code:

Function PList($PC)
Dim $PC,$Query,$ProcList
$Query = 'Select * from Win32_Process'
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$PC+"\root\cimv2")
If @error
? @Serror+' on '+$PC ?
Exit @error
Endif
$Processes = $objWMIService.ExecQuery($Query)
for each $process in $Processes
$ProcList = $ProcList + $Process.name + '|'
next
$PList=Split($ProcList,'|')
EndFunction

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#147807 - 2005-09-14 09:59 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
I tried this and it's not working:

Code:
$ProcArray		= $PList($Comp)
$WinDir = %WinDir%
$Sys = $WinDir + "\System32"

$x = 0

FOR EACH $Proc IN $ProcArray
? $Proc[$x] + @CRLF
$x = $x + 1
NEXT

sleep 5
exit



How would you loop through that array to view the results?

Top
#147808 - 2005-09-14 10:02 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
bah... nm i'm calling PLIST as a var... let me retry
Top
#147809 - 2005-09-14 10:04 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
bah my bad... this worked:

Code:
$ProcArray		= PList($Comp)
$WinDir = %WinDir%
$Sys = $WinDir + "\System32"

FOR EACH $Proc IN $ProcArray
? $Proc + @CRLF
NEXT

sleep 5
exit



thanx, that UDF was exactly what I was looking for.

Top
#147810 - 2005-09-14 10:25 PM Re: Anyone written a WinFixer removal script??
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Quote:

that's an awesome function radimus. now how would I grab an array of processes to evauluate running EnumProcess() against them? Is there a function to put all running processes into an array?

Code:
$Procs		= "select * from Win32_Process where"
$ProcArray = GetObject($winmgmts).ExecQuery($Proc)



???




WMIQuery()

$processes = WMIQUERY("name","Win32_Process")
for each $process in $processes
? $process
next
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#147811 - 2005-09-14 10:41 PM Re: Anyone written a WinFixer removal script??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Typically most of this junk can be removed from within normal Windows session, however there are many spyware/adware annoyances that need to be removed from within SAFE MODE and can not be removed from within a normal Windows session.

I would highly recommend this site for assistance with cleaning up spyware/adware from your system if you're not experienced at it.

http://www.spywarewarrior.com/index.php

Top
#147812 - 2005-09-15 01:24 AM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
I know this is a lot to ask but I just got down writing my WinFixer removal script based off of the following link and just wanted feedback on more efficient or better ways I might be able to accomplish the same thing in the future??

http://www.spyware-removal-guideline.com/winfixer-removal

Code:
Break ON
$ = SetOption("WrapAtEOL","ON")

$Handle = FreeFileHandle()
$ProgFiles = %ProgramFiles%
$Comp = %ComputerName%
$ProcArray = PList($Comp)
$WinDir = %WinDir%
$Sys = $WinDir + "\System32"

$Sys32Files = "crqsibss.dll", "pss.dll", "uwtuh.dll", "lquwhfff.dll",
"dkmsrpcn.dll", "jtr2079oe.dll", "igzxgqcr.dll", "eaann.dll",
"fssjjdf.dll", "nikppcy.dll", "tshk.dll", "AG1KPVU0.INI",
"eqwxzb.exe", "hqyikxs.exe", "iasnhl.exe", "odensc.exe",
"riqzcju.exe", "sspggd.exe", "u9uhk5i0.ini", "unb59hf8.ini",
"wayyftxi.exe", "xau.exe"
$WinFiles = "asappsrv.dll", "mznoo.dll", "ktcar.exe"
$CommonFiles = "crxml.dll", "pcheck.dll"
$WinFixerFiles = "compcln.dll", "df_fixer.dll", "df_proxy.dll", "ffcom.dll",
"ffwraper.dll", "fixcore.dll", "ftrec.dll", "idletrac.dll",
"mmfix.dll", "oedrop.dll", "strres.dll"

$RegKeys = "HKEY_CLASSES_ROOT\compcleancore.appcleaner.1\clsid",
"HKEY_CLASSES_ROOT\compcleancore.appcleaner\clsid",
"HKEY_CLASSES_ROOT\compcleancore.appcleaner\curver",
"HKEY_CLASSES_ROOT\compcleancore.filecleaner.1\clsid",
"HKEY_CLASSES_ROOT\compcleancore.filecleaner\clsid",
"HKEY_CLASSES_ROOT\compcleancore.filecleaner\curver",
"HKEY_CLASSES_ROOT\compcleancore.inetcleaner.1\clsid",
"HKEY_CLASSES_ROOT\compcleancore.inetcleaner\clsid",
"HKEY_CLASSES_ROOT\compcleancore.inetcleaner\curver",
"HKEY_CLASSES_ROOT\compcleancore.regcleaner.1\clsid",
"HKEY_CLASSES_ROOT\compcleancore.regcleaner\clsid",
"HKEY_CLASSES_ROOT\compcleancore.regcleaner\curver",
"HKEY_CLASSES_ROOT\compcleancore.systemcleaner.1\clsid",
"HKEY_CLASSES_ROOT\compcleancore.systemcleaner\clsid",
"HKEY_CLASSES_ROOT\compcleancore.systemcleaner\curver",
"HKEY_CLASSES_ROOT\df_fixer.fixer.1\clsid",
"HKEY_CLASSES_ROOT\df_fixer.fixer\clsid",
"HKEY_CLASSES_ROOT\df_fixer.fixer\curver",
"HKEY_CLASSES_ROOT\df_proxy.drivermanipulate.1\clsid",
"HKEY_CLASSES_ROOT\df_proxy.drivermanipulate\clsid",
"HKEY_CLASSES_ROOT\df_proxy.drivermanipulate\curver",
"HKEY_CLASSES_ROOT\ffcom.flfixer\clsid",
"HKEY_CLASSES_ROOT\ffwraper.ffenginwraper.1\clsid",
"HKEY_CLASSES_ROOT\ffwraper.ffenginwraper\clsid",
"HKEY_CLASSES_ROOT\ffwraper.ffenginwraper\curver",
"HKEY_CLASSES_ROOT\fixcore.mmfixcore.1\clsid",
"HKEY_CLASSES_ROOT\fixcore.mmfixcore\clsid",
"HKEY_CLASSES_ROOT\fixcore.mmfixcore\curver",
"HKEY_CLASSES_ROOT\interface\{1ce1c25b-f8b4-4974-99d2-5d4ae96b9900}",
"HKEY_CLASSES_ROOT\interface\{9e984934-cd94-4763-9dbc-618e483d4b7f}",
"HKEY_CLASSES_ROOT\typelib\{30ed49a5-ca6c-4918-b5f3-5e6818c91d8b}\1.0",
"HKEY_CLASSES_ROOT\typelib\{6a077841-5016-42c8-92c8-f2d6b865bcd1}",
"HKEY_CLASSES_ROOT\typelib\{ad70ac89-f460-4e7e-b5a5-7eaf7e207736}",
"HKEY_CLASSES_ROOT\typelib\{b6625280-8cd8-4632-97c0-83cec12a49a3}",
"HKEY_CLASSES_ROOT\typelib\{f458adae-d53b-4859-b99f-9fa127791278}",
"HKEY_CLASSES_ROOT\typelib\{fc76a5b8-db35-4f3e-8b9a-bf0eea098d64}",
"HKEY_CURRENT_USER\software\winsoftware\winfixer 2005"

$MiscFiles = "C:\8355.exe",
"C:\Documents and Settings\All Users\Start Menu\Programs\Startup\riak.exe"


FOR EACH $Proc IN $ProcArray
IF LEFT($Proc, 5) = "UWFX5"
EnumProcess($Proc,1)
? $Proc + @CRLF
ENDIF

IF $Proc = "196_150_NI.EXE"
EnumProcess($Proc,1)
? $Proc + @CRLF
ENDIF
NEXT

FOR EACH $x IN $Sys32Files
$File = $Sys + "\$x"
KillFile($File)
NEXT

FOR EACH $x IN $WinFiles
$File = $WinDir + "\$x"
KillFile($File)
NEXT

FOR EACH $x IN $CommonFiles
$File = $ProgFiles + "\common files\winsoftware\$x"
KillFile($File)
NEXT

FOR EACH $x IN $WinFixerFiles
$File = $ProgFiles + "\winfixer 2005\$x"
KillFile($File)
NEXT


FOR EACH $x IN $RegKeys
KillRegKeys($x)
NEXT


FOR EACH $x IN $MiscFiles
IF EXIST($x)
DEL /F /S /Q $x
IF @ERROR = 0
? "$x Was Successfully Deleted!" + @CRLF
ELSE
? "$x Was NOT Deleted!" + @CRLF
ENDIF
ELSE
? "$x Did NOT Exist!" + @CRLF
ENDIF
NEXT


IF EXIST ($ProgFiles + "\Common Files\WinFixer 2005")
DEL /F /S /Q $ProgFiles + "\Common Files\WinFixer 2005"
? "Common Files -> WinFixer 2005 was successfully completed." + @CRLF
ELSE
? "Common Files -> WinFixer 2005 didn't exist!" + @CRLF
ENDIF

IF EXIST ($ProgFiles + "\WinFixer 2005")
DEL /F /S /Q $ProgFiles + "\WinFixer 2005"
? "Program Files -> WinFixer 2005 was successfully completed." + @CRLF
ELSE
? "Program Files -> WinFixer 2005 didn't exist!" + @CRLF
ENDIF



;************************************************
;************** UDFs **************************
;************************************************


FUNCTION KillRegKeys($key)
IF KEYEXIST($key)
DELKEY($key)
IF @ERROR = 0
? "$key Successfully Deleted." + @CRLF
ELSE
? "$key Was NOT Deleted!" + @CRLF
ENDIF
ELSE
? "$key Did NOT Exist!" + @CRLF
ENDIF
ENDFUNCTION



Function PList($PC)
Dim $PC,$Query,$ProcList
$Query = 'Select * from Win32_Process'
$objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\"+$PC+"\root\cimv2")
If @error
? @Serror+' on '+$PC ?
Exit @error
Endif
$Processes = $objWMIService.ExecQuery($Query)
for each $process in $Processes
$ProcList = $ProcList + $Process.name + '|'
next
$PList=Split($ProcList,'|')
EndFunction



FUNCTION KillFile($File)
;***** $File = A combination of the path and the variable

IF EXIST ($File)
IF RIGHT($File, 4) = ".dll"
SHELL '%COMSPEC% /e:1024 /c regsvr32 /s $File'
IF @ERROR = 0
? "$File Successfully Unregistered" + @CRLF
del $File
IF @ERROR = 0
? "$File Successfully Deleted" + @CRLF
ELSE
? "$File Was NOT Deleted!" + @CRLF
ENDIF
ELSE
del $File
IF @ERROR = 0
? "$File Successfully Unregistered!" + @CRLF
ELSE
? "$File Was NOT Unregistered!" + @CRLF
ENDIF

ENDIF
ELSE
? "$File Didn't Exist" + @CRLF
ENDIF
ENDFUNCTION



FUNCTION EnumProcess($exe, optional $terminate, optional $Computer)
Dim $winmgmts, $ExecQuery, $Process, $id, $getobject, $
if not $computer $computer=@wksta endif
$winmgmts="winmgmts:{impersonationLevel=impersonate}!//$COMPUTER"
select
case val($exe)>0
$ExecQuery="select * from Win32_Process where ProcessId='$exe'"
$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
For each $Process in $GetObject
if $terminate $=$Process.Terminate endif
$EnumProcess = $Process.name
next
$GetObject=''
case vartype($exe)=8
$ExecQuery="select * from Win32_Process where Name='$exe'"
$GetObject=GetObject($winmgmts).ExecQuery($ExecQuery)
For each $Process in $GetObject
if $terminate $=$Process.Terminate endif
$id=$Process.ProcessId
$EnumProcess = "$Id" + "|" + "$EnumProcess"
Next
$EnumProcess=left($EnumProcess,len($EnumProcess)-1)
$GetObject=''
case 1
exit 1
endselect
ENDFUNCTION


Top
#147813 - 2005-09-15 08:18 AM Re: Anyone written a WinFixer removal script??
masken Offline
MM club member
*****

Registered: 2000-11-27
Posts: 1222
Loc: Gothenburg, Sweden
Nice But what does this do that common antispy/ad-ware doesn't?
_________________________
The tart is out there

Top
#147814 - 2005-09-15 08:26 AM Re: Anyone written a WinFixer removal script??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
More then likely as they do, won't remove it from the NORMAL Windows session. Many of the current spyware infections can not be removed from within a normal session and must be removed from within SAFE MODE.

Spybot Search & Destroy is pretty good freebie.

Top
#147815 - 2005-09-15 03:47 PM Re: Anyone written a WinFixer removal script??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
doc, you are a bit repetative.

if safe mode is needed, the normal antispyware tools can't help either.

but if he has developed this script to work for this winFixer and he has tested it and seen it working, dunno why it should be questioned...

imho.
_________________________
!

download KiXnet

Top
#147816 - 2005-09-15 05:24 PM Re: Anyone written a WinFixer removal script??
thepip3r Offline
Hey THIS is FUN
*****

Registered: 2005-03-02
Posts: 350
it does work and the reason I wrote it the way I did is because winfixer creates a number of randomly generated DLLs, EXEs, etc. This way, when more are found, all you have to do is add them to the arrays and that's it. I also changed all of the "?" lines to actually write to a local log file so you can actually view the results. thanx for the feedback gents and I'll be looking at your spywarewarrior link for further information. Thanx again guys.
Top
#147817 - 2005-09-15 08:53 PM Re: Anyone written a WinFixer removal script??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Not questioning the script in general, just the approach I suppose. But hey, if it helps one to learn coding better that's great too. But if it has WinFixer almost guaranteed it has a ton of other junk by now too that his script won't deal with.
Top
#147818 - 2005-09-15 11:01 PM Re: Anyone written a WinFixer removal script??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that's true.
_________________________
!

download KiXnet

Top
#147819 - 2005-09-16 02:57 AM Re: Anyone written a WinFixer removal script??
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Well something that you might want to think about running is re-registering all the DLL files. Not all of them require registering, so it runs silently. Often some of the new spyware crap is destroying some of the COM registrations of valid DLL files so this restores them for most.

1. Make sure you first remove ALL spyware and similar junk from the system otherwise this could easily re-enable spyware that was otherwise crippled.
2. Run a FULL CHKDSK /F /R on the volume before hand as well to fix possible errors.

When you are reasonably certain that the system is clean you can then run something like this.

Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')

Dim $DLL,$DLLS
$DLLS = Dir(@LANRoot+'\*.dll')
While $DLLS <> "" And @ERROR = 0
$DLLS = $DLLS + @CRLF + Dir()
Loop
$DLLS=Split($DLLS,@CRLF)
For Each $DLL In $DLLS
If $DLL
SHELL '%COMSPEC% /e:1024 /c REGSVR32 /S ' + $DLL
EndIf
Next

Top
Page 1 of 2 12>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 202 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.078 seconds in which 0.028 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org