在我们的GitHub上的Exploit Database存储库中包含一个名为"searchsploit"的Exploit-DB的命令行搜索工具,该工具还允许您在任何地方随身携带一个Exploit Database的副本。SearchSploit使您可以通过本地签出的存储库副本执行详细的脱机搜索。这种能力对于没有互联网接入的隔离或空隙网络的安全评估特别有用。

  

  上面说的是在没有互联网接入的情况下特别有用,其实更多的是刷了半天刷不出验证码的时候,于是就转向SearchSploit。

  SearchSploit简单来说就是Exploit Database的离线版本,我们可以在本机保存这样一份漏洞数据库,可以通过SearchSploit进行检索,就不用刷验证码了。

  本文就简单介绍一下SearchSploit的一些常用使用示例,可以在官方文档看到。

  可以在kali的命令行下直接输入:searchsploit -h ,查看帮助文档:

  1. root@kali:~# searchsploit -h
  2. Usage: searchsploit [options] term1 [term2] ... [termN]
  3.  
  4. ==========
  5. Examples
  6. ==========
  7. searchsploit afd windows local
  8. searchsploit -t oracle windows
  9. searchsploit -p
  10. searchsploit linux kernel 3.2 --exclude="(PoC)|/dos/"
  11.  
  12. For more examples, see the manual: https://www.exploit-db.com/searchsploit/
  13.  
  14. =========
  15. Options
  16. =========
  17. -c, --case [Term] Perform a case-sensitive search (Default is inSEnsITiVe).
  18. -e, --exact [Term] Perform an EXACT match on exploit title (Default is AND) [Implies "-t"].
  19. -h, --help Show this help screen.
  20. -j, --json [Term] Show result in JSON format.
  21. -m, --mirror [EDB-ID] Mirror (aka copies) an exploit to the current working directory.
  22. -o, --overflow [Term] Exploit titles are allowed to overflow their columns.
  23. -p, --path [EDB-ID] Show the full path to an exploit (and also copies the path to the clipboard if possible).
  24. -t, --title [Term] Search JUST the exploit title (Default is title AND the file's path).
  25. -u, --update Check for and install any exploitdb package updates (deb or git).
  26. -w, --www [Term] Show URLs to Exploit-DB.com rather than the local path.
  27. -x, --examine [EDB-ID] Examine (aka opens) the exploit using $PAGER.
  28. --colour Disable colour highlighting in search results.
  29. --id Display the EDB-ID value rather than local path.
  30. --nmap [file.xml] Checks all results in Nmap's XML output with service version (e.g.: nmap -sV -oX file.xml).
  31. Use "-v" (verbose) to try even more combinations
  32. --exclude="term" Remove values from results. By using "|" to separated you can chain multiple values.
  33. e.g. --exclude="term1|term2|term3".
  34.  
  35. =======
  36. Notes
  37. =======
  38. * You can use any number of search terms.
  39. * Search terms are not case-sensitive (by default), and ordering is irrelevant.
  40. * Use '-c' if you wish to reduce results by case-sensitive searching.
  41. * And/Or '-e' if you wish to filter results by using an exact match.
  42. * Use '-t' to exclude the file's path to filter the search results.
  43. * Remove false positives (especially when searching using numbers - i.e. versions).
  44. * When updating or displaying help, search terms will be ignored.

更新

  使用"-u"选项,将exploit-db更新到最新状态:

  1. root@kali:~# searchsploit -u

基本搜索

  比如,要搜索squirrelmail历史上出现过的漏洞:

  1. root@kali:~# searchsploit squirrelmail
  2. ---------------------------------------------------------------------- ----------------------------------
  3. Exploit Title | Path
  4. | (/usr/share/exploitdb/platforms/)
  5. ---------------------------------------------------------------------- ----------------------------------
  6. SquirrelMail - 'chpasswd' Buffer Overflow | linux/local/.c
  7. SquirrelMail - 'chpasswd' Local Privilege Escalation (Brute Force) | linux/local/.c
  8. SquirrelMail 1.2. - 'move_messages.php' Arbitrary File Moving | php/webapps/.txt
  9. SquirrelMail 1.2. - Exploit | php/webapps/.txt
  10. SquirrelMail 1.2. Administrator Plugin - 'options.php' Arbitrary Ad | php/webapps/.txt
  11. SquirrelMail 1.2./1.2. - Cross-Site Scripting Multiple Vulnerabilit | php/webapps/.txt
  12. SquirrelMail 1.2.x - From Email Header HTML Injection | php/webapps/.txt
  13. SquirrelMail 1.2.x - Theme Remote Command Execution | php/webapps/.sh
  14. SquirrelMail 1.4. Address Add Plugin - 'add.php' Cross-Site Scriptin | php/webapps/.txt
  15. SquirrelMail 1.4.x - Folder Name Cross-Site Scripting | php/webapps/.txt
  16. SquirrelMail .x - Email Header HTML Injection | linux/remote/.txt
  17. SquirrelMail 3.1 - Change Passwd Plugin Local Buffer Overflow | linux/local/.c
  18. SquirrelMail < 1.4. - Remote Code Execution | linux/remote/.sh
  19. SquirrelMail G/PGP Encryption Plugin - 'deletekey()' Command Injectio | php/webapps/.rb
  20. SquirrelMail G/PGP Encryption Plugin 2.0 - Command Execution | php/webapps/.txt
  21. SquirrelMail G/PGP Encryption Plugin 2.0/2.1 - Access Validation / In | php/webapps/.txt
  22. SquirrelMail G/PGP Encryption Plugin 2.0/2.1 - Multiple Unspecified R | php/webapps/.txt
  23. SquirrelMail PGP Plugin - Command Execution (SMTP) (Metasploit) | linux/remote/.rb
  24. SquirrelMail Virtual Keyboard Plugin - 'vkeyboard.php' Cross-Site Scr | php/webapps/.txt
  25. Squirrelmail 1.4.x - 'Redirect.php' Local File Inclusion | php/webapps/.txt
  26. ---------------------------------------------------------------------- ----------------------------------

  searchsploit的搜索语句是 and 的关系,条件越多,得到的搜索结果也就越少,有时要注意放宽搜索条件。

  比如要搜索squirrelmail 爆出的远程代码执行漏洞:'squirrelmail remote code execution'

  1. root@kali:~# searchsploit squirrelmail remote code execution
  2. ---------------------------------------------------------------------- ----------------------------------
  3. Exploit Title | Path
  4. | (/usr/share/exploitdb/platforms/)
  5. ---------------------------------------------------------------------- ----------------------------------
  6. SquirrelMail < 1.4. - Remote Code Execution | linux/remote/.sh
  7. ---------------------------------------------------------------------- ----------------------------------
  8. root@kali:~#

按标题搜索

  默认情况下,searchsploit将检查漏洞的标题以及路径。根据搜索条件,这可能会有误报(尤其是在搜索与平台和版本号匹配时)。可以使用"-t"选项将搜索限制在标题中:

  1. root@kali:~# searchsploit -t oracle windows
  2. ---------------------------------------------------------------------- ----------------------------------
  3. Exploit Title | Path
  4. | (/usr/share/exploitdb/platforms/)
  5. ---------------------------------------------------------------------- ----------------------------------
  6. Oracle 10g (Windows x86) - 'PROCESS_DUP_HANDLE' Local Privilege Escal | win_x86/local/.c
  7. Oracle 9i XDB (Windows x86) - FTP PASS Overflow (Metasploit) | win_x86/remote/.rb
  8. Oracle 9i XDB (Windows x86) - FTP UNLOCK Overflow (Metasploit) | win_x86/remote/.rb
  9. Oracle 9i XDB (Windows x86) - HTTP PASS Overflow (Metasploit) | win_x86/remote/.rb
  10. Oracle MySQL (Windows) - FILE Privilege Abuse (Metasploit) | windows/remote/.rb
  11. Oracle MySQL (Windows) - MOF Execution (Metasploit) | windows/remote/.rb
  12. Oracle MySQL for Microsoft Windows - Payload Execution (Metasploit) | windows/remote/.rb
  13. Oracle VM VirtualBox 5.0. r112930 (x64) - Windows Process COM Injec | win_x86-/local/.txt
  14. Oracle VirtualBox Guest Additions 5.1. - Unprivileged Windows User- | multiple/dos/.cpp
  15. ---------------------------------------------------------------------- ----------------------------------

复制到剪贴板

  现在我们已经找到了我们正在寻找的漏洞,有很多方法可以快速访问它。通过使用"-p",我们可以获得更多关于漏洞利用的信息,以及将利用漏洞的完整路径复制到剪贴板上,以上面的squirrelmail RCE为例,其编号是41910:

  1. root@kali:~# searchsploit
  2. ---------------------------------------------------------------------- ----------------------------------
  3. Exploit Title | Path
  4. | (/usr/share/exploitdb/platforms/)
  5. ---------------------------------------------------------------------- ----------------------------------
  6. SquirrelMail < 1.4. - Remote Code Execution | linux/remote/.sh
  7. ---------------------------------------------------------------------- ----------------------------------
  8. root@kali:~# searchsploit -p .sh
  9. Exploit: SquirrelMail < 1.4. - Remote Code Execution
  10. URL: https://www.exploit-db.com/exploits/41910/
  11. Path: /usr/share/exploitdb/platforms/linux/remote/.sh
  12.  
  13. Copied EDB-ID #'s path to the clipboard.

显示网址

  我们用searchsploit进行搜索的时候,显示的有两列:标题和路径,我们可以使用"-w" 选项,让路径那一列显示为URL地址,这样就能通过浏览器打开:

  1. root@kali:~# searchsploit -w phpmailer
  2. ------------------------------------------------------------ --------------------------------------------
  3. Exploit Title | URL
  4. ------------------------------------------------------------ --------------------------------------------
  5. PHPMailer 1.7 - 'Data()' Remote Denial of Service | https://www.exploit-db.com/exploits/25752/
  6. PHPMailer < 5.2. - Remote Code Execution (Bash) | https://www.exploit-db.com/exploits/40968/
  7. PHPMailer < 5.2. - Remote Code Execution (PHP) | https://www.exploit-db.com/exploits/40970/
  8. PHPMailer < 5.2. - Remote Code Execution (Python) | https://www.exploit-db.com/exploits/40974/
  9. PHPMailer < 5.2. - Sendmail Argument Injection (Metasploi | https://www.exploit-db.com/exploits/41688/
  10. PHPMailer < 5.2. - Remote Code Execution | https://www.exploit-db.com/exploits/40969/
  11. PHPMailer < 5.2. / SwiftMailer < 5.4.-DEV / Zend Framewo | https://www.exploit-db.com/exploits/40986/
  12. PHPMailer < 5.2. with Exim MTA - Remote Code Execution | https://www.exploit-db.com/exploits/42221/
  13. PHPMailer < 5.2. - Local File Disclosure | https://www.exploit-db.com/exploits/43056/
  14. WordPress PHPMailer 4.6 - Host Header Command Injection (Me | https://www.exploit-db.com/exploits/42024/
  15. ------------------------------------------------------------ --------------------------------------------

  简要介绍如上。

SearchSploit的更多相关文章

  1. 如何使用kali的Searchsploit查找软件漏洞

    Searchsploit Searchsploit会通过本地的exploit-db, 查找软件漏洞信息 打开kali的命令行, 输入: searchsploit 查看系统帮助 查找mssql的漏洞 如 ...

  2. linux提权 searchsploit 使用规范

    使用 searchsploit 时,要把整个控制台最大化,这样才能显示完整的漏洞信息. 查看漏洞帮助文件:

  3. 小白日记24:kali渗透测试之提权(四)--利用漏洞提权

    利用漏洞提权实例 前提:已渗透进一个XP或2003系统 一.实验目标漏洞:Ms11-080 补丁:Kb2592799 漏洞信息:https://technet.microsoft.com/librar ...

  4. 小白日记19:kali渗透测试之选择和修改EXP

    EXP 目的:学会选择和修改网上公开的漏洞利用代码[EXP(python\perl\ruby\c\c++....)] 方法: 1.Exploit-db[kali官方维护的漏洞利用代码库] 2.Secu ...

  5. 小白日记15:kali渗透测试之弱点扫描-漏扫三招、漏洞管理、CVE、CVSS、NVD

    发现漏洞 弱点发现方法: 1.基于端口服务扫描结果版本信息,比对其是否为最新版本,若不是则去其 官网查看其补丁列表,然后去逐个尝试,但是此法弊端很大,因为各种端口应用比较多,造成耗时大. 2.搜索已公 ...

  6. sqlmap命令

    -u #注入点 -f #指纹判别数据库类型 -b #获取数据库版本信息 -p #指定可测试的参数(?page=1&id=2 -p "page,id") -D "& ...

  7. Basic Linux Privilege Escalation

    (Linux) privilege escalation is all about: Collect - Enumeration, more enumeration and some more enu ...

  8. 无需sendmail:巧用LD_PRELOAD突破disable_functions

    *本文原创作者:yangyangwithgnu,本文属FreeBuf原创奖励计划,未经许可禁止转载 摘要:千辛万苦拿到的 webshell 居然无法执行系统命令,怀疑服务端 disable_funct ...

  9. Hacking Box Droopy: v0.2

    概述: 目标:get flag 下载链接: https://www.vulnhub.com/entry/droopy-v02,143/ 工具: kail linux 开工 1)扫描开道: # netd ...

随机推荐

  1. mybatis的setting

    在mybaits中,setting的的配置参数如下(如果不在配置文件中配置将使用默认值): 设置参数 描述 有效值 默认值 cacheEnabled 该配置影响的所有映射器中配置的缓存的全局开关 tr ...

  2. TypeError: to_categorical() got an unexpected keyword argument 'nb_classes'

    在学习莫烦教程中keras教程时,报错:TypeError: to_categorical() got an unexpected keyword argument 'nb_classes',代码如下 ...

  3. Oracle 双字段过滤

    白名单:数据 id ,  g_id,sys_id 1,2,3 1,2,4   黑名单:数据 id ,  g_id,sys_id b,2,3   结果  1,2,4      select t1.*   ...

  4. 【题解】JSOI2009球队收益 / 球队预算

    为什么大家都不写把输的场次增加的呢?我一定要让大家知道,这并没有什么关系~所以 \(C[i] <= D[i]\) 的条件就是来卖萌哒?? #include <bits/stdc++.h&g ...

  5. What?

    What? 本文主要讲解一下kubernetes周边的概念,可以说是一小部分的生态圈,逐渐了解一下,走进kubernetes的世界.请读者在读的时候,带着批判的态度去读. 一张概览图: 云计算: 原文 ...

  6. BZOJ 2580: [Usaco2012 Jan]Video Game

    2580: [Usaco2012 Jan]Video Game Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 142  Solved: 96[Subm ...

  7. 洛谷 P2389 电脑班的裁员 解题报告

    题意: 给定一段长为N的序列,选取其中的至多M段使这些子段和最大. 当N=1000时,我们可以采用动态规划解法 令\(dp[i][j][k]\)代表当前选至位置\(i\)处于第\(j\)段当前是否选取 ...

  8. BGP的那些安全痛点(转)

    0x00 BGP(RFC 1771. RFC 4271)定义 全称是Border Gateway Protocol, 对应中文是边界网关协议,最新版本是BGPv4. BGP是互联网上一个核心的互联网去 ...

  9. 【数学】【P5150】 生日礼物

    Description 给定 \(n\),求 \[\sum_{i}~\sum_j~[lcm(i,j)~=~n]\] input 一行一个整数代表 \(n\) Output 一行一个整数代表答案 Hin ...

  10. C/C++:文本查询(单词查询)

    如题: C/C++: Textqurey.h(方便看都在.h里实现了): // // Created by 徐爱东 on 17/7/10. // #ifndef TEXTQUERY_TEXTQUERY ...