Let's suppose this (very ugly) c code:
#include <stdio.h>
#include <string.h>
#include <signal.h>
char sav_argv[100];
void on_sigtrap(int signo)
{
if (strcmp(sav_argv, "hello") == 0)
{
printf("OK!\n");
} else {
printf("NOK\n");
}
}
int main(int argc, char *argv[])
{
memset(sav_argv,100,0);
memcpy(sav_argv,argv[1],100);
signal(SIGTRAP,on_sigtrap);
__asm__("int3");
return 0;
}
I have compiled this c program with gcc (linux 64 bits elf).
What i want to do is to solve it with an angr python script. It does work if i remove the debuger trap but it does not work with debuger trap.
Is there a way to make angr work on this c program ?
Thanks
int3
. Docs. – 0xec Aug 6 '18 at 20:15jump(addr)
to transfer control to the handler. – 0xec Aug 7 '18 at 6:21