Fading Coder

One Final Commit for the Last Sprint

Home > Notes > Content

Network Penetration Testing via Sunflower Remote Access

Notes 1

Target Environment Overview

Initial access was obtained through Sunflower remote management credentials on an unattended operations machine. The objective involves internal network penetration with three flags: flag1 on a DMZ web server user desktop, flag2 in the administrator folder on the same web server, and flag3 in C:\flag on a core data network file server. Scoring is 300, 300, and 400 points respectively.

Acquiring Flag1 from DMZ Web Server

Network Discovery

After accessing the operations machine via Sunflower, network configuration was checked using ipconfig. The machine resided in the 192.168.23.0/24 subnet. A network sweep with nmap -sn 192.168.23.0/24 identified the target web server at 192.168.23.130.

Port Scanning and Service Identification

A port scan was executed with nmap -sS -p 1-10000 -v 192.168.23.130. Among the open ports, 4498 and 5040 required further investigation. Service detection via nmap -p 4498,5040 -sV 192.168.23.130 revealed that port 4498 hosted ms-wbt-server (Microsoft Remote Desktop Services).

Credential Brute-Forcing and Access

Using Hydra, the RDP service was attacked with hydra -l guest1 -p guest1 -t 1 -w 1 rdp://192.168.23.130:4498, confirming the credentials. Remote Desktop Connection was used to access the server, and flag1 was retrieved from the user's desktop.

Escalating to Flag2 on Web Server

Privilege Escalation Approach

Access to the administrator folder was denied. Browser password extraction was attempted using HackBrowserData, successfully recovering the administrator password @Asdf1234.

Gaining Administrative Access

With the obtained credentials, an elevated command prompt was launched. This provided access to the administrator user folder, allowing flag2 to be collected.

Lateral Movement to Flag3 on Core Data Server

Internal Network Reconnaissance

A check of the web server's network interfaces revealed an additional subnet: 192.168.171.0/24. A host discovery scan (nmap -sn 192.168.171.0/24) found an active host at 192.168.171.129.

Credential Harvesting and Cracking

Mimikatz was executed with elevated privileges to dump password hashes from the Local Security Authority (LSA):

privilege::debug
token::elevate
lsadump::sam
exit

The resulting NTLM hashes were saved to a file. Hashcat was used to crack them with the command:

hashcat -m 1000 -a 0 -o cracked.txt --force hash_list.txt password_dictionary.txt

This revealed the cleartext password @ASDFqwer123 for the user asdfqwer.

Establishing IPC Connection and Retrieving Flag

An IPC connection was established to the target file server using the cracked credentials:

net use \\192.168.171.129\IPC$ "@ASDFqwer123" /user:"asdfqwer"

Finally, flag3 was read directly from the remote filesystem:

type \\192.168.171.129\c$\flag\flag3.txt

Related Articles

Designing Alertmanager Templates for Prometheus Notifications

How to craft Alertmanager templates to format alert messages, improving clarity and presentation. Alertmanager uses Go’s text/template engine with additional helper functions. Alerting rules referenc...

Deploying a Maven Web Application to Tomcat 9 Using the Tomcat Manager

Tomcat 9 does not provide a dedicated Maven plugin. The Tomcat Manager interface, however, is backward-compatible, so the Tomcat 7 Maven Plugin can be used to deploy to Tomcat 9. This guide shows two...

Skipping Errors in MySQL Asynchronous Replication

When a replica halts because the SQL thread encounters an error, you can resume replication by skipping the problematic event(s). Two common approaches are available. Methods to Skip Errors 1) Skip a...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.