what you don't know can hurt you

Modsecurity Cross Site Scripting Bypass

Modsecurity Cross Site Scripting Bypass
Posted Aug 31, 2013
Authored by Rafay Baloch

Modsecurity suffers from a cross site scripting bypass vulnerability.

tags | exploit, xss, bypass
MD5 | e94fc45eeeb7a90c685b095d36b2bf62

Modsecurity Cross Site Scripting Bypass

Change Mirror Download
# Product: Mod_security
# Author: Rafay Baloch
# Company: RHAINFOSEC
# Website: http://services.rafayhackingarticles.net
# Reported: 8/8/2013
# Fixed: 25/8/2013
# Status: Fixed

============
Introduction
============

The Mod_Security firewall is one of the most known WAF around, It has
anonline smoke test where we can check if a vector bypassed the regular
expressions that are meant to block the attacks. Recently,
Modsecurity setup a challenge for researchers, the challenge was
divided into two parts.

1) Bypassing Modsecurity's Firewall
2) Bypassing MentalJS

Luckily, i managed to bypass both of them.

=======
Details
=======

The modsecurity's rules were very strict, therefore i had to use a browser
bug to crack modsecurity's challenge. The browser bug involved
using seprators just before an event handler. I tried with lots of
seprators, however only /x0b worked for me in this case.

===
POC
===

<a/onmouseover[\x0b]=location='\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x61\x6C\x65\x72\x74\x28\x30\x29\x3B'>rhainfosec

===
Fix
===

The ModSecurity has updated the rule set and it now the detects the vector
as an xss vector. Along with that i also provided modsecurity with the list
of seprators that may have allowed for an attacker to create a working
bypass in other browsers too.

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

February 2015

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2015 Packet Storm. All rights reserved.

close