Hello,
We are going to exploit one of OffSec Proving Grounds Medium machines which called BTRSys2.1
and this post is not a fully detailed walkthrough, I will just go through the important points during the exploit process.
Enumeration:
- Nmap:
Getting Shell:
- Wordpress running on port
80
, you can login with Creds:- User:
admin
- Pass:
admin
- User:
Edit the theme and add your payload to any writable php file:
- Access the shell:
Privilege Escalation:
- Mysql Creds:
found in wp-config.php for wordpress
:
1
2
3
4
5
/** MySQL database username */
define('DB_USER', 'root');
/** MySQL database password */
define('DB_PASSWORD', 'rootpassword!');
Enumerating Mysql:
- Databases:
1 2 3 4 5 6 7 8 9 10 11
+--------------------+ | Database | +--------------------+ | information_schema | | deneme | | mysql | | performance_schema | | phpmyadmin | | sys | | wordpress | +--------------------+
- Explore
wordpress
DB:1 2 3 4 5 6 7 8 9 10 11 12
mysql> use wordpress; mysql> show tables; +----------------------------+ | Tables_in_wordpress | +----------------------------+ | wp_abtest_experiments | . . . | wp_usermeta | | wp_users | +----------------------------+
- Getting password for
btrisk
user then getting root:
Happy Hacking!
Comments powered by Disqus.