Rednote
GuidebooksTerminalCode
  • Welcome!
  • Utility
    • General
    • Server
    • Transferring File
      • Main
      • Code
      • Miscellaneous
    • Reverse & Bind Shells
      • Havoc
    • Metasploit
    • Service
      • FTP (21)
      • SSH (22)
      • DNS (53)
      • HTTP/HTTPS (80-443)
      • SMTP (25-465-587)
      • POP3 (110-995)
      • IMAP (143-993)
      • MySQL (3306)
      • MSSQL (1433-2433)
      • SMB (139-445)
      • RDP (3389)
      • WinRM (5985-5986)
      • WMI (135)
      • LLMNR & NBT-NS (5355-137)
      • NFS (111-2049)
      • SNMP (161-162)
      • VNC (5900)
      • Rsync (873)
      • R-Service (512-513-514)
      • IPMI (623)
      • Oracle TNS (1521)
  • Pentesting Process
    • Information Gathering
      • Passive
      • Active
      • OSINT
    • Vulnerability
    • Web Attacks
      • GENERAL
      • Crawling/Spidering & Fuzzing
      • Information Disclosure
      • Command Injection
      • Unrestricted File Upload
      • File Inclusion/Path Traversal
      • Request Smuggling
      • Clickjacking
      • Web Cache Poisoning
      • Web Cache Deception
      • Insecure Deserialization
      • Prototype Pollution
      • OAuth 2.0
      • JWT
      • SQLi
        • sqlmap
      • NoSQLi
      • GraphQL
      • XSS
      • SSRF
      • XXE
      • IDOR
      • API
      • SSTI
      • CSRF
      • CORS
      • AJP
      • SSI
      • ESI
      • XSLT
      • Cloud
      • LLM Prompt Security
    • Software Attacks
      • Binary
      • Shellcode
      • AV Evasion & Obfuscation
    • Network Attacks
      • ARP Poisoning
      • Local DNS Cache Poisoning
      • Baby Local DoS
    • Crypto Attacks
      • Utility
      • RSA
      • DSA/DSS
      • PRNG
        • LGC
        • MT
        • LFSR
    • Misc Attacks
    • Social Engineering
    • Password Cracking
      • Wordlist
      • Offline
      • Online
    • Pivoting & Tunneling
    • Local Enumeration
      • Linux
      • Windows
    • Privilege Escalation
      • Linux
        • Linux Privilege Escalation with Groups
        • Linux Privilege Escalation with Library
      • Windows
        • Windows Privilege Escalation with Groups and Privileges
        • Windows Privilege Escalation with DLL Hijacking
    • Active Directory
      • Enumeration
      • Abuse ACL
      • Extract Hash & Password
      • Pass The Hash
      • Pass The Ticket
      • Overpass the Hash
      • Relay Attack
      • Password Spraying Attack
      • AS-REP Roasting
      • Kerberoasting
      • Silver Ticket
      • Golden Ticket
      • DC Synchronization
      • AD Certificates
      • Attacking Domain Trusts
    • Reports
      • Bug Bounty Report
    • CVE
      • Linux
      • Windows
    • OTHER
      • CMS
        • WordPress
        • Joomla
        • Drupal
      • Tomcat
      • Jenkins
      • Splunk
      • Web Service
      • Navigating Python Objects
      • JavaScript Deobfuscation
  • Extra
    • My Books
    • My Exploits
    • Compiled Binaries
Powered by GitBook
On this page
  • Tools
  • Default File Structure
  • Default Users
  • Manual Enumeration
  • Version
  • Plugins
  • Themes
  • User Enumeration
  • Attacks
  • Built-in

Was this helpful?

  1. Pentesting Process
  2. OTHER
  3. CMS

WordPress

Open-source Content Management System (CMS)

Last updated 4 months ago

Was this helpful?

WordPress is one of the most popular open source Content Management Systems (CMS) in the world. Written in PHP and usually runs on Apache with MySQL as a backend. communication replaced by WordPress .

Tools

Tool
Details

A plugin-based scanner that aids security researchers in identifying issues with several CMS. droopescan scan wordpress --url <URL>

Default File Structure

/var/www/html
├── index.php
├── license.txt   (version WordPress)
├── readme.html
├── wp-activate.php
├── wp-admin      (admin login page)
|   └── ENDPOINT: /wp-admin/login.php, /wp-admin/wp-login.php, /login.php, /wp-login.php
├── wp-blog-header.php
├── wp-comments-post.php
├── wp-config.php   (database name, database host, username and password, authentication keys and salts, and the database table prefix.)
├── wp-config-sample.php
├── wp-content
|   ├── uploads   (not always)
|   ├── index.php
|   ├── plugins
|   └── themes
├── wp-cron.php
├── wp-includes  (core files like certificates, fonts, JavaScript and widgets)
├── wp-links-opml.php
├── wp-load.php
├── wp-login.php
├── wp-mail.php
├── wp-settings.php
├── wp-signup.php
├── wp-trackback.php
└── xmlrpc.php  (WordPress feature that allows data transmission with HTTP acting as the transport mechanism and XML as the encoding mechanism)

Default Users

Role
Description

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 posts by 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 regular users who can browse posts and edit their profiles.

Manual Enumeration

Version

Source code

Meta tag of name generator: <meta name="generator" content="WordPress 5.3.3" /> In CSS links:

<link ... href='http://.../bootstrap.css?ver=5.3.3' ... /> In JS links: <script ... src='http://.../jquery.validationEngine-en.js?ver=5.3.3'>

readme.html

In the WordPress root directory

license.txt

In the WordPress root directory

Plugins

Passive

curl -s -X GET <SITE> | sed 's/href=/\n/g' | sed 's/src=/\n/g' | grep 'wp-content/plugins/*' | cut -d"'" -f2 Not all installed plugins can be passively detected.

Active

curl -I -X GET http://blog.inlanefreight.com/wp-content/plugins/mail-masta

Directory Indexing

Even if a plugin is deactivated, it may still be accessible (both to the scripts and functions associated with it). We navigate to the plugin directory, obtaining the list of files: http://<DOMAIN>/wp-content/plugins/<PLUGIN>/

Themes

Passive

curl -s -X GET <SITE> | sed 's/href=/\n/g' | sed 's/src=/\n/g' | grep 'themes' | cut -d"'" -f2 Not all installed themes can be passively detected.

User Enumeration

Author param

http://<DOMAIN>/?author=1 (1 is usually admin)

Users endpoint

WordPress ≤ 4.7.1 http://<DOMAIN>/wp-json/wp/v2/users | jq Show all users who had published a post

Attacks

Built-in

Login with Admin user. Click on Appearance on the side panel and select Theme Editor. This page will let us edit the PHP source code directly. An inactive theme can be selected to avoid corrupting the primary theme. Click on Select after selecting the theme, and we can edit an uncommon page such as 404.php to add a web shell. Click on Update File at the bottom to save. We know that WordPress themes are located at /wp-content/themes/<theme_name>.

curl http://<DOMAIN>/wp-content/themes/twentynineteen/404.php?cmd=id

Security Scanner. wpscan --url <URL> --random-user-agent -o <OUTPUT> -e <value> --plugins-detection aggressive --api-token <API_KEY> wpscan --url <URL> --password-attack <xmlrpc/wp-login> -U <USER> -P <WORDLIST>

xmlrpc
API REST
wpscan
WordPress
droopescan