728x90


기본적으로 로그인 페이지 쿼리는 select * from user where id='{ }' and pw='{}' 이러한 쿼리 형태입니다.

이 문제의 쿼리 형태는 select * from users where userid="{userid}" and userpassword="{userpassword}"입니다.
userid 값에는 admin이 들어가고 "(쌍따옴표)를 뒤에 넣어 형식을 맞춰 줍니다.
그다음 and 문으로 뒤에 값을 참으로 만든 다음 --(주석)을 사용해 뒤 부분을 생략해 줍니다.
완성된 쿼리는 select * from users where userid="{admin"and1=1--}" and userpassword="{userpassword}"입니다.
728x90
'모의해킹 > Dreamhack' 카테고리의 다른 글
| devtools-sources [WEB LEVEL 1] (0) | 2023.03.22 |
|---|---|
| file-download-1 [WEB LEVEL 1] (0) | 2023.03.21 |
| session-basic [WEB LEVEL 1] (0) | 2023.03.15 |
| XSS-1 [WEB LEVEL 1] (0) | 2023.03.14 |
| cookie [WEB LEVEL 1] (0) | 2023.03.13 |