Wordpress Pentesting
WordPress Structure
WordPress User Roles
There are five types of users in a standard WordPress installation.
Administrator
This user has access to administrative features within the website. This includes adding and deleting users and posts, as well as editing source code.
Editor
An editor can publish and manage posts, including the posts of other users.
Author
Authors can publish and manage their own posts.
Contributor
These users can write and manage their own posts but cannot publish them.
Subscriber
These are normal users who can browse posts and edit their profiles.
WPScan
Basic Scan
Enumerate Plugins using WPScan
Enumerate Users using WPScan
WPScan Aggressive Mode Plugins
ALL in ONE WPSCAN Command
Normal WPSCAN Bruteforce Attack
BruteForce attack using WPScan
WPScan can be used to brute force usernames and passwords. The scan report returned three users registered on the website: admin
, roger
, and david
. The tool uses two kinds of login brute force attacks, xmlrpc
and wp-login
. The wp-login
method will attempt to brute force the normal WordPress login page, while the xmlrpc
method uses the WordPress API to make login attempts through /xmlrpc.php
. The xmlrpc
method is preferred as it is faster.
RCE using ThemeEditor
we need to login as Administrator on WordPress Portal, then you need to go to theme editor page
edit the 404 theme and add the reverse shell in it
or you can also add the below code as well
now save it and visit the below url to access it and execute it
and we have successfull RCE.
XMLRPC.php
It is important to note that xmlrpc.php
being enabled on a WordPress instance is not a vulnerability. Depending on the methods allowed xmlrpc.php
can facilitate some enumeration and exploitation activities, though.
if we have a username and password for the admin user we can try to get the information utilizing the xmlrpc.php
Last updated