profile image

L o a d i n g . . .

1. shell에서 python으로 바이너리에 stdin 전달

(python -c 'print "A"*10';cat) | <executable>

 

2. shell에서 python으로 바이너리에 인자 전달

./program `python -c 'print "A"*10'`

 

3. gdb에서 python으로 바이너리에 stdin 전달

r < <(python -c 'print "A"*10')

 

4. gdb에서 python으로 바이너리에 인자 전달

r `python -c 'print "A"*10'`

 

-> 만약 로컬이 아닌 서버에 접속해야 할 경우, 뒤에 | nc (접속정보) 를 붙여준다.

'Hacking > Pwnable' 카테고리의 다른 글

[P4C] Pwnable problem 2  (0) 2021.04.10
[P4C] Pwnable problem 1  (0) 2021.04.10
[Pwnable] Lazenca - ROP(x64) 정리  (0) 2021.03.30
[Pwnable] Lazenca - ROP(x86) 정리  (0) 2021.03.29
[Pwnable] PLT, GOT  (0) 2021.03.21
복사했습니다!