[Full-disclosure] More on the workaround for the unpatched Oracle PLSQL Gateway flaw



According to Oracle, the workaround I posted, that prevents exploitation of a critical vulnerability that Oracle has so far failed to fix, breaks certain applications that sits atop their PLSQL Gateway. Though my workaround prevents exploitation of the critical flaw and thus protects vulnerable systems against attack, Oracle has made no effort to furnish me, or anyone else for that matter, with more information on how the workaround breaks some of their applications. As such, improving the workaround so it doesn't break these few applications has been mildy annoying. But I think I've tracked it down. The workaround as is

RewriteEngine on
RewriteCond %{QUERY_STRING} ^.*\).*|.*%29.*$
RewriteRule ^.*$ http://127.0.0.1/denied.htm?attempted-attack
RewriteRule ^.*\).*|.*%29.*$ http://127.0.0.1/denied.htm?attempted-attack

will trigger if a right facing bracket ')' appears in the PATH_INFO or _anywhere_ in the query string. Thus, if the value of a query string parameter contains a bracket the workaround will trigger. As far as the flaw is concerned, we need only concern ourselves with brackets that appear in the query string parameter name - not in the value for the parameter name. As such, if we modify the workaround to

RewriteEngine on
RewriteCond %{QUERY_STRING} ^.*\).*=|.*%29.*=$
RewriteRule ^.*$ http://127.0.0.1/denied.htm?attempted-attack
RewriteRule ^.*\).*|.*%29.*$ http://127.0.0.1/denied.htm?attempted-attack

we can prevent exploitation if the query string parameter name has a bracket whilst still allowing brackets it the paramter value. This can be tidied up to read

RewriteEngine on
RewriteCond %{QUERY_STRING} \).*=|%29.*=
RewriteRule .? http://127.0.0.1/denied.htm?attempted-attack
RewriteRule \)|%29 http://127.0.0.1/denied.htm?attempted-attack

# Thanks, Mike Pomraning!

For those that haven't been able to adopt the workaround because it would break their specific application, then the modified workaround should work in your situation.

Cheers,
David Litchfield

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/



Relevant Pages

  • [Full-disclosure] Re: More on the workaround for the unpatched Oracle PLSQL Gateway flaw
    ... Actually, there is a patch that addresses this, and other critical Oracle security issues: ... Though my workaround prevents exploitation of the critical flaw and thus protects vulnerable systems against attack, Oracle has made no effort to furnish me, or anyone else for that matter, with more information on how the workaround breaks some of their applications. ... RewriteRule ^.*$ http://127.0.0.1/denied.htm?attempted-attack ... if the value of a query string parameter contains a bracket the workaround will trigger. ...
    (Full-Disclosure)
  • More on the workaround for the unpatched Oracle PLSQL Gateway flaw
    ... According to Oracle, the workaround I posted, that prevents exploitation of a critical vulnerability that Oracle has so far failed to fix, breaks certain applications that sits atop their PLSQL Gateway. ... RewriteRule ^.*$ http://127.0.0.1/denied.htm?attempted-attack ... if the value of a query string parameter contains a bracket the workaround will trigger. ...
    (Bugtraq)
  • Re: [kde] Help: have system bell as root, but not as user
    ... the workaround for the konsole does not fix other ... they are both in System Bell. ... Right now, I am happy with this workaround, this sound is nicer than the ... Maybe it can affect other applications as well... ...
    (KDE)
  • Re: FreeBSD Security Advisory FreeBSD-SA-05:21.openssl
    ... >> Applications which do not support SSLv2, ... >> No workaround is available. ...
    (FreeBSD-Security)
  • Re: sata, libata, modules.pata
    ... release notes is one way to go that I could live with but I'd like to be able to count on this workaround not getting written out of future versions and being available in other distros as well, ... and I'd vote for it being fixed before it too becomes a huge immovable legacy issue like the number of primaries. ... It's difficult to say which distro will keep on having a million different ways to name a device, they will drop legacy methods as soon as the majority of applications will use other methods, but you can always edit your /etc/udev stuff. ...
    (alt.os.linux)