<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bonsai - Information Security Blog &#187; andres.riancho</title>
	<atom:link href="http://www.bonsai-sec.com/blog/index.php/author/andresriancho/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bonsai-sec.com/blog</link>
	<description>Information security news from the small tree</description>
	<lastBuildDate>Tue, 12 Jul 2011 00:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Vulnerando Sistemas con Herramientas Open Source</title>
		<link>http://www.bonsai-sec.com/blog/index.php/vulnerando-sistemas-con-herramientas-open-source/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/vulnerando-sistemas-con-herramientas-open-source/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 19:29:11 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[interesante]]></category>
		<category><![CDATA[junin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software libre]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=563</guid>
		<description><![CDATA[El año pasado tuve el agrado de estar en las &#8220;VI Jornadas de Software Libre&#8221; en Junín, provincia de Buenos Aires. Para esta conferencia preparé una charla interesante y divertida sobre como &#8220;Vulnerar Sistemas con Herramientas Open Source&#8220;. Gracias a los organizadores de la conferencia, tenemos el video disponible aquí mismo, enjoy!

]]></description>
			<content:encoded><![CDATA[<p>El año pasado tuve el agrado de estar en las &#8220;VI Jornadas de Software Libre&#8221; en Junín, provincia de Buenos Aires. Para esta conferencia preparé una charla interesante y divertida sobre como &#8220;<strong>Vulnerar Sistemas con Herramientas Open Source</strong>&#8220;. Gracias a los organizadores de la conferencia, tenemos el video disponible aquí mismo, enjoy!</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="414" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/AYKQ%2B3oC" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="414" src="http://blip.tv/play/AYKQ%2B3oC" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/vulnerando-sistemas-con-herramientas-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ekoparty 2010  “Hackers go corporate”: Breakfast with CIOs, CEOs and CTOs</title>
		<link>http://www.bonsai-sec.com/blog/index.php/ekoparty-2010-%e2%80%9chackers-go-corporate%e2%80%9d-breakfast-with-cios-ceos-and-ctos/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/ekoparty-2010-%e2%80%9chackers-go-corporate%e2%80%9d-breakfast-with-cios-ceos-and-ctos/#comments</comments>
		<pubDate>Mon, 04 Oct 2010 22:25:45 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[breakfast]]></category>
		<category><![CDATA[desayuno]]></category>
		<category><![CDATA[desayuno de los CIOs]]></category>
		<category><![CDATA[ekoparty]]></category>
		<category><![CDATA[OWASP]]></category>
		<category><![CDATA[OWASP Top10]]></category>
		<category><![CDATA[software development life cycle]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[web application security training]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=443</guid>
		<description><![CDATA[A new event was organized as part of the sixth edition of the Ekoparty Security Conference: “Hackers Go Corporate”, and as usual our team was there to establish new relationships and strengthen the ones we already have with our current customers.
In the event, CIOs, CEOs and CTOs from the most important Argentinean companies shared a [...]]]></description>
			<content:encoded><![CDATA[<div>A new event was organized as part of the sixth edition of the Ekoparty Security Conference: “<strong>Hackers Go Corporate</strong>”, and as usual our team was there to establish new relationships and strengthen the ones we already have with our current customers.</p>
<p>In the event, CIOs, CEOs and CTOs from the most important Argentinean companies shared a cup of coffee with the some of the best information security experts from around the world. The event’s objective was to close down the gap between managers and the matters that hackers talk about at the Ekoparty Security Conference.</p>
<p>Andrés Riancho, Bonsai’s CEO, delivered a speech called “<strong>Less buffer overflows, more SQL injections</strong>” in which he urged the audience to change the way their Web applications are developed. “Nowadays, hackers choose to attack Web applications over daemons like Apache or IIS; and the reason is very simple: <em><strong>Web applications of today are still developed with the same security features the 90’s</strong></em>” Andrés said.</p>
<p style="text-align: center;"><object id="__sse5266938" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=menosbufferoverflowsmassqlinjectionsv0-2-100920104333-phpapp02&#038;stripped_title=menos-buffer-overflows-ms-sql-injections-v02&#038;userName=bonsaiblog" /><param name="name" value="__sse5266938" /><param name="allowfullscreen" value="true" /><embed id="__sse5242300" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=menosbufferoverflowsmassqlinjectionsv0-2-100920104333-phpapp02&amp;stripped_title=menos-buffer-overflows-ms-sql-injections-v02&amp;userName=bonsaiblog" name="__sse5242300" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>To make Web applications more secure, companies need to change their obsolete development methodologies and integrate security in the software development life cycle. <strong>But how do we start? What’s the first step?</strong> According to Andrés, the road to secure code starts with performing code reviews and Web application penetration tests, training developers and QA employees in OWASP Top10 and inviting security experts to the design meetings.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/ekoparty-2010-%e2%80%9chackers-go-corporate%e2%80%9d-breakfast-with-cios-ceos-and-ctos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rapid7 partnership</title>
		<link>http://www.bonsai-sec.com/blog/index.php/rapid7-partnership/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/rapid7-partnership/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 23:02:21 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[bonsai information security]]></category>
		<category><![CDATA[grow]]></category>
		<category><![CDATA[partners]]></category>
		<category><![CDATA[rapid7]]></category>
		<category><![CDATA[US]]></category>
		<category><![CDATA[USA]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=384</guid>
		<description><![CDATA[We&#8217;re excited to announce that Bonsai Information Security has partnered with Rapid7! This partnership will allow our company to expand it&#8217;s market in north america by leveraging Rapid7&#8217;s impressive growth in the last years.
This partnership was possible because of our constant search for excellence, our customer need driven approach to consulting and our service quality. More deals [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bonsai-sec.com/blog/wp-content/uploads/rapid7-logo.gif"><img class="alignright size-full wp-image-390" title="Rapid7 Logo" src="http://www.bonsai-sec.com/blog/wp-content/uploads/rapid7-logo.gif" alt="" width="279" height="37" /></a>We&#8217;re excited to announce that <a title="Bonsai Information Security" href="http://www.bonsai-sec.com/" target="_self">Bonsai Information Security</a> has partnered with <a title="Rapid7 LLC" href="http://www.rapid7.com" target="_blank">Rapid7</a>! This partnership will allow our company to expand it&#8217;s market in north america by leveraging Rapid7&#8217;s impressive growth in the last years.</p>
<p>This partnership was possible because of our constant search for excellence, our customer need driven approach to consulting and our service quality. More deals like this, and Bonsai will be soon named <em>Oak</em>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/rapid7-partnership/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Curso de Seguridad en Aplicaciones Web</title>
		<link>http://www.bonsai-sec.com/blog/index.php/curso-de-seguridad-en-aplicaciones-web/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/curso-de-seguridad-en-aplicaciones-web/#comments</comments>
		<pubDate>Fri, 21 May 2010 13:02:38 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=313</guid>
		<description><![CDATA[
El training de Web Application Security de Bonsai se focaliza en el descubrimiento y explotación, manual y automático, de vulnerabilidades en aplicaciones Web. Durante este curso de dos dias, se presentarán una serie de temas teóricos seguidos de prácticas hands-on realizadas por los asistentes. En cada práctica encontrarás vulnerabilidades para explotar, cada una con un [...]]]></description>
			<content:encoded><![CDATA[<h1 style="text-align: justify;"><strong><a href="http://www.bonsai-sec.com/blog/wp-content/uploads/bonsai_information_security_education.gif"><img class="alignleft size-full wp-image-314" title="bonsai_information_security_education" src="http://www.bonsai-sec.com/blog/wp-content/uploads/bonsai_information_security_education.gif" alt="" width="64" height="64" /></a></strong></h1>
<p style="padding-left: 30px; text-align: justify;">El training de Web Application Security de Bonsai se focaliza en el descubrimiento y explotación, manual y automático, de vulnerabilidades en aplicaciones Web. Durante este curso de dos dias, se presentarán una serie de<strong> temas teóricos seguidos de prácticas hands-on</strong> realizadas por los asistentes. En cada práctica encontrarás vulnerabilidades para explotar, cada una con un diferente nivel de complejidad, las que desafiarán tu comprensión del tema.</p>
<p style="padding-left: 30px; text-align: justify;">
<h3 style="text-align: justify;"><strong>Fechas, Ubicación, Cupos y Beneficios</strong></h3>
<ul style="text-align: justify;">
<li>Consta de <strong>dos días completos de 9 a 18 horas</strong>. Los días asignados para el próximo training son el Martes  27 y Miércoles 28 de Julio de 2010.</li>
<li>Se realizará en las aulas multimediales de IT Training Center, Sarmiento 1113, Ciudad Autónoma de Buenos Aires, Capital Federal.</li>
<li>Al mediodia, los asistentes poseen el beneficio de almorzar en Il&#8217;Gato sin cargo.</li>
<li>Consultar aquellos que deseen un Estacionamiento con precio preferencial.</li>
<li>Capacidad: 16 asistentes</li>
</ul>
<p style="padding-left: 30px; text-align: justify;">
<h3 style="text-align: justify;"><strong>Más Información</strong></h3>
<address style="text-align: center;"><a href="../../es/education/web-security-buenos-aires.php"><strong>http://www.bonsai-sec.com/es/education/web-security-buenos-aires.php</strong></a></address>
<address style="text-align: justify;"> </address>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/curso-de-seguridad-en-aplicaciones-web/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Breaking Weak CAPTCHA in 26 Lines of Code</title>
		<link>http://www.bonsai-sec.com/blog/index.php/breaking-weak-captcha-in-26-lines-of-code/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/breaking-weak-captcha-in-26-lines-of-code/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 14:30:23 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[breaking]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Web Application Security]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=258</guid>
		<description><![CDATA[During one of our latest engagements we found a weak CAPTCHA implementation being used in the target Web application. The assessment was being performed on-site, and after identifying this vulnerability we started to talk with the CSO about how easy it would be to break it.

The general consensus of course was &#8220;very easy&#8221;. The problem [...]]]></description>
			<content:encoded><![CDATA[<p>During one of our latest engagements we found a <em><strong>weak CAPTCHA implementation</strong></em> being used in the target Web application. The assessment was being performed on-site, and after identifying this vulnerability we started to talk with the CSO about how easy it would be to break it.</p>
<p><img class="size-full wp-image-268 alignleft" title="jxt9" src="http://www.bonsai-sec.com/blog/wp-content/uploads/jxt9.gif" alt="jxt9" width="58" height="28" /><img class="size-full wp-image-267 alignleft" title="e4ya" src="http://www.bonsai-sec.com/blog/wp-content/uploads/e4ya.gif" alt="e4ya" width="58" height="28" /><img class="size-full wp-image-266 alignleft" title="9ko0" src="http://www.bonsai-sec.com/blog/wp-content/uploads/9ko03.gif" alt="9ko0" width="58" height="28" /></p>
<p>The general consensus of course was <strong><em>&#8220;very easy&#8221;</em></strong>. The problem was that we were unable to find any good CAPTCHA breaking software that average joe could download and run on his computer; so I spent some minutes creating a simple Python script that  returns the CAPTCHA solution for this particular implementation.</p>
<p>Before we dig into the script, lets analyze why this CAPTCHA is weak (might not be obvious for some readers):</p>
<ol>
<li>The letters are not rotated</li>
<li>All letters have the same height</li>
<li>All letters have the exact same color</li>
<li>The letters are not deformed in any way</li>
<li>The background noise color is the same for the whole image</li>
</ol>
<p>Now, lets see the code that breaks this CAPTCHA:</p>
<pre class="brush:python">from PIL import Image

img = Image.open('input.gif')
img = img.convert("RGBA")

pixdata = img.load()

# Clean the background noise, if color != black, then set to white.
for y in xrange(img.size[1]):
    for x in xrange(img.size[0]):
        if pixdata[x, y] != (0, 0, 0, 255):
            pixdata[x, y] = (255, 255, 255, 255)

img.save("input-black.gif", "GIF")

#   Make the image bigger (needed for OCR)
im_orig = Image.open('input-black.gif')
big = im_orig.resize((116, 56), Image.NEAREST)

ext = ".tif"
big.save("input-NEAREST" + ext)

#   Perform OCR using pytesser library
from pytesser import *
image = Image.open('input-NEAREST.tif')
print image_to_string(image)</pre>
<p>This simple script works with ~ 90% of the CAPTCHA images created using this specific implementation. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/breaking-weak-captcha-in-26-lines-of-code/feed/</wfw:commentRss>
		<slash:comments>77</slash:comments>
		</item>
		<item>
		<title>Second w3af training @ New York</title>
		<link>http://www.bonsai-sec.com/blog/index.php/second-w3af-training-new-york/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/second-w3af-training-new-york/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 19:39:35 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[nopsec]]></category>
		<category><![CDATA[NYC]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=253</guid>
		<description><![CDATA[Bonsai and NopSec have partnered to deliver the second w3af ninja training course in New York City.
The w3af ninja training course is focused on manual and automated discovery and exploitation of web application vulnerabilities using w3af. During this course you’ll also learn how to write your own exploits and customized plugins in order to achieve [...]]]></description>
			<content:encoded><![CDATA[<p>Bonsai and <a title="NopSec" href="http://nopsec.com/index.php?option=com_content&amp;task=view&amp;id=80" target="_blank">NopSec</a> have partnered to deliver the second <strong>w3af ninja training course</strong> in New York City.</p>
<p>The <span>w3af</span> ninja training course is focused on manual and automated discovery and exploitation of web application vulnerabilities using <span>w3af</span>. During this course you’ll also learn how to write your own exploits and customized plugins in order to achieve <em>your goals</em> during a web application penetration test.</p>
<p>This course is an intense <strong>hands-on</strong> class in which you won’t stop learning for a minute. In each practice we’ll focus on a particular type of web application vulnerability which will be analyzed and understood manually and then it’s detection and exploitation is automated using <span>w3af</span>.</p>
<p>All around the training interesting plugin code snippets will be subject to analysis and modification, which will give you great understanding of the framework and will also give you the means to automate your future web application penetration tests.</p>
<p><strong>Important information</strong></p>
<ul>
<li>Date: December 17th / 18th 2009</li>
<li>Training partners: <span>NopSec</span>, Inc. SOC – 155 Water St., Brooklyn, NY 11201 USA</li>
<li><a href="http://nopsec.com/index.php?option=com_content&amp;task=view&amp;id=80" target="_self">More information, and registration is available here.</a></li>
</ul>
<p>This is a great opportunity to master the w3af framework, don’t miss it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/second-w3af-training-new-york/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cross Site Scripting Payloads</title>
		<link>http://www.bonsai-sec.com/blog/index.php/cross-site-scripting-payloads/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/cross-site-scripting-payloads/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 14:01:12 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[xss]]></category>
		<category><![CDATA[xss payloads]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=238</guid>
		<description><![CDATA[Most of us are tired from the usual Cross Site Scripting vulnerabilities that get reported every day in full-disclosure, so when one of our researchers found a XSS in an Open Source project, we hesitated to publish it. After some thinking, we started to realize that maybe it would be interesting to the general public [...]]]></description>
			<content:encoded><![CDATA[<p>Most of us are tired from the usual Cross Site Scripting vulnerabilities that get reported <em>every day</em> in full-disclosure, so when one of our researchers found a XSS in an Open Source project, we hesitated to publish it. After some thinking, we started to realize that maybe it would be interesting to the general public to see a customized XSS payload that would exploit the Web application, which suddenly made our newly discovered XSS vulnerability much more fun.</p>
<p>The vulnerability that we&#8217;re going to be exploiting is a <a title="persistent cross site scripting in Achievo" href="http://www.bonsai-sec.com/research/vulnerabilities/achievo-multiple-xss-0101.txt" target="_blank">persistent cross site scripting in Achievo</a> . For those that do not know, Achievo is a flexible web-based resource management tool for business environments. Achievo&#8217;s resource management capabilities will enable organizations to support their business processes in a simple, but effective manner. This vulnerability was found a while ago by our research team, and has been fixed in version 1.4.0.</p>
<p>The vulnerability is a really basic persistent XSS, where we can write virtually anything in the title of a scheduled meeting. <em>As the meetings from a user can be seen by other users, and most interestingly administrators, <strong>the XSS can be exploited to elevate privileges in the application.</strong></em></p>
<p>With the objective of writing the XSS payload, I developed a JavaScript export feature, that allows w3af users to export any HTTP request to JavaScript, that will reproduce the same request when a user loads the script in a browser.</p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_242" class="wp-caption aligncenter" style="width: 525px;">
<dt class="wp-caption-dt"><a href="http://www.bonsai-sec.com/blog/wp-content/uploads/js-export.png"><img class="size-full wp-image-242" title="w3af's JavaScript Export" src="http://www.bonsai-sec.com/blog/wp-content/uploads/export.png" alt="w3af's JavaScript Export" width="515" height="327" /></a></dt>
</dl>
</div>
<p>Using the newly created feature, we were able to easily create a JavaScript payload, that when accessed by an Achievo administrator will perform the following tasks:</p>
<ul>
<li>Create a new application profile</li>
<li>Apply administrator privileges to the profile</li>
<li>Assign the newly created profile to a common user</li>
</ul>
<p>You can find the <a title="customized XSS payload" href="http://www.bonsai-sec.com/research/vulnerabilities/achievo-payload.js" target="_blank">customized XSS payload</a> by clicking <a title="customized XSS payload" href="http://www.bonsai-sec.com/research/vulnerabilities/achievo-payload.js" target="_blank">here</a>. In order to exploit this vulnerability, a user would need to change the first four variables in the script, upload the script to a publicly accessible web server, and then point the Cross Site Scripting to that resource. After some time, and if an Achievo administrator browses through the schedule, the configured user will elevate their privileges to administrator.</p>
<p>In this case it was impossible (because of the application not having that particular feature) to actually <strong><em>upload new files to the web server</em></strong>, but in many other Web applications, it would have been completely possible to create a XSS payload that would use the administrator privileges to upload a specially crafted file to the web server, which would then provide <strong><em>operating system access </em></strong>to the intruder.</p>
<p>With the creation of tools like w3af&#8217;s JavaScript export feature, and the huge amount of XSS vulnerabilities found every day, we think that the time for customized XSS payloads written in minutes instead of hours, has arrived!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/cross-site-scripting-payloads/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Web Application Security training @ FRHACK</title>
		<link>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-frhack/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-frhack/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 19:00:48 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[conferences]]></category>
		<category><![CDATA[france]]></category>
		<category><![CDATA[september]]></category>
		<category><![CDATA[training]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=7</guid>
		<description><![CDATA[I&#8217;m going to be delivering a Web Application Security training at FRHACK next September 2009! FRHACK is a highly technical, non-business conference that is going to be held at Besançon, France. The training is a two day, hands-on class where the w3af project leader will train you in the techniques and methodologies needed to discover [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to be delivering a Web Application Security training at <a href="http://www.frhack.org/trainings.html">FRHACK</a> next September 2009! FRHACK is a highly technical, non-business conference that is going to be held at Besançon, France. The training is a two day, hands-on class where the w3af project leader will train you in the techniques and methodologies needed to discover and exploit web application vulnerabilities.</p>
<p>Here is some extra information regarding the training,</p>
<p><strong>Training name:</strong> Discovery and exploitation of web application vulnerabilities</p>
<p><strong>Overview</strong></p>
<p>This training course focus is on manual and automated, <strong>discovery and exploitation of web application vulnerabilities</strong>. During this course you are going to go through a series of lectures followed by <strong>hands on</strong> practice. In each practice you will find vulnerabilities to exploit, each with a different level of complexity, which will defy your understanding of the subject. After the hands on practice, a small lecture on how the vulnerability is fixed is presented, together with common errors introduced by developers in that process.</p>
<p>The training will also teach you how to use the most <strong>advanced tools</strong> used by professionals in the field, like w3af (<em>developed by the trainer</em>), the burp suite, sqlmap and many others.</p>
<p><strong>Course Structure</strong></p>
<p>This is a two-day course that combines lectures with increasingly difficult <strong>hands-on exercises</strong> designed to teach the attendee different ways to discover and exploit web application vulnerabilities. All course materials, and a certificate of completion will be offered. You must provide your own laptop.</p>
<p><strong>Deliverables</strong></p>
<p>- Training booklet with printed slides and trainer comments<br />
- Live CD with Web Application Security Tools<br />
- <strong>VMware image with the training environment</strong><br />
- w3af T-Shirt ;)</p>
<p><strong>Audience</strong></p>
<p>Security consultants, system and network administrators, experienced web application developers, information security officers, government agencies.</p>
<p><strong>Topics Covered</strong></p>
<ul>
<li><strong>Day One</strong>
<ol>
<li>HTTP protocol review
<ul>
<li>Web architecture</li>
<li>HTTP headers and methods</li>
<li>HTTP authentication</li>
<li>HTTPS</li>
<li>Session management: cookies</li>
</ul>
</li>
<li>Common web server misconfigurations
<ul>
<li>Banners</li>
<li>Directory Indexing</li>
<li>HTTP authentication</li>
<li>HTTP method restrictions</li>
</ul>
</li>
<li>Common development and configuration errors
<ul>
<li>HTML comments and versioning</li>
<li>File inclusions</li>
<li>Backup and local database files</li>
<li>Hidden HTML Fields</li>
<li>Path Disclosure and directory enumeration</li>
<li>Exceptions and error messages</li>
</ul>
</li>
<li>Types of analysis
<ul>
<li>Static code analysis, black box testing and gray box testing:</li>
<li>Definitions</li>
<li>Vulnerabilities that can be detected</li>
<li>Vulnerabilities that CAN&#8217;T be detected</li>
</ul>
</li>
<li>Web Application Vulnerabilities
<ul>
<li>Reverse engineering of Java applets y Flash movies</li>
<li>Local file read</li>
<li>Local file inclusions</li>
<li>Path Traversal and Null Bytes</li>
<li>Remote file inclusions</li>
<li>Cross Site Scripting (XSS)</li>
<li>Cross Site Tracing</li>
<li>Cross Site Request Forgeries / Session Riding</li>
<li>HTTP Response Splitting</li>
</ul>
</li>
</ol>
</li>
<li><strong>Day Two</strong>
<ol>
<li>Web Application Vulnerabilities
<ul>
<li>Uncommon attack vectors</li>
<li>LDAP Injection</li>
<li>OS Commanding</li>
<li>SQL Injection:
<ul>
<li>Enumeration of tables and columns</li>
<li>Execution of queries and stored procedures</li>
<li>Creation of files</li>
<li>Execution of OS commands</li>
</ul>
</li>
<li>Blind SQL Injection</li>
</ul>
</li>
<li>Web application privilege escalation
<ul>
<li>Session handling</li>
<li>Logical vulnerabilities</li>
</ul>
</li>
<li>Countermeasures
<ul>
<li>mod_security</li>
<li>Hardening for Java
<ul>
<li>HDIV</li>
<li>Spring Security</li>
</ul>
</li>
<li>PHP hardening:
<ul>
<li>Secure configuration parameters</li>
<li>GRASP</li>
<li>PHP-IDS</li>
</ul>
</li>
</ul>
</li>
</ol>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-frhack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Not the average SQL Injection</title>
		<link>http://www.bonsai-sec.com/blog/index.php/not-the-average-sql-injection/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/not-the-average-sql-injection/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 19:35:50 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[Web Application Security]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=195</guid>
		<description><![CDATA[SQL Injections are one of the most common and most critical Web application vulnerabilities that can be identified during a Web Application Penetration Test. SQL injections can occur in any part of a SQL query, but they usually occur in the &#8220;where_definition&#8221; section, to clarify what I&#8217;m talking about, here&#8217;s the syntax definition for the [...]]]></description>
			<content:encoded><![CDATA[<p>SQL Injections are one of the most common and most critical Web application vulnerabilities that can be identified during a <a title="Web Application Penetration Test" href="http://www.bonsai-sec.com/en/services/web-application-penetration-testing.php" target="_self">Web Application Penetration Test.</a> SQL injections can occur in any part of a SQL query, but they usually occur in the &#8220;where_definition&#8221; section, to clarify what I&#8217;m talking about, here&#8217;s the syntax definition for the SELECT statement for MySQL:</p>
<pre>SELECT
[ALL | DISTINCT | DISTINCTROW ]
[HIGH_PRIORITY]
[STRAIGHT_JOIN]
[SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
[SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS]
<em><code>select_expr</code></em>, ...
[INTO OUTFILE '<em><code>file_name</code></em>' <em><code>export_options</code></em>
| INTO DUMPFILE '<em><code>file_name</code></em>']
[FROM <em><code>table_references</code></em>
[WHERE <span style="color: red;"><em><code>where_definition</code></em></span>]
[GROUP BY {<em><code>col_name</code></em> | <em><code>expr</code></em> | <em><code>position</code></em>}
[ASC | DESC], ... [WITH ROLLUP]]
[HAVING <em><code>where_definition</code></em>]
[ORDER BY {<em><code>col_name</code></em> | <em><code>expr</code></em> | <em><code>position</code></em>}
[ASC | DESC] , ...]
[LIMIT {[<em><code>offset</code></em>,] <em><code>row_count</code></em> | <em><code>row_count</code></em> OFFSET <em><code>offset</code></em>}]
[PROCEDURE <em><code>procedure_name</code></em>(<em><code>argument_list</code></em>)]
[FOR UPDATE | LOCK IN SHARE MODE]]</pre>
<p>While performing some vulnerability research in e-commerce Web applications, Ryan ﻿Dewhurst (ryan@bonsai-sec.com) found a rather uncommon SQL Injection vector in the &#8220;col_name&#8221; section of the SELECT query, which at first looks like the average SQL Injection, but when actually trying to exploit it we discovered that it was more difficult than expected. This is the code snippet for the vulnerability, were we only control the <span style="color: #ff0000;">$sort_order</span> value:</p>
<pre>$userlog = db_get_array("SELECT change_id, action, timestamp,
                         amount, reason FROM points_table
                         WHERE user_id = ?i ORDER BY $sort_by
                         <span style="color: #ff0000;">$sort_order</span> $limit", $user_id);</pre>
<p>First of all, no SQL Injection tool works with this type of SQL injection. The reason is that they all assume that they are going to be injecting in the where_definition part of the query, and in this case that assumption is false. So we went back to the <a title="SELECT syntac" href="http://dev.mysql.com/doc/refman/5.0/es/select.html" target="_blank">SELECT syntax</a>, and we found that we had not much space to play:</p>
<pre>[ORDER BY {<em><code>col_name</code></em> | <em><code>expr</code></em> | <em><code>position</code></em>}
[ASC | DESC] , ...]
[LIMIT {[<em><code>offset</code></em>,] <em><code>row_count</code></em> | <em><code>row_count</code></em> OFFSET <em><code>offset</code></em>}]
[PROCEDURE <em><code>procedure_name</code></em>(<em><code>argument_list</code></em>)]
[FOR UPDATE | LOCK IN SHARE MODE]]</pre>
<p>The first idea was to use a UNION clause in order to join two different queries, the one controlled by the web application, and the other controlled by us; which seemed to be a good idea, but a flawed one also:</p>
<pre>
<ul>
<li><code>select 1,2,3 union select 4,5,6</code>
Works perfectly.</li>
<li><code>select 1,2,3 order by 1 ASC union select 4,5,6</code>
Throws an "Incorrect usage of UNION and ORDER BY error."</li>
<li><code><span style="color: red;">(</span>select 1,2,3 order by 1 ASC) union (select 4,5,6)</code>
Works perfectly, but we can't add the "<span style="color: red;">(</span>" at the beginning
of the query.</li>
</ul>
</pre>
<p>UNION was out of the picture.</p>
<p>Without even noticing that I was testing something syntactically incorrect, I tried to write a file to disk using &#8220;INTO OUTFILE&#8221;, and surprisingly enough, it worked. But the problem is that we can&#8217;t control the contents of the file, because in this particular Web application we had no control of the contents of the <code>points_table</code>, so once again we&#8217;re were we started because we can&#8217;t write a PHP shell to disk.</p>
<p>So the next step was to find a way to execute a SELECT statement after an ORDER BY, the best thing that we could find was to inject a sub-SELECT statement in the <em><em><code>col_name </code></em></em>section of the order by. Finally the SQL injection ended up like this:</p>
<pre><code>,(SELECT BENCHMARK(1000000,MD5(1)) FROM points_table where
CURRENT_USER() like 'root@localhost' limit 1)</code></pre>
<p>Which makes,</p>
<pre><code>SELECT change_id, action, timestamp, amount, reason FROM
       points_table WHERE user_id = i ORDER BY timestamp<strong>,
       (SELECT BENCHMARK(1000000,MD5(1)) FROM points_table
        where CURRENT_USER() like 'root@localhost' limit 1)</strong></code></pre>
<p>The only problem is that this injection only works if the first SELECT statement actually has more than one row to order (this is because of MySQL performance enhancements). So to be able to exploit this particular SQL injection, we had to buy two items from the e-commerce store in order to add a couple of rows to the points_table, which would then trigger the sub-select in the order by section of the query.</p>
<p>The above injection can be modified to perform almost any query to the database, which leads to total e-commerce web application compromise.</p>
<p>The conclusion is simple: while automated tools can help is in many cases, an experienced security professional can never be replaced.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/not-the-average-sql-injection/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Web Application Security Training in Buenos Aires</title>
		<link>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-in-buenos-aires/</link>
		<comments>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-in-buenos-aires/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 19:29:36 +0000</pubDate>
		<dc:creator>andres.riancho</dc:creator>
				<category><![CDATA[bonsai]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[w3af]]></category>
		<category><![CDATA[argentina]]></category>
		<category><![CDATA[buenos aires]]></category>
		<category><![CDATA[capacitación técnica]]></category>
		<category><![CDATA[trainings]]></category>
		<category><![CDATA[Web Application Security]]></category>
		<category><![CDATA[web application security training]]></category>

		<guid isPermaLink="false">http://www.bonsai-sec.com/blog/?p=185</guid>
		<description><![CDATA[Bonsai’s information security trainings are usually delivered in-company, but after receiving numerous requests we organized our first open training where employees from different organizations can attend.
The training course is going to be delivered in four classes of three and a half hours, from 18:30 to 22:00 on Tuesdays; starting July the 14th, and is going [...]]]></description>
			<content:encoded><![CDATA[<p>Bonsai’s <a title="information security trainings" href="http://www.bonsai-sec.com/en/education/" target="_self">information security trainings</a> are usually delivered in-company, but after receiving numerous requests we organized our first <em>open</em> training where employees from different organizations can attend.</p>
<p>The training course is going to be delivered in four classes of three and a half hours, from 18:30 to 22:00 on Tuesdays; starting July the 14th, and is going to be delivered by Andrés Riancho.</p>
<p>More information about the <a title="Web Application Security Training in Buenos Aires" href="http://www.bonsai-sec.com/en/education/web-security-buenos-aires.php" target="_self">Web Application Security Training in Buenos Aires</a> can be found <a title="Web Application Security Training in Buenos Aires" href="http://www.bonsai-sec.com/en/education/web-security-buenos-aires.php" target="_self" rel="nofollow">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bonsai-sec.com/blog/index.php/web-application-security-training-in-buenos-aires/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

