ExploitDB 是一個(gè)面向全世界黑客的漏洞提交平臺(tái),該平臺(tái)會(huì)公布最新漏洞的相關(guān)情況,這些可以幫助企業(yè)改善公司的安全狀況,同時(shí)也以幫助安全研究者和滲透測(cè)試工程師更好的進(jìn)行安全測(cè)試工作。Exploit-DB提供一整套龐大的歸檔體系蜗搔,其中涵蓋了各類公開的攻擊事件、漏洞報(bào)告八堡、安全文章以及技術(shù)教程等資源樟凄。
在線查找漏洞代碼
到 https://www.exploit-db.com/上搜索即可。
離線查找漏洞代碼
使用searchsploit命令行工具兄渺。
1不同、更新數(shù)據(jù)庫
? ~ searchsploit -u
[i] Updating via apt package management (Expect weekly-ish updates): exploitdb
Get:1 http://mirrors.aliyun.com/debian stable InRelease [118 kB]
Hit:2 http://mirrors.ustc.edu.cn/kali kali-rolling InRelease
...
2、查看幫助信息
? ~ searchsploit -h
Usage: searchsploit [options] term1 [term2] ... [termN]
==========
Examples
==========
searchsploit afd windows local
searchsploit -t oracle windows
searchsploit -p 39446
searchsploit linux kernel 3.2 --exclude="(PoC)|/dos/"
searchsploit linux reverse password
For more examples, see the manual: https://www.exploit-db.com/searchsploit
=========
Options
=========
-c, --case [Term] 執(zhí)行區(qū)分大小寫的搜索 (默認(rèn)是不敏感)溶耘。
-e, --exact [Term] 對(duì)漏洞標(biāo)題執(zhí)行精確匹配(默認(rèn)是和)[Implies "-t"].
-h, --help 顯示這個(gè)幫助屏幕。
-j, --json [Term] 以JSON格式顯示結(jié)果
-m, --mirror [EDB-ID] 將漏洞鏡像復(fù)制到當(dāng)前工作目錄服鹅。
-o, --overflow [Term] 允許利用標(biāo)題溢出它們的列凳兵。
-p, --path [EDB-ID] 顯示攻擊的完整路徑(如果可能,還將路徑復(fù)制到剪貼板)企软。
-t, --title [Term] 只搜索攻擊標(biāo)題(默認(rèn)是標(biāo)題和文件的路徑)庐扫。
-u, --update 檢查并安裝任何的開發(fā)包更新(deb或git)。
-w, --www [Term] 顯示url到Exploit-DB.com,而不是本地路徑形庭。
-x, --examine [EDB-ID] 使用$PAGER檢查漏洞使用方式铅辞。
--colour 在搜索結(jié)果中禁用顏色高亮。
--id 顯示EDB-ID值萨醒,而不是本地路徑斟珊。
--nmap [file.xml] 使用服務(wù)版本(例如:Nmap -sV -oX file.xml)檢查Nmap XML輸出中的所有結(jié)果。使用“-v”嘗試更多的組合
--exclude="term" 從結(jié)果中排除富纸。通過使用“|”進(jìn)行分隔囤踩,可以將多個(gè)值鏈接起來。e.g. --exclude="term1|term2|term3".
3晓褪、查找漏洞
默認(rèn)情況下 以and 進(jìn)行篩選堵漱,篩選出Metasploit的腳本。
然后把腳本放入msf對(duì)應(yīng)的目錄/usr/share/metasploit-framework/modules/**/之下涣仿,之后在msfconle下執(zhí)行reload_all即可使用勤庐。
? ~ searchsploit exploits linux remote Metasploit Samba
------------------------------------------------------------------------------------------------------------ ----------------------------------------
Exploit Title | Path
| (/usr/share/exploitdb/)
------------------------------------------------------------------------------------------------------------ ----------------------------------------
Samba 2.2.2 < 2.2.6 - 'nttrans' Remote Buffer Overflow (Metasploit) (1) | exploits/linux/remote/16321.rb
Samba 2.2.8 (Linux x86) - 'trans2open' Remote Overflow (Metasploit) | exploits/linux_x86/remote/16861.rb
Samba 2.2.x - 'nttrans' Remote Overflow (Metasploit) | exploits/linux/remote/9936.rb
Samba 3.0.21 < 3.0.24 - LSA trans names Heap Overflow (Metasploit) | exploits/linux/remote/9950.rb
Samba 3.0.24 (Linux) - 'lsa_io_trans_names' Heap Overflow (Metasploit) | exploits/linux/remote/16859.rb
Samba 3.3.12 (Linux x86) - 'chain_reply' Memory Corruption (Metasploit) | exploits/linux_x86/remote/16860.rb
Samba 3.4.16/3.5.14/3.6.4 - SetInformationPolicy AuditEventsInfo Heap Overflow (Metasploit) | exploits/linux/remote/21850.rb
Samba 3.4.5 - Symlink Directory Traversal (Metasploit) | exploits/linux/remote/33598.rb
Samba 3.5.0 < 4.4.14/4.5.10/4.6.4 - 'is_known_pipename()' Arbitrary Module Load (Metasploit) | exploits/linux/remote/42084.rb
------------------------------------------------------------------------------------------------------------ ----------------------------------------
Shellcodes: No Result
4、查看具體ID的功能 利用方式代碼
? ~ searchsploit 42084 --examine
Exploit: Samba 3.5.0 < 4.4.14/4.5.10/4.6.4 - 'is_known_pipename()' Arbitrary Module Load (Metasploit)
URL: https://www.exploit-db.com/exploits/42084
Path: /usr/share/exploitdb/exploits/linux/remote/42084.rb
File Type: Ruby script, ASCII text, with CRLF line terminators
5好港、 拷貝路徑愉镰,或文件
拷貝路徑 : searchsploit -p EDB-ID
拷貝代碼文件到當(dāng)前目錄:searchsploit -m EDB-ID
? ~ searchsploit -p 42084
Exploit: Samba 3.5.0 < 4.4.14/4.5.10/4.6.4 - 'is_known_pipename()' Arbitrary Module Load (Metasploit)
URL: https://www.exploit-db.com/exploits/42084
Path: /usr/share/exploitdb/exploits/linux/remote/42084.rb
File Type: Ruby script, ASCII text, with CRLF line terminators
Copied EDB-ID #42084's path to the clipboard.
? ~ /usr/share/exploitdb/exploits/linux/remote/42084.rb
6、編譯執(zhí)行操作參考:Metasploit實(shí)戰(zhàn):Telnet暴破和提權(quán) 中提權(quán)部分
7媚狰、顯示在線url岛杀,排除關(guān)鍵字
? ~ searchsploit 8572 Local -w --exclude='mp4|PHP'
-------------------------------------------------------------------------------------------------------- --------------------------------------------
Exploit Title | URL
-------------------------------------------------------------------------------------------------------- --------------------------------------------
Linux Kernel 2.6 (Gentoo / Ubuntu 8.10/9.04) UDEV < 1.4.1 - Local Privilege Escalation (2) | https://www.exploit-db.com/exploits/8572
-------------------------------------------------------------------------------------------------------- --------------------------------------------
Shellcodes: No Result