Skip to content

dannyd2/CodePath_WordPress_Pentesting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CodePath_WordPress_Pentesting

Project 7 - WordPress Pentesting

Time spent: 15 hours spent in total

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

Pentesting Report

  1. (Required) WordPress 4.2 Stored XSS
  • Summary: Bypassing viewing of a comment by injecting javascript. Under default settings the attacker can leverage the vulnerability to execute arbitrary code on the server.

    • Vulnerability types: XSS
    • Tested in version: 4.2
    • Fixed in version: 4.2.1
  • GIF Walkthrough:

  • Steps to recreate: Post the following in a comment: a title='x onmouseover=alert(unescape(/hello%20world/.source)) style=position:absolute;left:0;top:0;width:5000px;height:5000px AAAAAAAAAAAA...AAA (64kb in size)' /a

                       Make sure the comment is at least 64kb in size. An attacker can supply any type of attribute in HTML tags. 
                       The MySQL TEXT type size limit is 64 kilobytes
    
  1. (Required) WordPress Media Upload XSS
  • Summary: Uploading a file that is too large results in the filename being unsanitized, leading to XSS
    • Vulnerability types: XSS
    • Tested in version: 4.2
    • Fixed in version: 4.7.5
  • GIF Walkthrough:
  • Steps to recreate: 1. Get a 20MB image file. Next, name the file "example name (img src=x onerror=alert(1)>).png ... Go to wordpress site and "add new media" (/wp-admin/media-new.php). Once an error appears telling you about the large file size, an alert box will appear showing that the payload has been executed
  1. (Required) Stored XSS Vulnerability when Previewing Posts
  • Summary: In the WordPress editor, an administrator or another user with approved permissions can make a post and click "Preview" which allows the HTML, as well as the Javascript to be executed.
    • Vulnerability types: Stored XSS
    • Tested in version: 4.2
    • Fixed in version: 4.8.2
  • GIF Walkthrough:
  • Steps to recreate: As an administrator or approved user, Go to "Posts" and "Add New". In the "Text" tab, write your payload in the text box section. When you click "Preview" within the "Publish" window on the right, a new tab will be opened and your payload will have been executed.

Assets

List any additional assets, such as scripts or files

Resources

GIFs created with LiceCap.

Notes

Some exploits will only work on Linux, such as #2 above. Otherwise, no problems were encountered while performing the tasks.

License

Copyright [yyyy] [name of copyright owner]

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published