#include <stdio.h>
void function()
{
int modify_me = 8;
char buff[8];
gets(buff);
printf("value is %i", modify_me);
}
int main()
{
function();
}
I am able to modify the variables allocated above the buffer in stack memory. I set the variable modify_me from 8 to 12345
Write the word 'pikachu' followed by nop
perl -e 'print pack("H*", "70696B61636875909090a0");' perl -e "print pack('H*', '48656c6c6f');" > input.bin cat input.bin | hexdump -CCompile with 0 saftey 🫨
gcc program.c -g -fno-stack-protectorstart debuging
gdb a.out
# with pipe redirection
(gdb) start < input.bin x/10xw $sp
# view hex bytes
x/16bx $sp
# view 8 byte chunks fowarding the stack pointer
x/10gx $spAt the time of writing this- this is my 3rd attempt! I tried 2 times back in April & I failed miserably. Looking foward to learning more about software and deployment security in the near future 🙂 ima go touch grass now ive been sitting here forever ha!