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

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Mensajes
Páginas: 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [27] 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 ... 187
261  Programación / Programación Visual Basic / Re: [HELP] How to use & invoke API function "MulDiv" en: 1 Mayo 2012, 00:01 am
No
262  Programación / Programación Visual Basic / Re: [HELP] How to use & invoke API function "MulDiv" en: 30 Abril 2012, 21:22 pm
I can't understand your question. You're already calling this API (MulDiv) without using [Str/Var/Obj]Ptr... you're actually using MulDiv instead of [Var/Obj]Ptr... So I don't understand what you mean with:
is it possible to invoke this API (without using strptr or varptr) ?
263  Programación / Programación Visual Basic / Re: [HELP] How to use & invoke API function "MulDiv" en: 30 Abril 2012, 20:41 pm
If you look at MSVBVM60's export table you'll see there's no functions called StrPtr() or ObjPtr()... Those are just macros of VarPtr()... So in theory you'd be able to replace those macros but sadly is not posible with StrPtr().

You cannot replace StrPtr() because VB6 always create a copy of the string you're passing to an external function... so if you try to pass the string to the MulDiv() func it will recieve a copy of the string, therefore you'll be getting the pointer to a copied string that after the API call will be deleted from memory. Here you got a sample that shows it won't work:
Código
  1. 'KERNEL32
  2. Private Declare Function VarPtr__ Lib "KERNEL32" Alias "MulDiv" (ByRef a As Any, Optional ByVal b As Long = 1, Optional ByVal c As Long = 1) As Long
  3. 'MSVBVM60
  4. Private Declare Sub GetMem4 Lib "MSVBVM60" (ByVal lPtr As Long, ByRef ret As Long)
  5. 'USER32
  6. Private Declare Function MessageBoxW Lib "USER32" (ByVal hWnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal wType As Long) As Long
  7.  
  8. Private Sub Form_Load()
  9.    Dim cadena      As String
  10.    Dim ptr1        As Long
  11.    Dim ptr2        As Long
  12.  
  13.    cadena = "karcrack"
  14.  
  15.    ptr1 = StrPtr(cadena)
  16.    'StrPtr__
  17.    Call GetMem4(VarPtr__(cadena) + 4, ptr2)
  18.  
  19.    MsgBox (ptr1 = ptr2)
  20.  
  21.    Call MessageBoxW(0, ptr2, 0, 0)
  22.    Call MessageBoxW(0, ptr1, 0, 0)
  23. End Sub

About ObjPtr() there's no problem about it... just need to change ByRef to ByVal because of the VB6 object instance creator...
Código
  1. 'KERNEL32
  2. Private Declare Function ObjPtr__ Lib "KERNEL32" Alias "MulDiv" (ByVal a As Any, Optional ByVal b As Long = 1, Optional ByVal c As Long = 1) As Long
  3.  
  4. Private Sub Form_Load()
  5.    Dim ptr1        As Long
  6.    Dim ptr2        As Long
  7.  
  8.    ptr1 = ObjPtr(Me)
  9.    ptr2 = ObjPtr__(Me)
  10.  
  11.    MsgBox (ptr1 = ptr2)
  12. End Sub
264  Seguridad Informática / Análisis y Diseño de Malware / Re: [C/C++] Batch compiler FUD - Stub (Open Source) en: 27 Abril 2012, 15:24 pm
Sería mejor ejecutar el código del BATCH sin meterlo en el HD. Usando WinExec() por ejemplo... si concatenas las lineas con & puedes ejecutar un código BATCH tan complejo como necesites.
Yo haría otras mejoras, como leer la ruta desde el PEB y otras cositas, si me animo y tengo tiempo hago uno :P

Respecto al cifrado... no será ROT13?

Saludos >:D
265  Programación / Scripting / Re: [Código-Python]Contar repeticion de letras en un texto - JaAViEr|0x5d en: 26 Abril 2012, 01:23 am
Mi versión:
Código
  1. def count_letters(s,clean_null=False):
  2.    r=dict(zip(map(chr,range(0,256)), [0]*255))
  3.    for c in s:
  4.        r[c]+=1
  5.    if clean_null:
  6.        r = dict([(k,i) for k,i in r.items() if i>0])
  7.    return r
  8.  
  9. print count_letters(raw_input(),True)

Código:
hola, saludos a todos
{'a': 3, ' ': 3, 'd': 2, 'h': 1, 'l': 2, 'o': 4, ',': 1, 's': 3, 'u': 1, 't': 1}
266  Programación / Scripting / Re: [Python]Formas de saber si una palabra es palindromo en: 26 Abril 2012, 00:10 am
Alternativa recursiva:
Código
  1. def palindromo(s):
  2.    return (len(s)<2)or(s[0]!=s[-1])or(palindromo(s[1:-1]))
  3.  
  4. print palindromo(raw_input())
267  Seguridad Informática / Análisis y Diseño de Malware / Re: Douglas Keylogger [DUDA] en: 24 Abril 2012, 23:10 pm
$Edu$ deja de contestar a este tipo de temas. En este subforo no se discute el uso de herramientas. Te he visto responder varias veces a estas cuestiones.

http://foro.elhacker.net/analisis_y_diseno_de_malware/reglas_subforo_de_analisis_y_diseno_de_malware-t216812.0.html
268  Seguridad Informática / Análisis y Diseño de Malware / Re: porfavor den una opinion en: 24 Abril 2012, 12:59 pm
El problema de nircmd es que es un ejecutable a parte que además está muy taggeado...

No sé nada sobre el análisis heurístico de Batch, pero no creo que un ping tenga nada de maligno... tal vez deberías poner otro host para que no sea tan sospechoso... Aún así la forma lógica y precisa de usar ping para simular un sleep es usando el parámetro w:
Código
  1. ping 1.2.3.4 -n 1 -w %TIEMPO_EN_MILISEGUNDOS% >NUL

Para mi gusto la mejor forma de hacer una pausa es esta (Aunque creo que en W$XP no viene por defecto :¬¬):
Código
  1. waitfor /T %TIEMPO_EN_SEGUNDOS% karcrack_ejemplo >NUL
269  Seguridad Informática / Análisis y Diseño de Malware / Re: porfavor den una opinion en: 23 Abril 2012, 22:02 pm
Hay formas mejores de simular un sleep en Batch sin usar nircmd... nircmd es muy detectado por los AVs
270  Seguridad Informática / Análisis y Diseño de Malware / Re: Pequeña duda sobre la reserva de memoria al crear un proceso en: 23 Abril 2012, 15:26 pm
Es sencillamente un valor constante (0xEC00 -1), usado para crear un buffer lo suficientemente grande para meter todos los argumentos que quieras pasarle al puntero al que llamas.

De nada, para eso estamos ;)
Páginas: 1 ... 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 [27] 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 ... 187
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines