일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- webhacking
- CTF
- cryptography
- Wargame
- dreamhack
- h4cking game
- webhacking.kr
- hacking
- System Hacking
- got overwrite
- deayzl
- KAIST
- WEB
- 해킹
- Wreckctf
- writeup
- pwnable
- christmas ctf
- 2022 Fall GoN Open Qual CTF
- TeamH4C
- python
- hack
- 워게임
- crypto
- reversing
- ctf player
- hacking game
- Buffer Overflow
- Gon
- 웹해킹
- Today
- Total
목록CTF writeup (16)
deayzl's blog

files: encrypt.c, isThisFileUseful.txt, justBinaries.txt, up_down.py isThisFileUseful.txt: 1001010110001010100011001000101110011110100101001001101010000110 justBinaries.txt: 11110100000101010111111101110011111001001101000010001101101101001100101100000111111110100111000110000001100011011111111101000010001101101100010110100100101100111110000111011111111001001000101010010100100011100000010100010010..

1. crawl import requests s = requests.Session() counter = 1 while True: req = requests.Request('GET', 'http://ctf.incognito.kr:9000/ctf/mailbox') pre = s.prepare_request(req) resp = s.send(pre) csrf = resp.text[resp.text.find("{ \"X-CSRFToken\": '")+len("{ \"X-CSRFToken\": '"):] csrf = csrf[:csrf.find('\'')] req = requests.Request('POST', 'http://ctf.incognito.kr:9000/ctf/mailbox/mail_detail') p..

#!/usr/bin/env python3 from Crypto.Cipher import ARC4 from base64 import b64encode import zlib from secret import flag, key file = {"flag.txt" : flag, "key" : key} def print_menu(): print("1. List file") print("2. Download file") print("3. Add file") print("4. Copy file") print("5. Remove File") print("6. Logout") def download_file(): filename = input("File name >> ").strip() if filename not in ..

undefined8 main(int param_1,undefined8 *param_2) { undefined8 uVar1; long in_FS_OFFSET; long canary; canary = *(long *)(in_FS_OFFSET + 0x28); if (param_1 == 1) { stdinaddr = stdin; } else { if (param_1 != 2) { printf("Usage: %s []\n",*param_2); /* WARNING: Subroutine does not return */ exit(8); } stdinaddr = fopen((char *)param_2[1],"r"); if (stdinaddr == (FILE *)0x0) { printf("%s: Error: Couldn..

제공된 dump.pcap 의 모습이다. wireshark 로 열어주면, http 프로토콜의 패킷을 보게 되는데 url decode 해주면 Time based Sql Injection 을 하는 payload 를 볼 수 있다. http 프로토콜만 나오도록 해주고, timestamp 를 살펴봐서 3초 이상 차이나는 패킷을 확인하면 flag 문자열의 한글자 한글자씩의 아스키 코드를 알 수 있을 것이다. (619번, 623번 패킷의 Time 섹션을 보면 4.7초에서 7.7 초로 넘어간 것을 볼 수 있다) dump 파일을 모두 수작업으로 뒤질 수도 있지만, 그때 당시에 bomblab-hard 문제를 푸느라 바빠서 조금 하다가 포기했다. 그래서 pcap 파일을 직접 뒤져주는 파이썬 라이브러리 dpkt 을 이용해주었다..

ghidra 로 디컴파일 한 모습이다. 일단 arr 의 주소를 확인해보면 맨 밑에 cnt 값이 들어있는 주소가 위치해 있는 것을 알 수 있다. 이 값을 1 이상으로 바꿔주면 루프를 여러번 돌 수 있을 것이다. 그리고 이 elf 파일은 partial relro 라서 got overwrite 가 가능하다. 위쪽에 stdout, stdin 주소가 있다. read index 에 대한 range 설정도 없으니, libc leak 이 가능하다. 그리고 arr 주소와 got 주소의 거리를 계산한 후, 하위 4바이트를 overwrite 해주면 된다. from pwn import * p = remote('host3.dreamhack.games', 22847) e = ELF('/home/kali/Downloads/drea..