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

 

 


Tema destacado: Arreglado, de nuevo, el registro del warzone (wargame) de EHN


+  Foro de elhacker.net
|-+  Programación
| |-+  Ingeniería Inversa (Moderadores: karmany, .:UND3R:., MCKSys Argentina)
| | |-+  Armadillo 4.05
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Armadillo 4.05  (Leído 3,644 veces)
someRandomCode

Desconectado Desconectado

Mensajes: 250



Ver Perfil
Armadillo 4.05
« en: 27 Enero 2016, 11:53 am »

Hola muchachos, me he tomado un proyecto un poco personal.
He encontrado una aplicación que usa Armadullo 4.05, reportado por Armadillo Inspector.
El programa en cuestion, por algun motivo, no corre en mi maquina virtual con Windows XP 32bits en Ollydbg 1.10, asique tengo que usar OllyDBG 2.X
He cargado el OllyExt para colocar el parche anti isDebuggerPresent, y Odbgscript para ejecutar los scripts de OllyScript (son del todo compatibles?)
Consegui un script de Ricardo para el desempaquetado desde tuts4you, y otro par mas para lo mismo, pero nunca llego al messagebox que deberia decirme que fallo o que tuvo exito..
Cargo el ejecutable, ejecuto el script.
Cargo el ejecutable, lo ejecuto y luego ejecuto el script.
Siempre habiendo puesto las excepciones que dice Ricardo en el text file, y siempre con el isDebuggerPresent parcheado, pero aun asi, nunca llego al resultado.

Que estoy haciendo mal?
Que informacion puedo aportar para ayudarme a ayudarlos con mi problema? :)

Saludos!

EDIT: Mi problema esta cuando el script ejecuta el programa, cuando salgo del programa se me va al modulo ntdll, y no hay mensaje ni nada.
He ido a la ventana del script y dado que ejecute mas alla de la instruccion 'run' pero sigo sin entender como proseguir.

Adjunto el script en caso de que alguien quiera verlo..
Código:
/*
DETACH FARTHER - METHOD RICARDO - VER 0.1
AUTHOR: BENINA
Modified hipu' Script by BENINA (HTTP://REAONLINE.NET/FORUM)

Armadillo script - detach parent from client and unpack (1000 bytes method Ricardo)

Debugging Option: Ignore custom exceptions: 0EEDFDE;C0000001..C0009898;80000004

hipu said:

MAKE SURE ALL BREAKPOINTS ARE DELETED BEFORE EXECUTING THE SCRIPT!!!

ALSO: since im using the IsDebuggerPresent plugin, i didnt do IsDebuggerPresent patch.
do whatever is needed if u dont use the plugin...

Thanz to Ricardo,Tenketsu and hipu

*/


//////////////////////////
// To declare vars
/////////////////////////

var WaitForDebugEvent
var WriteProcessMemory
var pDebugEvent
var pBuffer
var child_ProcID
var oep_offset1
var oep_offset2
var oep_offset3
var crypto_proc
var child_OEP
var patched_line1
var imgbase
var rdata_begin
var text_begin
var text_patch
var tb_report1
var tb_report2
var tb_report3
var tb_report4
var tb_report5
var tb_report6
var addr_1000
var buffer_1000
var temp
var temp1

//////////////////////////////////////
// Find rdata_begin or (data_begin)
/////////////////////////////////////

gmi eip,MODULEBASE
mov imgbase, $RESULT
mov rdata_begin, imgbase
find rdata_begin, #4441544100#  //find "DATA" string
cmp $RESULT,0
jne lbcontinue

find rdata_begin, #2E726461746100#  //find ".rdata" string
cmp $RESULT,0
jne lbcontinue

find rdata_begin, #2E6461746100#  //find ".data" string
cmp $RESULT,0
jne lbcontinue
jmp no_run_script
lbcontinue:
mov rdata_begin, $RESULT
add rdata_begin, 0c
mov rdata_begin, [rdata_begin]
add rdata_begin, imgbase
log rdata_begin

/////////////////////////////////
// Find text_begin
////////////////////////////////


gmi eip,MODULEBASE
mov imgbase, $RESULT
mov text_begin, imgbase
find text_begin, #434F444500#  //find "CODE" string
cmp $RESULT,0
jne lbcontinue2

find text_begin, #2E7465787400#  //find ".text" string
cmp $RESULT,0
jne lbcontinue2
jmp no_run_script

lbcontinue2:

mov text_begin, $RESULT
add text_begin, 0c
mov text_begin, [text_begin]
add text_begin, imgbase
log text_begin


/////////////////////////////////////////////////////
//eob found_WaitForDebugEvent WriteProcessMemory
////////////////////////////////////////////////////

gpa "WaitForDebugEvent", "kernel32.dll"
mov WaitForDebugEvent, $RESULT
gpa "WriteProcessMemory", "kernel32.dll"
mov WriteProcessMemory, $RESULT


///////////////////////////////////////
//Armadillo check bp first 5 bytes so:
///////////////////////////////////////


add WriteProcessMemory,5
bp WriteProcessMemory
run
bc WriteProcessMemory
sub WriteProcessMemory,5


//////////////////////////////////////////////
//Get infomation at bp Call WaitForDebugEvent
/////////////////////////////////////////////


bp WaitForDebugEvent
run
bc WaitForDebugEvent


mov pDebugEvent, esp
add pDebugEvent, 04
mov pDebugEvent, [pDebugEvent]
log pDebugEvent

mov oep_offset1, pDebugEvent
add oep_offset1, 18
mov oep_offset2, pDebugEvent
add oep_offset2, 24
mov oep_offset3, pDebugEvent
add oep_offset3, 28

////////////////////////////////////////
// Find Child_ProcID and child_OEP
///////////////////////////////////////

bp WriteProcessMemory
run
bc WriteProcessMemory



mov child_ProcID, pDebugEvent
add child_ProcID, 4
mov child_ProcID, [child_ProcID]
mov child_OEP, [oep_offset1]

///////////////////////////////////
//Save info Table report
///////////////////////////////////


mov tb_report1,[pDebugEvent]

mov tb_report2,pDebugEvent
add tb_report2,4
mov tb_report2,[tb_report2]

mov tb_report3,pDebugEvent
add tb_report3,8
mov tb_report3,[tb_report3]

mov tb_report4,pDebugEvent
add tb_report4,C
mov tb_report4,[tb_report4]

mov tb_report5,pDebugEvent
add tb_report5,10
mov tb_report5,[tb_report5]

mov tb_report6,pDebugEvent
add tb_report6,14
mov tb_report6,[tb_report6]

////////////////////////////////////////////////////
//Get info in stack at bp Call WriteProcessMemory
///////////////////////////////////////////////////


mov addr_1000,esp
add addr_1000,8
mov addr_1000,[addr_1000]
log addr_1000

mov buffer_1000,esp
add buffer_1000,C
mov buffer_1000,[buffer_1000]
log buffer_1000

/////////////////////////////////
//Patch OEP of Son to EBFE
/////////////////////////////////

mov temp,child_OEP
sub temp,addr_1000
add temp,buffer_1000
mov temp1,[temp]

and temp1,FFFF
eval "Bytes patched at OEP of Son (to invert the bytes order)  : {temp1}"
msg $RESULT
log $RESULT

fill temp,1,eb
add temp,1
fill temp,1,fe



///////////////////////////
// FIND ENCRYPTOR
///////////////////////////

mov crypto_proc, esp
add crypto_proc, 128
mov crypto_proc, [crypto_proc]
add crypto_proc, 2d0
mov [crypto_proc], #9090909090#
rtr //ctrl-f9
sto //f8


///////////////////////
//Log info to win log
//////////////////////

log "crypto_proc was nopped..."
log "patched OEP of child process to EBFE"
log child_ProcID
log child_OEP




log "press script/resume when ready"
eval "Patched successful OEP={child_OEP} of child process (PID= {child_ProcID}) to EBFE !!!!.More Info in Window Log.Press button OK to continues!"
msg $RESULT


////////////////////////////////////////////////////////////////
//Patch jump to section .text and NOPs call WaitForDebugEvent
///////////////////////////////////////////////////////////////

bp WaitForDebugEvent
run
bc WaitForDebugEvent

mov patched_line1, [esp]
sub patched_line1, 12

fill patched_line1, 12, 90
add patched_line1,14

eval "jmp {text_begin}"
asm patched_line1,$RESULT

add patched_line1,5
eval "NOP"
asm patched_line1,$RESULT

//////////////////////////////////////
//Patch in section .text (or CODE)
//////////////////////////////////////

mov text_patch, text_begin

eval "add dword [{oep_offset1}],1000"
asm text_patch,$RESULT

add text_patch,A
eval "add dword [{oep_offset2}],1000"
asm text_patch,$RESULT

add text_patch,A
eval "add dword [{oep_offset3}],1000"
asm text_patch,$RESULT

add text_patch,A
eval "cmp dword [{oep_offset3}],{rdata_begin}"
asm text_patch,$RESULT

add text_patch,A
eval "jnz {patched_line1}"
asm text_patch,$RESULT

add text_patch,6
eval "push {child_ProcID}"
asm text_patch,$RESULT

add text_patch,5
eval "CALL DebugActiveProcessStop"
asm text_patch,$RESULT

add text_patch,5
eval "NOP"
asm text_patch,$RESULT

//////////////////////////////
//Patch in Table report at :
//////////////////////////////

sub text_begin,1000
mov [oep_offset1], text_begin
mov [oep_offset2], text_begin
mov [oep_offset3], text_begin

//////////////////////////////////
//go [esp](New origin here)
///////////////////////////////////
mov eip, [esp]


//////////////////////////
// Set bp F2 at
/////////////////////////

bp text_patch
run
bc text_patch

msg "Successful!.Close OllyDbg, execute again and attach to your newely created process.More Info in Window Log. Have fun."
jmp theend

//////////////////////////////////
no_run_script:
msg "This srcipt don't run with this file. Plz Close Olly.Sorry!"


///////////////////////////////
theend:
ret
« Última modificación: 27 Enero 2016, 12:17 pm por someRandomCode » En línea

apuromafo CLS


Desconectado Desconectado

Mensajes: 1.441



Ver Perfil WWW
Re: Armadillo 4.05
« Respuesta #1 en: 27 Enero 2016, 12:46 pm »

Hola, a la fecha el único script dentro de los mas completos de unpack es:
Citar
// Author:
// SmilingWolf
//
// Script version:
// 1.0
//
// Supported Arma versions:
// 3.70 all the way up to 9.64
//
// Supported protection options:
// Minimal
// Standard
// Standard+DebugBlocker
// DebugBlocker+CopyMemII
//
// Combined with:
// Import Table Elimination
// Strategic Code Splicing
// Memory-Patching Protections
//
// Extra:
// Standard HWID Replacement
// Enhanced HWID Replacement (v5.00+)
// Password Protection Bypass
// Log the VAs of the sections to keep
// If UPX had been used the script will deal with it too
https://forum.tuts4you.com/topic/36970-armadillo-factotum-universal-10/

por otro lado, para analizar las protecciones Está el Amarmadillo Find protected 2.1 de Vel, hay armadillo keygen tool de mr.exodia entre otros
también existe un unpacker genérico de un team inglés Armaggedon pero te recomendaría una versión 1.9 o 2 a lo más


el script anterior solo sirve para copymewII ?,

aún así, he de suponer te estas guiando con tutoriales o estás orientandote que tanto puedes llegar?
bueno me gustaría pensar que no estas ejecutando script así al azar.

si la idea es aprender, coloca http://ricardonarvaja.info/WEB/buscador.php y coloca la palabra "Armadillo"
Saludos Apuromafo
« Última modificación: 27 Enero 2016, 12:48 pm por apuromafo » En línea

Apuromafo
someRandomCode

Desconectado Desconectado

Mensajes: 250



Ver Perfil
Re: Armadillo 4.05
« Respuesta #2 en: 27 Enero 2016, 12:51 pm »

La idea es llegar a ver un MessageBox que tira, y la condicion en la que la tira..
En si el programa tiene un lock por hardware id que me gustaria poder hacer un keygen, y si, estoy siguiendo unos tutos..
Igualmente me fui a registrar en Tuts4you (estaba usando lo que estaba disponible sin registracion) y me quede colgado donde dice decode this string, al principio pense que era ASCII de algo, pero medio como que no era :P

EDIT: no dije nada, ya vi que es octal

EDIT2: Voy a probar el script en OllyDBG2, como adelante, por algun motivo, OllyDBG 1.10 crashea con el programa, vanilla, sin hacer nada, y con proteccion anti-anti-debugging puesta por algunos plugins
« Última modificación: 27 Enero 2016, 13:00 pm por someRandomCode » En línea

apuromafo CLS


Desconectado Desconectado

Mensajes: 1.441



Ver Perfil WWW
Re: Armadillo 4.05
« Respuesta #3 en: 27 Enero 2016, 12:58 pm »

bueno cuando logres registrarte, podrás tener acceso a ese script, por otro lado

si la idea es keygenear, minimo debes conocer todos los armadillos, desde la 3.3 hasta la 9.6
aqui está la herramienta atk
https://github.com/mrexodia/akt


yo he registrado algunos armadillos, y dejé expuesto como lo hacía pero bueno, una cosa a la vez, espero te vaya bien, no es nada del otro mundo, pero necesitarás herramientas para encontrar el valor correcto y saber usar la herramienta.
Saludos Apuromafo

En línea

Apuromafo
tincopasan


Desconectado Desconectado

Mensajes: 1.286

No es lo mismo conocer el camino que recorrerlo.


Ver Perfil
Re: Armadillo 4.05
« Respuesta #4 en: 27 Enero 2016, 17:07 pm »

hace mucho que no miro los armadillos, pero deberías ver una forma de hacerlo manual en vez de un script de terceros(estas versiones eran muy fáciles), como te dijo apuromafo (especialista en armadillo) usá otras herramientas para  ver bien la info del armadillo, si es debug-blocker.copymew y no vaya a ser que tenga nanomites o code splicing, en cuanto al antidebug el que más usa es outputdebugstringa además del isdebuggerpresent
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Armadillo 3.00a-3.61
Ingeniería Inversa
krc_4u 2 3,475 Último mensaje 17 Febrero 2006, 04:36 am
por tena
armadillo v6.0.0.600
Ingeniería Inversa
DArKgØD™ 5 5,110 Último mensaje 19 Junio 2009, 13:35 pm
por Shaddy
ARMADILLO
Ingeniería Inversa
jEUDi17 5 3,306 Último mensaje 30 Agosto 2012, 14:54 pm
por apuromafo CLS
Armadillo 7, protección básica
Ingeniería Inversa
potros 2 2,706 Último mensaje 4 Octubre 2016, 05:36 am
por .:UND3R:.
Armadillo v8.20
Ingeniería Inversa
luisparada 5 4,141 Último mensaje 25 Febrero 2017, 01:30 am
por apuromafo CLS
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines