Git Product home page Git Product logo

ethicalpentesting-pwnchallenge-1's Introduction

EthicalPenTesting-PWNChallenge-1

This project is the first CTF challenge completed for my Ethical Pen Testing Course at CMU

Topics, Skills & Tools Used

  • Kali Linux
  • NMap / Network scanning
  • Metasploit
  • Meterpreter shells
  • Privilege escalation
  • Portfwd / pivoting

Results and Recommendations

The host 10.20.160.41 was easily compromised utilizing an existing exploit for a vulnerabile FTP service running on port 21.

Once access to this host was gained, a .bat file containing user credentials in plaintext was found that when run, opened a vulnerable SSH service on the second host. It was possible to use portfwd to pivot into this host and find the second flag.

My recommendations are to evaluate the services running on all hosts. If they are essential services, update them to the most recent version. If they are not essential, terminate them.

More importantly, users should be educated on how to store credentials and told to delete or remove any files that contain passwords.

Project details

I included my PDF submission in this repository, although it had many issues like the executive summary being too technical, and the second flag not being found. In this section I will walk through this project in a more succinct manner.

Step 1:

As with any CTF challenge, I started out with some basic network scans to see some potential points of entry. The rules of engagement specified two host ranges to attack: 10.20.160.10-150, and 10.20.170.20-100 so both of these ranges were scanned with the commands:

nmap -open 10.20.160.10-150

nmap -open 10.20.170.20-100

The results are shown in this screenshot: image

Step 2

Based on the initial scan results, it is clear that 10.20.160.41 will be the host we will likely have to target first. Next I did a more detailed scan of this host with the following command:

nmap -A 10.20.160.41

(maybe overly aggressive, I know) The results of the scans are as follows:

image

The open port 21 running a "Konica Minolta FTP Utility" stood out as being highly likely to be vulnerable.

Step 3

Next, I began searching through Metasploit for existing exploits. Many exploits related to "Konica Minolta" existed so I figured I was on the right track:

image

After many attempts at different exploits, finally one was found that successfully opened a meterpreter shell:

image

Step 4

With a meterpreter session open, I was free to explore the host's file system in which the first flag "proof.txt" was found:

image

The compromised user did not have admin priveleges, so I would have to find another way to gain access to the second system.

Step 5

In the first host's files, a batch file was found with plaintext credentials stored in it:

image

This batch file could be run to start an SSH service on host 10.0.170.87. From here a serious of attempts were made to use portfwd to pivot in to the now open SSH client on the new host.

image

image

Ultimately I was not able to gain access to the second host, although using portfwd was the correct solution.

ethicalpentesting-pwnchallenge-1's People

Contributors

danmolenhouse avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.