드디어 중간 난이도 문제를 풀어봤다.
게시된 순서대로 풀면 최신 연도 문제부터 나오니 하나씩 아무거나 잡고 풀었다.
사이트에 들어가 보니 2개의 메뉴와 사진들이 있었다.
Support 메뉴에 들어가면 3개의 질문과 답변이 있었는데 거기서 알 수 있는 힌트는
1. sql과 관련
2. 유저는 admin 한 명
이라는 사실이었다.
로그인 창에 가보면 단순한 로그인 화면이고 특별한 건 없었다.
소스 검사를 해보니 숨겨져 있는 입력탭이 있는 걸 알게 됐다.
debug?
0을 True값인 1로 바꿔주고 로그인을 해보면
(1 말고도 아무 숫자나 되는 거 같다)
query문과 로그인 실패가 나온다.
sql injection 방법으로 로그인을 할 수 있을 거 같다 생각하고 구글링을 해봤다.
링크▽
https://www.w3schools.com/sql/sql_injection.asp
W3Schools.com
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
SQLi: principles, impacts and security best practices
SQL injections target the databases of applications. Principles, impacts, exploitations, we present an overview of SQLi and the best security practices.
www.vaadata.com
결과로는 OR 1 =1 방법으로 가능하다는 걸 알았다.
로그인 성공과 함께 flag를 얻었다.
문제 하나 성공!
'ctf > Web Exploitation' 카테고리의 다른 글
Irish-Name-Repo 3 문제 풀어보기 (0) | 2025.01.21 |
---|---|
Irish-Name-Repo 2 문제 풀어보기 (1) | 2025.01.20 |
where are the robots 문제 풀어보기 (4) | 2025.01.17 |
Insp3ct0r 문제 풀어보기 (0) | 2025.01.16 |
logon 문제 풀어보기 (1) | 2025.01.15 |
댓글