App - System

Wednesday 7 June 2017, 10:32  #1
64 Bits Linux Stack Based Buffer Overflow
Constaintine
  • 12 posts

Hi you guys,
I can try to pass parameter into gdb. After I ran program, I pass parameter by python command like that: `run $(python -c ’print "A"*300’)`. But It do not work!
Giving me solutions! Please. Thanks

Friday 4 August 2017, 20:39  #2
64 Bits Linux Stack Based Buffer Overflow
rsrsl
  • 1 posts

Hi,
As you see from the source code, the input is not passed as a command-line argument (as you do if you use `run blablabla`).
The input to the program is read with `scanf`. You can use redirection from a file in gdb as `run < yourinputfile`.
Hope this helps!

Friday 18 August 2017, 15:48  #3
64 Bits Linux Stack Based Buffer Overflow
0x0A
  • 1 posts

I hope you understand . Here is an exemple:
echo python -c ’print "A"*300’ > yourfile.txt
In the final you run in gdb
run < yourfile.txt