Hacking WordPress
Hacking WordPress
Open in app
Get unlimited access to all of Medium for less than $1/week. Become a member
Hello folks, I am Krishna Agarwal (Kr1shna 4garwal) from India 🇮🇳. An ordinary bug
hunter and So called security researcher :)
Today is my Birthday, So I planned to celebrate it in different way so that’s why I’m writing
about some common vulnerabilities and misconfiguration that I have found in my bug
bounty journey in this writeup :) I hope you’ll learn something new from this series.
I have divided this writeup in two parts. the first one is Water and second is Fire.
This is the part-1 [Water] Of “Hacking the WordPress for fun and profit” series.
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 1/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
So, you all know about WordPress already and if you don’t know what is it then here
is the short intro of WordPress
WordPress is a content management system (CMS) that allows you to host and build
websites. WordPress contains plugin architecture and a template system, so you can
customize any website to fit your business, blog, portfolio, or online store.
0x02 — Enumerate subdomains of target
In my previous writeup, I have Mentioned some methods to enumerate the
subdomains. You can Check it here .
For Chrome
For Firefox
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 2/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 3/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
This part will completely about manual approach, But you can also automate this.
If the wp-json/wp/v2/users is forbidden (403) then you should try the following
bypasses:
/wp-json/wp/v2/users/n
/wp-json/?rest_route=/wp/v2/users/
/wp-json/?rest_route=/wp/v2/users/n
/?author=n
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 4/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
For getting access to admin panel of WordPress Site as admin, We need a Username
and a Password. We can Get the Username from above bug 0x1.
0x06.1 — BurpSuite
8. Start attack
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 5/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
After attack!
(In the above Screenshot, My target has set rate limit protection on wp-login.php, So
that’s why I only input one Password because I already got password from Github
recon)
If your Password match, You’ll Get a 302 status code in burp suite.
0x06.2 — Hydra
hail hydra! 🤩
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 6/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
Sometimes developers forget to hide this sensitive file from production server. So if
you are able to access wp-config.php file and it contains database name, host,
username and password then it is high severity finding.
https://domain.tld/wp-config.php
unfortunately, most of the time it is forbidden but you can try the same file in
different extensions.
For Example:
/wp-config,txt
/wp-config.zip
/wp-config.md
/wp-config.php_orig
/wp-config.bak
wp-config.txt
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 7/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
like https://domain.tld/wp-content/debug.log
wp-content/debug.log
You can call FFUF’s help this time. This is a fantastic tool created by Joohoi to fuzz
the web applications.
If our target is domain.tld then the backup file name will be domain.* (rar, tar.gz,
sql.tar, tar.bzip2, sql.bz2, 7z, tar, tar.bz2, sql.7z, bak, etc)
First of all, we need all the extensions saved in a file. You can use my file :)
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 8/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 9/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
I think this is enough for this Part, I will continue this series in 2023 if you got some
knowledge from this part. else, everything is fine ;)
If I missed something in this write-up, then please DM me or drop a comment. I’ll add it
with your name :)
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 10/19
7/1/23, 9:41 AM Hacking the WordPress sites for fun and profit | Part-1 [ Water ] | by Krishna Agarwal | InfoSec Write-ups
Takeaway: “Don’t assume that you are the only one receiving several duplicates and
N/A. Everybody encounters this. Don’t give up; it is only a phase of the process.”
Be my Friend:
Instagram — https://www.instagram.com/krishnaAgarwal_in
LinkedIn — https://www.linkedin.com/in/kr1shna4garwal
GitHub: https://github.com/kr1shna4garwal/
Twitter — https://twitter.com/kr1shna4garwal
If you found this valuable and have wasted your 10 minutes in reading this and
learned something, then give some claps👏 and drop a comment, Hit the Follow
button for future write-ups and share this with your infosec friends and community.
Signing Off !
From Infosec Writeups: A lot is coming up in the Infosec every day that it’s hard to keep up
with. Join our weekly newsletter to get all the latest Infosec trends in the form of 5 articles, 4
Threads, 3 videos, 2 GitHub Repos and tools, and 1 job alert for FREE!
https://infosecwriteups.com/hacking-the-wordpress-sites-for-fun-and-profit-part-1-water-7ba474ced0f8 11/19