Code Monkey home page Code Monkey logo

codepath-week-7's Introduction

Project 7 - WordPress Pentesting

Time spent: 4 hours spent in total

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

Pentesting Report

  1. (Required) File Too Large XSS
  • Summary:
    The media upload section in Wordpress does not properly sanitize the name of the uploaded media, causing accesses to it to run arbitrary javascript.
    • Vulnerability types: XSS
    • Tested in version: 4.2
    • Fixed in version: 4.7.5
  • GIF Walkthrough:
  • Steps to recreate:
    1. Create a file over 20MB in size
    2. Name it with an <img src=a onerror=alert(1)>.jpg ending.
    3. Get an admin or anyone with media upload access to attempt to upload file.
    4. Script triggers on fail to upload.
  • Affected source code:
  1. (Required) Unauthenticated XSS in Comment
  • Summary: The comment storage method has a limit of 64kb per comment. Exceeding this causes the HTML to corrupt, allowing for arbitrary javascript to be run through comments.
    • Vulnerability types: XSS. Buffer Overflow
    • Tested in version: 4.2
    • Fixed in version: 4.2.1
  • GIF Walkthrough:
  • Steps to recreate:
    1. Construct a message over 64kb in size.
    2. Use <a title='x onmouseover=alert(unescape(/hello%20world/.source)) style=position:absolute;left:0;top:0;width:5000px;height:5000px AAAAAAAAAAAA...[64 kb]..AAA'></a> where the ...[64 kb].. is replaced with the contents of the message over 64kb in size.
    3. Post the payload as a comment anywhere on the wordpress site.
  • Affected source code:
  1. (Required) YouTube embed XSS
  • Summary: The YouTube embed link is not properly sanitized, allowing for embedded YouTube links to run arbitrary javascript through the post.
    • Vulnerability types: XSS via failed sanitization
    • Tested in version: 4.2
    • Fixed in version: 4.7.3
  • GIF Walkthrough:
  • Steps to recreate:
    1. Construct the embed src "http://youtube.com/embed/{VIDEO ID}\x3csvg onload=alert(1)\x3e"
    2. Put in a post the src above as an embed.
  • Affected source code:

Assets

Only file of note is "LotsofAs.txt", which contained 82kb of "AAAA"

Resources

GIFs created with LiceCap.

Notes

If running Vagrant without opening VirtualBox in Administrator mode, Vagrant would fail and lose all connections to Ruby, which required reinstalling Vagrant to fix.

License

Copyright 2018 Noah

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.

codepath-week-7's People

Contributors

noahmarwitz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.