List/Linux

pwntools - shellcode generation

LF0827 2017. 11. 25. 01:08

1. 환경 설정 예제

※ pwntools documents에서는 환경 설정 시 context.binary를 추천


2. open() 예제

e.g.  open("./ABCDEFGHIJKLMN", O_RDONLY)



3. read() 예제

e.g.  read(fd, buff, buff_size) 


※ 'rsp'는 buff주소 대신 rsp에 저장

※ 특정 주소를 지정할 경우 -> sc = pwnlib.shellcraft.amd64.linux.read(3, 0x555555756240, 1024)