본문 바로가기

[ ★ ]Study/CTF8

TUCTF2019 leakalicious writeup Description King Arthur has proposed this challenge for all those who consider themselves worthy. Hint BLUKAT ME! If only we knew what libc to use... Let's pwn 🙂 then, first We can not use shellcode but I get a hint on IDA What... version of libc am I using? I thought we should RTL Then, let's put the pieces for attack If we put A 31 times, e can leak puts function address Next, we need to know .. 2019. 12. 7.
CTF remote environment(socat) -one-time- socat tcp-l:[port],reuseaddr,fork EXEC:[file] -infinite- while true; do socat tcp-l:[port],reuseaddr EXEC:[file]; sleep 1; done ex) socat tcp-l:1234,reuseaddr,fok EXEC:./test_file 2019. 12. 4.
Pwntools 설치(install) 1. apt-get install python2.7-dev python-pip 2. pip install pwntools 3. apt-get install libcapstone-dev 사실 pwntools 은 설치하는 명령어는 간단하지만 설치중에 에러가 많이 발생하여 애먹으시는 분들이 많다... 1번 명령어로 무사 설치 후 2번을 진행할 때 ImportError: No module named setuptools ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-AzIOc3/pwntools/ 위와같은 메시지가 나왔는데 sudo apt-get in.. 2019. 4. 3.
X-MAS 2018 Greetings from Santa 역시 사진 보호 때문에 사진을 올리지 못한다.간단히 메모정도만 보호기법CANARY : disabled FORTIFY : disabled NX : ENABLED PIE : disabled RELRO : Partial 파일 실행시"Greetings from Santa! Wanna talk? " 문구에 입력하면프로그램이 종료된다. 뭔가 이상한 느낌이 들었다. IDA로 String을 찍었을 때What is your name? 후 fgets로 입력받는 구문이 있다. 역으로 다시 살피면 Wassna talke 후 fgets로 입력 받은 후쭉 내려가면 test eax, eax 이 있는데이 구간을 잘 살펴봐주면 된다.y(0x79) 를 가져오는데 입력 값 맨 앞에 y를 넣어주면 잘 넘어간다. * IDA로 봤을 때 분석 .. 2019. 1. 1.
TUCTF2018 Shella_Easy(pwn) - TEXT - Difficulty: easy-ish Want to be a drive-thru attendant? Well, no one does... But! the best employee receives their very own flag! whatdya say? HINT - Ever heard of DEP? I hear it goes well with a side of Shellcode - 보호기법 - DEP = NX bitWin Linux gdb-peda$ checksec CANARY : disabled FORTIFY : disabled NX : disabled PIE : disabled RELRO : Partial - Think -1. buf 의 주소를 알려준다2. 보호기법 없음3. dead.. 2018. 12. 15.
TUCTF2018 - ehh FSB 취약점을 가지는 pwnable problem [nroses@localhost Ehh]$ ./ehh >Input interesting text hereInput interesting text here< [ Value ] 을 출력한다. 2. read를 통해서 0x18 만큼 입력을 받는다. 3. printf( 입력 받은 것 ) 을 실행. 1번에서의 Value 값이 cmp 비교로 0x18이 되어야 /bin/cat/ 실행이 가능하다. 위에서와 깉이 AAAA 입력받고 6번째에서 입력값이 출력되는 것을 알 수.. 2018. 12. 15.