sqlmap基本教程

-u #注入點
-f #指紋判別數據庫類型
-b #獲取數據庫版本信息
-p #指定可測試的參數(?page=1&id=2 -p "page,id")
-D"" #指定數據庫名
-T"" #指定表名
-C"" #指定字段
-s"" #保存注入過程到一個文件 ,還可中斷下次恢復在注入 (保存-s "xx.log"
恢復:-s "xx.log"--resume)
--level=(1-5)#要執行的測試水平等級默認爲1
--risk=(0-3) #測試執行的風險等級默認爲1
--time-sec=(2,5)#延遲響應默認爲5
--data#通過POST發送數據
--columns#列出字段
--current-user #獲取當前用戶名稱
--current-db#獲取當前數據庫名稱
--users#列數據庫所有用戶
--passwords#數據庫用戶所有密碼
--privileges#查看用戶權限(--privileges-U root)
-U#指定數據庫用戶
--dbs#列出所有數據庫
--tables-D""#列出指定數據庫中的表
--columns-T"user"-D"mysql"#列出mysql數據庫中的user表的所有字段
--dump-all#列出所有數據庫所有表
--exclude-sysdbs#只列出用戶自己新建的數據庫和表
--dump -T""-D""-C""#列出指定數據庫的表的字段的數據 (--dump-T users-D
master -C surname)
--dump-T""-D""--start2 --top4 # 列出指定數據庫的表的2-4 字段的數據
--dbms# 指定數據庫(MySQL,Oracle,PostgreSQL,Microsoft SQL
Server,MicrosoftAccess,SQLite,Firebird,Sybase,SAPMaxDB)
--os#指定系統(Linux,Windows)
-v #詳細的等級(0-6)
0只顯示Python的回溯錯誤和關鍵消息。
1顯示信息和警告消息。
2顯示調試消息。
3有效載荷注入。
4顯示HTTP請求。
5顯示HTTP響應頭。
6顯示HTTP響應頁面的內容
--privileges #查看權限
--is-dba#是否是數據庫管理員
--roles#枚舉數據庫用戶角色
--udf-inject #導入用戶自定義函數獲取系統權限
--union-check#是否支持union 注入


--union-cols#union 查詢表記錄
--union-test#union 語句測試
--union-use #採用union 注入
--union-tech orderby#union配合order by
--data""#POST方式提交數據(--data "page=1&id=2")
--cookie" 用 ; 號分開"#cookie注入
(--cookies=”PHPSESSID=mvijocbglq6pi463rlgk1e4v52;security=low”)
--referer""#使用referer欺騙(--referer "http://www.baidu.com")
--user-agent"" #自定義user-agent
--proxy"http://127.0.0.1:8118"#代理注入
--string=""#指定關鍵詞,字符串匹配.
--threads#採用多線程(--threads3)
--sql-shell#執行指定sql命令
--sql-query#執行指定的sql 語句 (--sql-query "SELECT password FROM
mysql.userWHERE user = 'root' LIMIT0, 1")
--file-read#讀取指定文件
--file-write #寫入本地文件 (--file-write /test/test.txt--file-dest /var/www/html/1.txt;
將本地的test.txt文件寫入到目標的1.txt)
--file-dest#要寫入的文件絕對路徑
--os-cmd=id#執行系統命令
--os-shell#系統交互shell
--os-pwn#反彈shell(--os-pwn--msf-path=/opt/framework/msf3/)
--msf-path=#matesploit絕對路徑(--msf-path=/opt/framework/msf3/)
--os-smbrelay#
--os-bof#
--reg-read#讀取win系統註冊表
--priv-esc#
--time-sec=#延遲設置 默認--time-sec=5 爲5秒
-p"user-agent"--user-agent"sqlmap/0.7rc1 (http://sqlmap.sourceforge.net)"# 指 定
user-agent注入
--eta#盲注
/pentest/database/sqlmap/txt/
common-columns.txt字段字典
common-outputs.txt
common-tables.txt表字典
keywords.txt
oracle-default-passwords.txt
user-agents.txt
wordlist.txt

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章