보호되어 있는 글입니다.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155# 2014.02.08 02:00:41 PSTimport timeimpor..
참고한 문서 SROP.pdf 이 포스팅은 위 문서를 기반으로 작성되었습니다. 똑같진 않지만 어느정도 기반으로 exploit이 진행되었기 때문에문제가 된다면 삭제하겠습니다. * 개인 공부용이기 때문에 문서를 보는것이 훨씬 낫습니다. ---------------------------------------- 12345678910111213141516// vuln.c// gcc -o vuln vuln.c -fno-stack-protector -fno-pie -mpreferred-stack-boundary=2 char binsh[] = "/bin/sh\x00"; void int80() // int 0x80 ; gadget{ asm("int $0x80");} void main(void){ char buf[8]; r..
보호되어 있는 글입니다.
Pwnable에는 많은 기법이 있는데, 그중에서 자주 쓰이는 기법들 중 Int Overflow라는 것이 있다.그대로 말하면 정수타입에서 일어나는 Overflow취약점이다. 가령 아래와 같은 코드가 있다. (shell-storm.org에서 받을 수 있음) 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211..
GITS 2012 Pwnable 200Pts 1234567891011~> file ./GITS2012_pwnable200 ./GITS2012_pwnable200: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=c53d1dc1e47bd86dc63c9fba66f4a5c41cf2096d, stripped ~> checksec --file ./GITS2012_pwnable200 RELRO STACK CANARY NX PIE RPATH Partial RELRO No canary found NX disabled No PIE N..
푸는데 5시간 정도 걸린 문제. 분명 그렇게 오래 걸리면 안될 쉬운 문제인데삽질 + 불운 + 귀찮음 덕분에 굉장히 많이 걸렸다.. 123456789# file exploit400 exploit400: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x105e30fbeade2b06f9d82a9ff924871db71cae3c, stripped# checksec --file ./exploit400 RELRO STACK CANARY NX PIE RPATH No RELRO Canary found NX enabled No PI..
Volga CTF 2014 exploit300 12345678910111213141516171819202122232425# Location: /home/john/exploit300.py from sys import modulesmodules.clear()del modules _raw_input = raw_input_BaseException = BaseException_EOFError = EOFError # he-he__builtins__.__dict__.clear()__builtins__ = None print '>>> Just escape me...' while 1: try: d = { 'x' : None} exec 'x='+_raw_input()[:500] in d print 'ret:', d['x'..