Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x08048034 0x08048034 0x00100 0x00100 R E 0x4
INTERP 0x000134 0x08048134 0x08048134 0x00013 0x00013 R 0x1
[Requesting program interpreter: /lib/ld-linux.so.2]
LOAD 0x000000 0x08048000 0x08048000 0x005bc 0x005bc R E 0x1000
LOAD 0x0005bc 0x080495bc 0x080495bc 0x00114 0x00118 RW 0x1000
DYNAMIC 0x0005c8 0x080495c8 0x080495c8 0x000e8 0x000e8 RW 0x4
NOTE 0x000148 0x08048148 0x08048148 0x00044 0x00044 R 0x4
GNU_EH_FRAME 0x000480 0x08048480 0x08048480 0x0003c 0x0003c R 0x4
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RW 0x10
void g(int x) { f(x); }; g(123456);
080483d9 <g>: 80483d9: 55 push ebp 80483da: 89 e5 mov ebp,esp 80483dc: ff 75 08 push [ebp+0x8] 80483df: e8 e7 ff ff ff call 80483cb <f> 80483e4: 83 c4 04 add esp,0x4 80483e7: c9 leave 80483e8: c3 ret
Text
int check_password(char* user, char* file) {
char user_password[32];
scanf("%s", user_password);
// Do more stuff
}
void print_file(char* file) {
int f = open(file);
char buf[32];
read(file, buf, 32);
printf("%s", buf);
}
void a(int a1, int a2, int a3) {}
void b() {}
void c(int c1, int c2) {}
8048455: 83 c4 0c add esp,0xc
8048458: 5b pop ebx
8048459: 5e pop esi
804845a: 5f pop edi
804845b: 5d pop ebp
804845c: c3 ret
Objectif: Exécuter les fonctions dans l'ordre suivant:
Bonus: pop a shell