DEV Community

Timothy Imanuel
Timothy Imanuel

Posted on

Week 7

Ethical Hacking Week 7: Target Exploitation

This week, we’ve finally moved into the hands-on phase of the course: Target Exploitation. This is where we stop looking for doors and start attacking our target.

Metasploit

Our primary focus this week was the Metasploit Framework, the world’s most used penetration testing software. Metasploit is essentially a giant library of pre-made exploits, payloads, and auxiliary tools that simplify the complex process of attacking a target.

Exploiting EternalBlue

In our lab, we tackled one of the most famous vulnerabilities in recent history: EternalBlue. This is a flaw in the Windows SMB protocol that allows for unauthenticated Remote Code Execution.

Here is the standard workflow we used to compromise the target:

  1. Search: Finding the right module for the job (e.g., search eternalblue).
  2. Select: Loading the exploit module (e.g., use exploit/windows/smb/ms17_010_eternalblue).
  3. Configure: Setting our parameters, like RHOSTS (the target’s IP) and the PAYLOAD.
  4. Exploit: Running the command and waiting for the magic to happen.

The Meterpreter Shell

Once the exploit was successful, we dropped into a Meterpreter shell. Meterpreter is an advanced, extensible payload that runs in memory to avoid detection.

Common commands we used to control the target:

  • sysinfo: Displays the target's OS and architecture.
  • getuid: Shows which user we are running as (usually SYSTEM after EternalBlue!).
  • shell: Drops us into a standard Windows Command Prompt for deeper control.

The Rules of Engagement

Even in a lab environment, ethical hacking has strict rules. For our final projects, we have clear boundaries:

  • No DoS/DDoS: We are here to learn, not to crash the server.
  • Integrity: Never change passwords after gaining access.
  • Persistence: Leave a simple text file or post on the target to prove you were there.

Target exploitation is intense and requires precision. Seeing a session open for the first time is an incredible feeling, but it’s a reminder of why security configuration is so important.

Top comments (0)