libc database. local에서 사용해보자.
·
Tips & theory
서론 사실 매번 libc-database libc-database libc.rip 에서 검색해서 사용했는데, local에서 사용할 수 있는 방법이 있다. 예전부터 알고 있었는데 사실 그냥 귀찮아서 자세히 찾아보지 않았었고, 그닥 필요 없을거라 생각해서 안썼는데, CTF를 뛰다 ld 파일을 구하기가 힘들어서 사용하게 되었다. 설치 github를 통해 다운로드 가능하다. GitHub - niklasb/libc-database: Build a database of libc offsets to simplify exploitation GitHub - niklasb/libc-database: Build a database of libc offsets to simplify exploitation Build a dat..
/bin/sh 문자열 주소 찾는 방법.
·
Tips & theory
사실 /bin/sh 문자열만 찾는 것은 아니며 이를 활용해서 여러 함수의 주소를 찾을 수 있다. gdb에서 찾기. 보통 system 함수와 함께 쓰이므로 아래와 같이 찾을 수 있다. gef➤ find &system,+999999999,"/bin/sh" 0xb7f8ad4c warning: Unable to access 16000 bytes of target memory at 0xb7fd8f54, halting search. 1 pattern found. gef➤ x/s 0xb7f8ad4c 0xb7f8ad4c: "/bin/sh" 또는 gef 같은 경우 grep 명령어로 찾을 수 있다. gef➤ grep /bin/sh [+] Searching '/bin/sh' in memory [+] In '/usr/lib/..