The write-up details a comprehensive penetration test against an environment named "Agent P," which appears to be a simulated corporate network or lab setup designed for ethical hacking training. The tester's journey through the system reveals several security vulnerabilities that were exploited to escalate privileges from low-privileged user accounts to root access. Here’s a summary of the key steps and lessons learned:
Initial Access
-
WordPress Admin Exploitation:
- The attacker gained initial access by exploiting the WordPress admin panel, specifically targeting the theme editor.
- This allowed PHP execution as
www-data, which is a low-privileged web server user.
-
Credential Harvesting:
- By accessing the
wp-config.phpfile, the attacker obtained MariaDB credentials. - Using these credentials, they accessed the database and retrieved SSH credentials for a user named "norm."
- By accessing the
Privilege Escalation
-
SSH Access as Norm:
- The attacker used the harvested SSH credentials to log in as the
normuser. - Upon logging in, the
/root/flag.txtfile was found but could not be read due to insufficient permissions.
- The attacker used the harvested SSH credentials to log in as the
-
World-Readable Configuration File Exploitation:
Read the full article at InfoSec Write-ups - Medium
Want to create content about this topic? Use Nemati AI tools to generate articles, social posts, and more.



