|
1
|
Seguridad Informática / Análisis y Diseño de Malware / Re: [VBS] Mutex o Similar
|
en: 25 Junio 2015, 21:10 pm
|
encontré esto por ahí, no se si sea una mejor opción ''Objects set shell = createObject("wscript.shell") Set objFSO = CreateObject("Scripting.FileSystemObject") ''Check the args passed into the script. Specifically looking for the last argument which is the script mutex Set args = Wscript.Arguments argsFound = false For Each arg In args argsFound = arg Next ''If we didn't get any arguments re-run self with a random arg string, this will be the mutex if argsFound = false then runSelf(genRndStr(8)) Else ''The last argument is the mutex string mutex = argsFound end if ''remove any other instances of this script killPastInstances(mutex) ''This sub will kill all instnances of the currently running vbscript that are running under the same interpreter ''but it will not kill it's self ''note, this requires that this script has a uniquite mutex sub killPastInstances(mutex) ''Get self name scriptName = WScript.ScriptFullName Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Process",,48) For Each objItem in colItems if instr(objItem.CommandLine, scriptName) > 0 Then ''If the instance of the script is NOT this instance if not instr(objItem.CommandLine, mutex) > 0 then ''Kill it! objItem.Terminate() end if end if Next end sub ''generates a random string of length "count" Function genRndStr(Count) Randomize For i = 1 To Count If (Int((1 - 0 + 1) * Rnd + 0)) Then genRndStr = genRndStr & Chr(Int((90 - 65 + 1) * Rnd + 65)) Else genRndStr = genRndStr & Chr(Int((57 - 48 + 1) * Rnd + 48)) End If Next End Function ''re-runs the curernt script with args in cscript if it is running in wscript. current script exits sub forceCscript If Instr(1, WScript.FullName, "CScript", vbTextCompare) = 0 Then Set args = Wscript.Arguments argStr = "" For Each arg In args argStr = argStr & " " & arg Next Shell.Run "cscript """ & WScript.ScriptFullName & """" & argStr, 1, False WScript.Quit End If end sub ''Runs a new instance of the current script with additional arguments. Current script exits sub runSelf(extraArgStr) ''Are we runing in C or W script? interpreter = "wscript.exe" If Instr(1, WScript.FullName, "CScript", vbTextCompare) = 0 Then interpreter = "wscript.exe" else interpreter = "cscript.exe" end if ''Get current args Set args = Wscript.Arguments argStr = "" For Each arg In args argStr = argStr & " " & arg Next ''append new args if required if extraArgStr <> "" then argStr = argStr & " " & extraArgStr Shell.Run interpreter & " """ & WScript.ScriptFullName & """" & argStr, 1, False WScript.Quit end sub
|
|
|
3
|
Seguridad Informática / Análisis y Diseño de Malware / Solicitud ayuda con JS
|
en: 21 Junio 2015, 16:34 pm
|
buenos dias, hace mucho que no venia por elhacker.net. , solicito la ayuda de alguien en la medida de lo posible, quisiera saber si alguien ha descifrado algun malware de JS b = [], Q = "", J = 3;
if (typeof prompt != "undefined") { var v = J++; } var v = v || Math, k = parseInt, i = "slice", z = "fromCharCode";
for (var Z = 0; Z < E.length;) b[~~(Z / 3)] = k(E[i](Z, Z += J), 23); for (var X = 0; X < b.length; X += 2) Q += String[z](b[X] ^ b[X + 1]);var N = Math["floor"].constructor; N(Q)(); apenas comienzo con JS y me seria de mucha ayuda descifrar el code anteriror, me quedo varado en la ultima instrucción, en realidad no entiendo que hace Math["floor"].constructor; por lo que he consultado es una funcion matematica para manejo de numeros enteros, si alguien me podria colabrar quedo agradecido XcryptOR
|
|
|
7
|
Programación / Programación Visual Basic / Re: [NTDLL-NATIVE] Alternativa GetLogicalDrives y mas{NtQueryInformationProcess}
|
en: 12 Septiembre 2009, 22:38 pm
|
karkrack tu sabes que este tipo de codigo no tienen muchos comentarios pues para la mayoria de usuarios de este foro es muy avanzada, la gran mayoria se quedaron estancados en cosas relativas a infección por messenger o a troyanos, bueno y como dices en C no supone reto desde c se hace lo que a uno le venga en gana, pisando el terreno de VB es dificil y hay poca o ninguna documentación al respecto. Ya lo habia visto en HH, y la verdad como todos tus trabajos con Apis nativas muy bueno, yo tambien me adentre en el terreno de las apis nativas y hay algunas que se prestan para cosas geniales, lastima que como no hay suficiente documentacion y tambien a mis limitados conocimientos en memoria desde VB, no he podido hacerlas trabajar. ahhh un punto a favor es que conoces bien el asm y yo apenas lo basico, saludos man eres grande
|
|
|
10
|
Programación / Programación Visual Basic / Re: iSpread Module
|
en: 18 Agosto 2009, 01:11 am
|
Lo ideal seria zipear todos los ejecutables generados para disimular xD
que tanto te crees realmente?, es mejor llenarlo con un dummy al final del exe y q cambie de icono, el zip no tanto, ya que un archivo dummy de 1 gb en un zip se reduce como a 100 kbs o menos aun!¡. No por eso, sino para que quede menos sospechoso xD, hace un tiempo recuerdo que algunos clientes p2p filtraban los archivos con extensiones .exe bat com etc por seguridad no se ahora XD... comparto esto con GB, fijate si compartes une exe con ares??, igualmente la mejor opción es un fichero zip, lo que tendrias que hacer es inflar el exe, para que cambie el hash, a mi el modulo de skyweb me gusta algunas que otras cosas que se podrian mejorar pero muy buen code.
|
|
|
|
|
|
|