天天看點

sqlmap學習(十三)枚舉資訊

1、sqlmap列舉資料庫名

參數:

--dbs

2、sqlmap列舉資料庫表

參數:

--tables

擷取全部表名

-D

資料庫名 擷取指定資料庫中的表

python sqlmap.py -u "http://172.17.0.1/Less-1/?id=1" --tables -D 資料庫名
           

--exclude-sysdbs

可排除系統資料庫

3、sqlmap列舉資料表列

參數:

--columns,-D指定資料庫,-T指定資料表,-C指定具體字段

python sqlmap.py -u "http://172.17.0.1/Less-1/?id=1" --columns -D mysql -T user -C Update_priv
           

4、sqlmap枚舉資料值

參數:

--dump

檢視具體字段資訊

檢視字段對應的資料值

5、sqlmap枚舉schema資訊

參數:

--schema

--exclude-sysdbs

列舉資料庫管理系統的模式。模式清單包含所有資料庫、表、列、觸發器和他們各自的類型。

可以用參數

--exclude-sysdbs

排除系統資料庫。

6、sqlmap檢索資料數量

參數:

--count

表中的資料個數而不是具體的内容

7、sqlmap選擇資料資訊

參數:

--start、--stop和--where

列舉部分資料使用參數

--start

--stop

檢視第三條和第四條資料

列舉第一條資料使用

--stop 1

參數:

--pivot-column

sqlmap無法檢測主鍵時使用該參數手動指定中軸列,如:

--pivot-column=id

參數:

--where

設定條件

sqlmap學習(十三)枚舉資訊

8、sqlmap暴力破解資料

暴力破解表名和列名

參數:

--common-tables

--common-columns

某些情況下用

--tables

--columns

不能列出資料庫中表名來

版本小于5.0的MySQL沒有information_schema表

微軟Access的MSysObjects表預設不可讀

資料庫使用者權限過低無法讀取表名

當無法讀出表名時可以使用參數

--common-tables

暴力破解表名

當無法讀出列名時可以使用參數

--common-columns

暴力破解列名

9、sqlmap讀取檔案

參數:

--file-read

當資料庫管理系統是MySQL、PostgreSQL或微軟的SQL Server且目前使用者有讀取檔案相關權限時讀取檔案。

10、sqlmap寫入檔案

參數:

--file-write

--file-dest

--file-write

是讀取本地檔案

--file-dest

将讀取到的檔案寫入到遠端絕對路徑

當資料庫管理系統是MySQL、PostgreSQL或微軟的SQL Server且目前使用者有寫檔案相關權限時上傳檔案是可行的。

11、sqlmap檢索所有資訊

參數:

-a

--all