Hack The Box - Lame

Hack The Box - Lame

DISCLAIMER: I am not an expert penetration tester.

For all thoughts, opinions, insights, tools, techniques, tactics, hashtags mentioned below, do verify with industry standard resources and references.

Methods below are for educational purposes and should not be used outside of a practice lab environment or without the express written consent and authorization of all parties involved.

This is my journey to develop as a pentester, internalize methodologies, and attempt to give back to the infosec community by teaching what I learn along the way.

Let's go!

Name: Lame
OS: Linux
Difficulty: Easy
Release: 14 Mar 2017
IP: 10.10.10.3

Hacker Status: Noob

Scanning

Start off with an Nmap scan of the target virtual machine to discover any open ports and services running:

'nmap -A 10.10.10.3'

No alt text provided for this image

From the Nmap scan results we can see that ports #21, #22, #139, and #445 are open, along with service information.

Enumeration

Going down the list, let's start with open port #21 [ftp - vsftpd2.3.4]. From the Nmap scan results above, we can see that 'Anonymous FTP login' is allowed.

FTP is a file transfer protocol used for the transfer of computer files between a client and server on a computer network.

Let's connect to the target machine with FTP, login with anonymous credentials, and view the directory listings:

'ftp 10.10.10.3'

'anonymous'

'[blank]'

'ls -al'

No alt text provided for this image

From the directory result listing, we don't see any files available. Even after changing to the root directory we still don't see any files available.

Let's see if there is further information on the FTP service running by searching 'vsftpd2.3.4' on Google.

No alt text provided for this image

Our first result is a Rapid7 VSFTPD v2.3.4 Backdoor Command Execution exploit, which usually does the trick because Rapid7 exploits are typically exploit modules in Metasploit. BUT, if we look closer we see that the backdoor was removed on 7/3/11, only 3 days after the exploit was introduced and well before our target virtual machine was created.

Let's go back to our Nmap scan results.

Port #22 [OpenSSH 4.7p1] is typically open on most Hack The Box virtual machines, so this isn't our highest priority at the moment.

Let's instead look at ports #139 and #445 which both appear to be running a 'Samba' service. The Nmap scan results don't give us specific SMB service version information, so let's enumerate further with smbmap:

'smbmap -H 10.10.10.3'

No alt text provided for this image

smbmap allows us to enumerate samba share drives across an entire domain. From the results we can see an 'ADMIN$' share drive with 'NO ACCESS' and SMB version 'Samba 3.0.20-Debian'.

Naturally, with new service information we do a quick search and find a Rapid7 command execution exploit for Samba versions 3.0.20 through 3.0.25rc3.

No alt text provided for this image

This appears to be a match made in heaven, let's boot up trusty 'ol Metasploit and give it a go!

Exploitation

Open Metasploit. Type:

'use [exploit]'

'show options' [to show module configuration options]

'set RHOST' [set the remote host to the target IP]

and 'run' to initiate the exploit module.

No alt text provided for this image

From the results we can see that a reverse shell from our target machine was received onto our host machine creating an open command shell session. Use 'shell' command to create an interactive shell. Then validate root user with 'whoami' command.

As always, traverse to user and root directories to pick up flags.

No alt text provided for this image
No alt text provided for this image

Lame.

Aptly named.

No alt text provided for this image

interested in actively following along? Check out the Hack The Box invite code challenge :)

要查看或添加评论,请登录

Micah J.的更多文章

  • Pruning SMB File Shares

    Pruning SMB File Shares

    Unmanaged Shares SMB file shares are like a data garden within an organization. Just as plants grow and expand, file…

  • OWASP-juice-shop-??

    OWASP-juice-shop-??

    The OWASP Juice Shop is an amazingly vulnerable web application by design used for testing and educational purposes…

  • OWASP_Juice_Shop ? part_deux

    OWASP_Juice_Shop ? part_deux

    The OWASP Juice Shop is an amazingly vulnerable web application by design used for testing and educational purposes…

    2 条评论
  • OWASP_Juice_Shop ? part_one

    OWASP_Juice_Shop ? part_one

    The OWASP Juice Shop is an amazingly vulnerable web application by design used for testing and educational purposes…

  • Hack The Box - Jerry

    Hack The Box - Jerry

    DISCLAIMER: I am not an expert penetration tester. For all thoughts, opinions, insights, tools, techniques, tactics…

    4 条评论
  • Hack The Box - Active

    Hack The Box - Active

    DISCLAIMER: I am not an expert penetration tester. For all thoughts, opinions, insights, tools, techniques, tactics…

  • Hack The Box - Devel

    Hack The Box - Devel

    DISCLAIMER: I am not an expert penetration tester. For all thoughts, opinions, insights, tools, techniques, tactics…

    2 条评论
  • Hack The Box - Legacy

    Hack The Box - Legacy

    DISCLAIMER: I am not an expert penetration tester. For all thoughts, opinions, insights, tools, techniques, tactics…

  • Hack The Box - Blue

    Hack The Box - Blue

    DISCLAIMER: I am not an expert penetration tester. For all thoughts, opinions, insights, tools, techniques, tactics…

    6 条评论
  • TO START PRESS ANY KEY "Where's the any key?!"

    TO START PRESS ANY KEY "Where's the any key?!"

    Had an “aha!” moment on my penetration testing journey last weekend. Over the holidays, I started Heath Adam’s…

    7 条评论

社区洞察

其他会员也浏览了