Hola!
Gracias por la recompilada. Voy a tratar de mirarlo este finde, si hago tiempo. Ya veremos de qué se trata...
Saludos!
EDIT: Me hice un tiempito y lo miré. Con un HBP quitamos la proteccion antiVM de Enigma y podemos correr el soft sin problemas (no hace falta desempacar).
Dejo mi programa que cifra en python (no hago el descifra por falta de tiempo y F1ACA):
#!/usr/bin/env python
import sys
import os
import random
import struct
def randdw ():
return struct.pack('<B',random.randrange(0,255)) + struct.pack('<B',random.randrange(0,255)) + struct.pack('<B',random.randrange(0,255)) + struct.pack('<B',random.randrange(0,255))
def checksum (cadena):
i = 0
chksum = 0
for x in cadena:
chksum *= 101
chksum += ord(x)
return struct.pack('<L', chksum & 0xFFFFFFFF)
def encrypt(fin, fout):
f = open(fin, 'rb')
buff = f.read()
f.close()
dw1 = randdw()
dw2 = randdw()
largo = len(buff)
resto = largo % 8
if resto != 0:
buff += '\x00' * (8-resto)
chksum = checksum(buff)
i = 0
buff2 = ''
for j in range (0, len(buff)):
n1 = (ord(dw1[i]) ^ 0xFF)# - 1
n2 = (ord(buff[j]) ^ 0xFF)# - 1
buff2 += struct.pack('<B',n1 ^ n2)
i += 1
if i == 4:
i = 0
i = 0
buff3=''
for j in range (0, len(buff2)):
n1 = (ord(dw2[i]) ^ 0xFF) #- 1
buff3 += struct.pack('<B',ord(buff2[j]) ^ (n1 ^ ord(dw1[i])))
i += 1
if i == 4:
i = 0
header = dw1 + dw2 + chksum + struct.pack('<L', largo) #Estructura del archivo: Header + Data
finalheader = ''
for j in range (0, 16):
sar = (0xABCDEF00 >> (8 * (4 - ((j + 1) % 4)))) & 0xFF
finalheader += struct.pack('<B', ord(header[j]) ^ ord(struct.pack('<B', sar)))
f = open(fout, 'wb')
f.write(finalheader + buff3)
f.close()
print fin + ' encrypted into ' + fout
def decrypt(fin, fout):
print 'Too much 989898. This should decrypt ' + fin + ' into ' + fout
print "It's the oposite of encrypt anyway ;)"
def usage():
print 'Usage:'
print 'hkfuzzer.py [option] fileIN fileOUT'
print 'option values:'
print ' e : Encrypt fileIN into fileOUT. If fileOUT exists, will be overwritten.'
print ' d : Dencrypt fileIN into fileOUT. If fileOUT exists, will be overwritten.'
print 'Sample 1: Encrypt a.txt into b.txt'
print ' hkfuzzer.py e a.txt b.txt'
print 'Sample 2: Dencrypt b.txt into c.txt'
print ' hkfuzzer.py d b.txt c.txt'
if __name__ == '__main__':
args=[]
brutus = False
largs = sys.argv
for x in largs:
args.append(x.lower())
brutus &= len(largs) != 4
brutus &= (args[1] != 'e') or (args[1] != 'd')
brutus &= os.path.exists(args[2]) and os.path.isfile(args[2])
if brutus:
usage()
else:
if (os.path.exists(args[3]) and os.path.isfile(args[3])):
os.remove(args[3])
if args[1] == 'e':
encrypt(args[2], args[3])
else:
decrypt(args[2], args[3])