Module 16: Assembling the Pieces: Web Application Assessment Breakdown
Introduction to WEB-200 Challenge Machines
Welcome to the Challenge Machines
These fall between the sandbox and the cast study machines, running custom-designed applications intended to mimic real-world applications. You may need to combine multiple attacks or apply techniques in different ways to exploit them.
Starting and Accessing Challenge Machines
Start, revert, or stop the challenge machines from the Labs page. Add them to your hosts file for ease of access.
Completing Challenge Machines
Each challenge machine contains two flags. Each machine may be different, but generally, there is a local.txt obtained within the application after performing an authenticated bypass attack. The proof.txt requires gaining a shell on the machine.
Web Application Enumeration
Accessing the Challenge Machine
Start the VPN, the VM, and add its ip/hostname to your hosts file.
Basic Host Enumeration and OS Detection
Run nmap to identify open ports and other information.
Basic nmap scan of the challenge machine
Nmap scan with OS discovery enabled
Content Discovery






Running gobuster against the challenge machine



Authentication Bypass
Finding a Directory Traversal


Nmap scan excerpt

Exploiting a Directory Traversal
Contents of paths.txt
Contents of files.txt
Wfuzz results
Using curl to access application.properties

Remote Code Execution
Finding SQL Injection
HTTP Request to Delete a Message


Excerpt from application.properties

Wordlist of potential table names
Base INSERT statement payload
Using Wfuzz to send SQL injection attacks

Exploit SQL Injection for RCE
Excerpt from application.properties
Base SQL payload to enable advanced options

Base SQL payload to enable xp_cmdshell

Starting a netcat listener on port 8000
Base SQL payload to invoke curl using xp_cmdshell

Netcat listener received an HTTP request
Obtaining a Shell
Java Reverse Shell example
An example Hello World application
Creating a file for our reverse shell
Basic Java class code
Import statements
Java Reverse Shell
Java compiler error
Updated main() method declaration
Starting a python http server to host our shell
Base SQL injection payload to download the reverse shell

Python HTTP Server log
Starting a netcat listener on port 4444
Base SQL injection payload to run our Java reverse shell

Netcat received our reverse shell
Conclusion
Good job, you did it.
Last updated