Blog

Intro
Room Info

π Name
π― Target IP
10.10.54.35
π Difficulty level
π‘Medium
π² Subscription type
Free
π§ OS
Linux
Recon
Add blog.thm to the /etc/hosts file
Start Reconnaissance
Enumerate web server application
http://blog.thm/http://blog.thm/robots.txtDisallow:
/wp-admin/
π© The web server uses the
WordPress 5.0CMS
http://blog.thm/wp-admin/tried default
admin:password- does not work
Perform some SMB enumeration


π Found local user
bjoel
Enumerate all the WordPress users using WpScan


π Found 2 WordPress users:
bjoel,kwheel
Check for WordPress 5.0 vulnerabilities

There is a vulnerability called WordPress Core 5.0.0 - Crop-image Shell Upload
This module exploits a path traversal and a local file inclusion vulnerability on WordPress versions 5.0.0 and <= 4.9.8. The crop-image function allows a user, with at least author privileges, to resize an image and perform a path traversal by changing the _wp_attached_file reference during the upload. The second part of the exploit will include this image in the current theme by changing the _wp_page_template attribute when creating a post.
Since Karen Wheeler has author access to the blog, brute force the user kwheel.
Navigate to http://blog.thm/wp-login.php and try a password with user kwheel. Copy the HTTP POST request in raw format, it is necessary for the Hydra command.

π
kwheeler:cutiepie1
Exploitation
Use Metasploit with module exploit/multi/http/wp_crop_rce

Download the .pdf file

Privilege Escalation

Try to run /usr/sbin/checker
If ltrace is present on the machine use it. If not, download the file with Meterpreter and check it in Kali with ltrace or Ghidra.
The binary requires the admin environment variable to be declared

Last updated
Was this helpful?