In the course of a recent penetration test, we came across an Image validation
vulnerability in Django when using the
Python-Imaging-Library (PIL) which we
want to explain in this post.
Everybody who doesn’t know what Django and/or
the PIL is:
Django is a framework to create web applications with Python (comparable to
Rails or Zend). The PIL is a powerful standard python library which provides a
toolset to modify, display and verify images of many different formats.
During one of our last projects in a large environment we encountered an
interesting flaw. Although it was not possible to exploit it in this particular
context, it’s worth to be mentioned here. The finding was about
Cross-Site Request Forgery,
a quite well-known attack that forces a user to execute unintended actions
within the authenticated context of a web application. With a little help of
social engineering (like sending a link via email, chat, embedded code in
documents, etc…) an attacker may force the user to execute actions of the
attacker’s choice.
Some days ago another
advisory
related to a web application firewall (WAF) product was published. This time the
product Airlock by Ergon was affected by a vulnerability
that combines Encoding and NULL Byte attacks to circumvent the pattern based
detection engine. We have described these attacks in detail in our newsletter
“Web Application Firewall Security and The Swiss Army Knife for Web Application Firewalls”
because they belong to a well known category of attacks against WAFs.
There are some database specifics, every pentester should be aware of, when
testing for and exploiting SQLi vulnerabilities. Besides the different string
concatenation variants already covered above, there are some other specifics
that have to be considered and might turn out useful in some circumstances. For
example with Oracle Databases, every SELECT statement needs a following FROM
statement even if the desired data is not stored within a database. So when
trying to extract e.g. the DB username using a UNION SELECT statement, the DUAL
table may be utilized, which should always be available. Another point, if
dealing with MySQL, is the possibility to simplify the classic payload
Some days ago a security advisory related to web application firewalls (WAFs)
was published on Full Disclosure. Wendel Guglielmetti Henrique found another bug
in the IBM Web Application Firewall which can be used to circumvent the WAF and
execute typical web application attacks like SQL injection (click
here
for details). Wendel talked already (look
here)
at the Troopers Conference in 2009 about the different
techniques to identify and bypass WAFs, so this kind of bypass methods are not
quite new.
A few weeks ago, I released version 0.9 of a web application testing tool called
tsakwaf (The Swiss Army Knife for Web Application Firewalls) together with an
ERNW
Newsletter
about
web application firewalls.
tsakwaf is based on perl and supports fingerprinting of some supported WAFs and
code generation methods to circumvent filter rules. Today, version 0.9.1 will be
released, which adds SSL support for the WAF fingerprinting function (Big thanks
to Simon Rich!) and a bug fix regarding the detection of WAF reactions which may
lead to false positives. Additionally, I’m happy to announce that at least one
talk at next year’s Troopers will cover
attacks against WAFs (like this one from the 2009
edition)
. So mark your calendar – Troopers12 will happen on 21^(st) and 22^(nd) March
2012, with the usual workshops before the conference and the round table
sessions the day after – and enjoy playing with tsakwaf!
Some days ago a security advisory related to web application firewalls (WAFs)
was published on Full Disclosure. Wendel Guglielmetti Henrique found another bug
in the IBM Web Application Firewall which can be used to circumvent the WAF and
execute typical web application attacks like SQL injection (click here for
details). Wendel talked already (look
here)
at the Troopers Conference in 2009 about the different
techniques to identify and bypass WAFs, so this kind of bypass methods are not
quite new.