<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.9.1" -->
<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/"
	>

<channel>
	<title>Usefulfor.com Master Site Feed</title>
	<link>http://usefulfor.com</link>
	<description>Shows all posts, comments, and pages from all blogs on this WPMU powered site</description>
	<pubDate>Mon, 07 Dec 2009 23:20:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<item>
		<title>How to get Rails 2.3.5 in Debian stable in three easy steps</title>
		<link>http://usefulfor.com/ruby/2009/12/08/how-to-get-rails-2-3-5-in-debian-stable-in-three-easy-steps/</link>
		<comments>http://usefulfor.com/ruby/2009/12/08/how-to-get-rails-2-3-5-in-debian-stable-in-three-easy-steps/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 23:20:56 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=96</guid>
		<description><![CDATA[All steps are to be run as root.
Step #1: install RubyGems:
apt-get install rubygems
Step #2: update RubyGems:
gem install rubygems-update --version=1.3.4
Step #3: get Rails 2.3.5:
gem install rails --no-rdoc --no-ri
]]></description>
			<content:encoded><![CDATA[<p>All steps are to be run as root.</p>
<p><strong>Step #1</strong>: install RubyGems:<br />
<code>apt-get install rubygems</code></p>
<p><strong>Step #2</strong>: update RubyGems:<br />
<code>gem install rubygems-update --version=1.3.4</code></p>
<p><strong>Step #3</strong>: get Rails 2.3.5:<br />
<code>gem install rails --no-rdoc --no-ri</code></p>
<script type="text/javascript">AKPC_IDS += "96,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Java Bytecode Injection</title>
		<link>http://usefulfor.com/security/2009/10/26/java-bytecode-injection/</link>
		<comments>http://usefulfor.com/security/2009/10/26/java-bytecode-injection/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 10:58:20 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[hack-fu]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=149</guid>
		<description><![CDATA[When assessing the security posture of a Java thick application we can usually process the code through a decompiler (such as Jad) and have a proper look at the code. It may be the case that we need to bypass the SSL checks but that is usually it.
However, every now and then, we stumble upon [...]]]></description>
			<content:encoded><![CDATA[<p>When assessing the security posture of a Java thick application we can usually process the code through a decompiler (such as <a href="http://www.varaneckas.com/jad">Jad</a>) and have a proper look at the code. It may be the case that we need to <a href="http://usefulfor.com/security/2009/06/23/bypassing-java-thick-client-ssl-checks/">bypass the SSL checks</a> but that is usually it.</p>
<p>However, every now and then, we stumble upon more complex scenarios, for instance, an application whose code has been obfuscated causing decompilation errors. In that case it will no longer be enough to decompile, modify the code and compile again, we would need some other technique. Patching the .class file at the bytecode level sounds like a reasonable approach.</p>
<script type="text/javascript">AKPC_IDS += "149,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Query the OSVDB using Ruby</title>
		<link>http://usefulfor.com/ruby/2009/10/16/query-osvdb-using-ruby/</link>
		<comments>http://usefulfor.com/ruby/2009/10/16/query-osvdb-using-ruby/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 17:43:08 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=88</guid>
		<description><![CDATA[A few weeks ago we published the Open Source Vulnerability Database (OSVDB) Import Plugin for the Dradis Framework. At that point we thought that it would be nice to separate the code and create an independent Ruby module that can be used to query the OSVDB.
It turned out that an osvdb project already existed in [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago we published the Open Source Vulnerability Database (OSVDB) Import Plugin for the <a href="http://dradisframework.org/">Dradis Framework</a>. At that point we thought that it would be nice to separate the code and create an independent Ruby module that can be used to query the OSVDB.</p>
<p>It turned out that an <a href="http://rubyforge.org/projects/osvdb/">osvdb project</a> already existed in RubyForge so we have submitted our code there.</p>
<p>There are no releases so far but the code in the repository is working. In order to get it:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> checkout http:<span style="color: #000000; font-weight: bold;">//</span>osvdb.rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk osvdb</pre></div></div>

<p>As well as implementations for the &#8216;Find by Microsoft Security Bulletin ID&#8217; and &#8216;OSVDB ID Lookup&#8217; queries, the repository contains test cases and a Rakefile to generate RDoc documentation for the library.</p>
<p>Stay tuned for updates.</p>
<script type="text/javascript">AKPC_IDS += "88,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Beware of JBoss&#8217; &#8220;SecureIdentityLoginModule&#8221;</title>
		<link>http://usefulfor.com/security/2009/09/24/beware-of-jboss-secureidentityloginmodule/</link>
		<comments>http://usefulfor.com/security/2009/09/24/beware-of-jboss-secureidentityloginmodule/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 23:05:16 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Webapp security]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=138</guid>
		<description><![CDATA[From JBoss&#8217; Community Wiki EncryptingDataSourcePasswords page:

The org.jboss.resource.security.SecureIdentityLoginModule from jboss-jca.jar can be used to encrypt database passwords rather than using clear text passwords in the DataSource configuration. [...]

Which in principle, is a great thing. The problem being that usually database credentials end up being placed in the web application configuration file in clear text. However:
[...] It [...]]]></description>
			<content:encoded><![CDATA[<p>From JBoss&#8217; Community Wiki <a href="http://www.jboss.org/community/wiki/EncryptingDataSourcePasswords">EncryptingDataSourcePasswords</a> page:</p>
<blockquote><p>
The <code>org.jboss.resource.security.SecureIdentityLoginModule</code> from <code>jboss-jca.jar</code> can be used to encrypt database passwords rather than using clear text passwords in the DataSource configuration. [...]
</p></blockquote>
<p>Which in principle, is a great thing. The problem being that usually database credentials end up being placed in the web application configuration file in clear text. However:</p>
<blockquote><p>[...] It uses a hard-coded password to encrypt/decrypt the DataSource password.</p></blockquote>
<p>Bottom line, anyone using the <a href="http://docs.huihoo.com/javadoc/jboss/4.0.2/org/jboss/resource/security/SecureIdentityLoginModule.java.html">SecureIdentityLoginModule</a> to encrypt their password in the configuration file is doing it with a Blowfish algorithm and well known key. So if during an engagement you find a configuration snippet similar to the one below:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;policy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
[...]
  <span style="color: #808080; font-style: italic;">&lt;!-- Example usage of the SecureIdentityLoginModule --&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;application-policy</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;EncryptDBPassword&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;authentication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;login-module</span> <span style="color: #000066;">code</span>=<span style="color: #ff0000;">&quot;org.jboss.resource.security.SecureIdentityLoginModule&quot;</span> <span style="color: #000066;">flag</span>=<span style="color: #ff0000;">&quot;required&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module-option</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;username&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>sa<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module-option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module-option</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;password&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>5dfc52b51bd35553df8592078de921bc<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module-option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;module-option</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;managedConnectionFactoryName&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>[...]<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/module-option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/login-module<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/authentication<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/application-policy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
[...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/policy<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>You should be able to reverse the encryption and get the credentials in clear text. <a href="http://github.com/usefulfor/usefulfor/raw/master/security/JBoss.java">JBoss.java</a> can help you with this, it is now available in <a href="http://github.com/usefulfor/usefulfor">usefulfor&#8217;s repository</a> at GitHub.</p>
<script type="text/javascript">AKPC_IDS += "138,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>DEFCON 17: a late write up</title>
		<link>http://usefulfor.com/security/2009/08/19/defcon-17-a-late-write-up/</link>
		<comments>http://usefulfor.com/security/2009/08/19/defcon-17-a-late-write-up/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 14:36:07 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=111</guid>
		<description><![CDATA[This year&#8217;s DEFCON was quite amazing, apparently 10k people showed up in the Riviera for it. This is a late write up because everybody knows already about the fake ATM and the RFID reader near the Wall of Sheep, on the other hand, not everybody knows about other things that also took place. By the [...]]]></description>
			<content:encoded><![CDATA[<p>This year&#8217;s DEFCON was quite amazing, apparently 10k people showed up in the Riviera for it. This is a late write up because everybody knows already about the <a href="http://twitterfall.com/defcon+atm">fake ATM</a> and the <a href="http://www.wired.com/threatlevel/2009/08/fed-rfid/">RFID reader near the Wall of Sheep</a>, on the other hand, not everybody knows about <a href="https://pics.defcon.org//showphoto.php?photo=648">other things</a> that also took place. By the way, this is how the back side of one of the ATMs at the conference looked like:</p>
<p><img src="http://usefulfor.com/security/files/2009/08/080209235543.jpg" alt="DEFCON ATM back side: RJ45 connector exposed" width="360" height="480" class="aligncenter size-full wp-image-114" /></p>
<p>The truth is that you would need 2 or 3 duplicates to get to do all the stuff that you want to do. There are just too many talks, <a href="http://defcon.org/html/defcon-17/dc-17-contest-results.html">contests</a> and random stuff going on that it is not possible to cover it all. Anyway, below is a breakdown of the talks I managed to get in. </p>
<script type="text/javascript">AKPC_IDS += "111,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Bypassing Java thick client SSL checks</title>
		<link>http://usefulfor.com/security/2009/06/23/bypassing-java-thick-client-ssl-checks/</link>
		<comments>http://usefulfor.com/security/2009/06/23/bypassing-java-thick-client-ssl-checks/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 18:20:36 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hack-fu]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=110</guid>
		<description><![CDATA[x509 certificate generation
Generate the certificate using OpenSSL:-

$ openssl genrsa 1024 &#62; foo.key
$ openssl req -new -x509 -nodes -sha1 -days 7300 -key foo.key &#62; foo.crt
$ openssl pkcs12 -export -out foo.p12 -in foo.crt -inkey foo.key -name &#34;your name&#34;

You will need the .p12 file (contains key and certificate) to configure Burp. And the .crt file to add it [...]]]></description>
			<content:encoded><![CDATA[<h2>x509 certificate generation</h2>
<p>Generate the certificate using <a href="http://www.openssl.org/">OpenSSL</a>:-</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ openssl genrsa <span style="color: #000000;">1024</span> <span style="color: #000000; font-weight: bold;">&gt;</span> foo.key
$ openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-nodes</span> <span style="color: #660033;">-sha1</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">7300</span> <span style="color: #660033;">-key</span> foo.key <span style="color: #000000; font-weight: bold;">&gt;</span> foo.crt
$ openssl pkcs12 <span style="color: #660033;">-export</span> <span style="color: #660033;">-out</span> foo.p12 <span style="color: #660033;">-in</span> foo.crt <span style="color: #660033;">-inkey</span> foo.key <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;your name&quot;</span></pre></div></div>

<p>You will need the .p12 file (contains key and certificate) to configure <a href="http://portswigger.net/suite/">Burp</a>. And the .crt file to add it to the Java <em>keystore</em> used by the client. Checkout <a href="http://portswigger.net/proxy/help.html">Burp&#8217;s help page</a> for instructions on how to get the first done.</p>
<h2>Create a Java <em>keystore</em>, import the certificate</h2>
<p>Straightforward enough (just remember the password you entered):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">keytool.exe <span style="color: #660033;">-import</span> <span style="color: #660033;">-file</span> foo.crt <span style="color: #660033;">-keystore</span> usefulfor.jks <span style="color: #660033;">-alias</span> burpcert</pre></div></div>

<h2>Run the application and point it to your keystore</h2>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">java \
  -Djavax.net.ssl.trustStore=usefulfor.jks \
  -Djavax.net.ssl.trustStorePassword=password \
  -Djavax.net.debug=all  \
  com.usefulfor.Demo</pre></div></div>

<p>Other interesting properties that you may need in order to further tweak the SSL configuration are <code>javax.net.ssl.keyStore</code> and <code>javax.net.ssl.keyStorePassword</code>.</p>
<script type="text/javascript">AKPC_IDS += "110,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>x509 certificate basics</title>
		<link>http://usefulfor.com/nothing/2009/06/10/x509-certificate-basics/</link>
		<comments>http://usefulfor.com/nothing/2009/06/10/x509-certificate-basics/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 21:02:41 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://usefulfor.com/nothing/?p=64</guid>
		<description><![CDATA[This post contains the bare minimums you need to start working with x509 certificates. After reading the post you should have a better idea about the meaning of the different acronyms related with SSL certificates (ASN1, DER, PEM, etc.). You will also have a better understanding of the format of the certificate. 
Tools are provided [...]]]></description>
			<content:encoded><![CDATA[<p>This post contains the bare minimums you need to start working with x509 certificates. After reading the post you should have a better idea about the meaning of the different acronyms related with SSL certificates (ASN1, DER, PEM, etc.). You will also have a better understanding of the format of the certificate. </p>
<p>Tools are provided to create your own certificates and also to use the certificates you have created in SSL communications. The information in this article should be valuable in understanding the certificate format and useful if you need to work with certificate parsing, SSL implementations or fuzzing of the related technologies.</p>
<script type="text/javascript">AKPC_IDS += "64,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>How to create a dradis export plugin?</title>
		<link>http://usefulfor.com/ruby/2009/03/27/how-to-create-a-dradis-export-plugin/</link>
		<comments>http://usefulfor.com/ruby/2009/03/27/how-to-create-a-dradis-export-plugin/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 01:04:47 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[dradis]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=87</guid>
		<description><![CDATA[Although we presented some of this concepts already in dradis reporting: quick &#38; neat word export, here is the step by step guide to get an export plugin recognised by the dradis framework and ready to use!
Update (2009-04-09): Checkout the new import/export plugin generators at dradis community forums.
]]></description>
			<content:encoded><![CDATA[<p>Although we presented some of this concepts already in <a href="http://usefulfor.com/ruby/2009/02/15/dradis-reporting-quick-neat-word-export/">dradis reporting: quick &amp; neat word export</a>, here is the step by step guide to get an export plugin recognised by the <a href="http://dradisframework.org/">dradis framework</a> and ready to use!</p>
<p><strong>Update (2009-04-09)</strong>: Checkout the new import/export plugin generators at <a href="http://dradisframework.org/community/index.php?topic=7.msg9">dradis community forums</a>.</p>
<script type="text/javascript">AKPC_IDS += "87,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Use Rails to Create a Static Site: Rake and Subversion</title>
		<link>http://usefulfor.com/ruby/2009/03/23/use-rails-to-create-a-static-site-rake-and-subversion/</link>
		<comments>http://usefulfor.com/ruby/2009/03/23/use-rails-to-create-a-static-site-rake-and-subversion/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 10:31:23 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=86</guid>
		<description><![CDATA[We have already seen how to Use Rails to Create a Static Site. In that article we left the site running, and we recommended the use of wget to generate the static copy. Although this is good enough, with a little bit of Rake we can make deployment easier.
]]></description>
			<content:encoded><![CDATA[<p>We have already seen how to <a href="http://usefulfor.com/ruby/2009/02/04/use-rails-to-create-a-static-site/">Use Rails to Create a Static Site</a>. In that article we left the site running, and we recommended the use of <code>wget</code> to generate the static copy. Although this is good enough, with a little bit of <a href="http://rake.rubyforge.org/">Rake</a> we can make deployment easier.</p>
<script type="text/javascript">AKPC_IDS += "86,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>dradis extensions: how they work and how to write them</title>
		<link>http://usefulfor.com/ruby/2009/02/17/dradis-extensions-how-they-work-and-how-to-write-them/</link>
		<comments>http://usefulfor.com/ruby/2009/02/17/dradis-extensions-how-they-work-and-how-to-write-them/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 23:33:24 +0000</pubDate>
		<dc:creator>siebert</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[dradis]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=84</guid>
		<description><![CDATA[Dradis is a tool used for structured information storage and sharing. Although it is applicable to various environments, it is originally aimed at information security consultants working alone or in a team. One of the great features of the application is that the client side&#8217;s functionality can be extended by what is called (quite creatively) [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dradis.sourceforge.net">Dradis</a> is a tool used for structured information storage and sharing. Although it is applicable to various environments, it is originally aimed at information security consultants working alone or in a team. One of the great features of the application is that the client side&#8217;s functionality can be extended by what is called (quite creatively) &#8211; <em>extensions</em>.</p>
<p>In this post I&#8217;ll be looking at what an extension is, how it fits into the dradis framework and how to write your own extensions.</p>
<p>You are welcome to jump ahead to the <strong><a href="#how_to">How do I write my own extension?</a></strong> if that is the only part that you are interested in.</p>
<script type="text/javascript">AKPC_IDS += "84,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>dradis reporting: quick &amp; neat word export</title>
		<link>http://usefulfor.com/ruby/2009/02/15/dradis-reporting-quick-neat-word-export/</link>
		<comments>http://usefulfor.com/ruby/2009/02/15/dradis-reporting-quick-neat-word-export/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 15:55:43 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[dradis]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=83</guid>
		<description><![CDATA[With over 800 downloads in the first two weeks of dradis v2.0, there is lots of interest on what is going to be next. We are working on solutions for importing and exporting data to and from the repository, but for those of you that can&#8217;t wait, we have put together a plug-in for the [...]]]></description>
			<content:encoded><![CDATA[<p>With over 800 downloads in the first two weeks of <a href="http://dradis.sourceforge.net/">dradis v2.0</a>, there is lots of interest on what is going to be next. We are working on solutions for importing and exporting data to and from the repository, but for those of you that can&#8217;t wait, we have put together a plug-in for the server that exports your notes to a Word file.</p>
<p>It is not the final solution, and it is not integrated with the web interface, but hopefully it will give you an idea of how easy is to get your own exporting modules for dradis.</p>
<script type="text/javascript">AKPC_IDS += "83,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>NSIS installer for a Ruby application &#8211; Part 3 &#8211; A few script improvements</title>
		<link>http://usefulfor.com/ruby/2009/02/09/nsis-installer-for-a-ruby-application-part-3-a-few-script-improvements/</link>
		<comments>http://usefulfor.com/ruby/2009/02/09/nsis-installer-for-a-ruby-application-part-3-a-few-script-improvements/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 10:53:08 +0000</pubDate>
		<dc:creator>siebert</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=82</guid>
		<description><![CDATA[In this part of the series (see Part 1 and Part 2) we will:

Make one of the components compulsory to install.
We will look at a way to write our script in such a way that it can be reused for future releases of MyApplication.
A few extra tips and tricks.

]]></description>
			<content:encoded><![CDATA[<p>In this part of the series (see <a title="Part 1" href="http://usefulfor.com/ruby/2009/02/02/nsis-installer-for-a-ruby-application-part-1-hm-nis-wizard-output/">Part 1</a> and <a title="Part 2" href="http://usefulfor.com/ruby/2009/02/09/nsis-installer-for-a-ruby-application-part-2-install-ruby-and-a-gem/">Part 2</a>) we will:</p>
<ul>
<li>Make one of the components compulsory to install.</li>
<li>We will look at a way to write our script in such a way that it can be reused for future releases of MyApplication.</li>
<li>A few extra tips and tricks.</li>
</ul>
<script type="text/javascript">AKPC_IDS += "82,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>NSIS installer for a Ruby application &#8211; Part 2 &#8211; Install Ruby and a gem</title>
		<link>http://usefulfor.com/ruby/2009/02/09/nsis-installer-for-a-ruby-application-part-2-install-ruby-and-a-gem/</link>
		<comments>http://usefulfor.com/ruby/2009/02/09/nsis-installer-for-a-ruby-application-part-2-install-ruby-and-a-gem/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 23:24:05 +0000</pubDate>
		<dc:creator>siebert</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=78</guid>
		<description><![CDATA[In Part 1 of this series we had a look at the general structure of a NSIS script as it was created for us by the HM NIS editor and IDE. We previously defined three components to be installed by our installer:

Ruby (the target machine that our application is installed on requires Ruby)
MyGem (our application [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="/ruby/2009/02/02/nsis-installer-for-a-ruby-application-part-1-hm-nis-wizard-output/">Part 1</a> of this series we had a look at the general structure of a NSIS script as it was created for us by the HM NIS editor and IDE. We previously defined three components to be installed by our installer:</p>
<ul>
<li>Ruby (the target machine that our application is installed on requires Ruby)</li>
<li>MyGem (our application is dependent on this fictitious gem)</li>
<li>MyApplication (this is our application to be installed)</li>
</ul>
<p>In this part we will look at how we will let the installer take care of the Ruby and MyGem components.</p>
<script type="text/javascript">AKPC_IDS += "78,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Use Rails to Create a Static Site</title>
		<link>http://usefulfor.com/ruby/2009/02/04/use-rails-to-create-a-static-site/</link>
		<comments>http://usefulfor.com/ruby/2009/02/04/use-rails-to-create-a-static-site/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 12:00:16 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[dradis]]></category>
		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=75</guid>
		<description><![CDATA[One of the new things we released last week with dradis v2.0 was a new web site for the project (dradis.sourceforge.net).
The old site consisted of 20 static pages or so, which was nice and easy but a real pain to maintain or restructure. So we thought that letting Rails do the heavy lifting for us [...]]]></description>
			<content:encoded><![CDATA[<p>One of the new things we released last week with <a href="/security/2009/01/30/dradis-v2/">dradis v2.0</a> was a new web site for the project (<a href="http://dradis.sourceforge.net/">dradis.sourceforge.net</a>).</p>
<p>The old site consisted of 20 static pages or so, which was nice and easy but a real pain to maintain or restructure. So we thought that letting Rails do the heavy lifting for us would be a good idea, but we did not want to set up a Rail environment in the server&#8230;</p>
<p>What we finally did is use Rails as a tool to create a static site that we could <em>.tar.gz</em> and upload to the server. As a starting point we used a post in <a href="http://www.chuckvose.com/articles/2006/04/20/monkey">www.chuckvose.com</a> and this is how we completed it to fit our needs.
</p>
<p><strong>Follow up</strong> (2009-03-23): do not miss how to integrate your rails-static site with Rake and Subversion in the second article of this series: <a href="http://usefulfor.com/ruby/2009/03/23/use-rails-to-create-a-static-site-rake-and-subversion/">Use Rails to Create a Static Site: Rake and Subversion</a>.</p>
<script type="text/javascript">AKPC_IDS += "75,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>NSIS installer for a Ruby application &#8211; Part 1 &#8211; HM NIS wizard output</title>
		<link>http://usefulfor.com/ruby/2009/02/02/nsis-installer-for-a-ruby-application-part-1-hm-nis-wizard-output/</link>
		<comments>http://usefulfor.com/ruby/2009/02/02/nsis-installer-for-a-ruby-application-part-1-hm-nis-wizard-output/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 17:52:41 +0000</pubDate>
		<dc:creator>siebert</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=77</guid>
		<description><![CDATA[I am working on an NSIS (Nullsoft Scriptable Install System) installer for a Ruby application (Dradis &#8211; check it out!). In this series I will try to keep log of how I progress with this.
I am using HM NIS editor and IDE for NSIS to make the task a little easier. To get out of [...]]]></description>
			<content:encoded><![CDATA[<p>I am working on an <a title="http://nsis.sourceforge.net" href="http://nsis.sourceforge.net">NSIS</a> (Nullsoft Scriptable Install System) installer for a Ruby application (<a title="Dradis" href="http://dradis.sourceforge.net/">Dradis</a> &#8211; check it out!). In this series I will try to keep log of how I progress with this.</p>
<p>I am using <a title="HM NIS Edit" href="http://hmne.sourceforge.net">HM NIS</a> editor and IDE for NSIS to make the task a little easier. To get out of the blocks a little quicker I used the HM NIS wizard to create a simple framework from where I will progress.</p>
<script type="text/javascript">AKPC_IDS += "77,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>dradis v2.0 &#8211; flexibility unleashed</title>
		<link>http://usefulfor.com/security/2009/01/30/dradis-v2/</link>
		<comments>http://usefulfor.com/security/2009/01/30/dradis-v2/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 00:34:34 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=105</guid>
		<description><![CDATA[It has been a long time since the last formal release of dradis (remember the dradis v1.2 one-click installer?). But that does not mean we have been doing nothing in the mean time  
We have been working as hard as one can work: over 487 commits since then (check the stats), we went to [...]]]></description>
			<content:encoded><![CDATA[<p>It has been a long time since the last formal release of dradis (remember the <a href="/security/2008/06/13/dradis-v12-now-with-one-click-installer/">dradis v1.2 one-click installer</a>?). But that does not mean we have been doing nothing in the mean time <img src='http://usefulfor.com/security/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>We have been working as hard as one can work: over <strong>487</strong> commits since then (check <a href="http://sourceforge.net/project/stats/detail.php?group_id=209736&amp;ugn=dradis&amp;type=svn&amp;mode=12months">the stats</a>), we went to <a href="http://dradis.nomejortu.com/announcements.html#06aug08">DEFCON 16</a> where a pre-release of the new <strong>dradis v2.0</strong> was showcased&#8230; But finally we are here, there is a new release ready for you to try and get addicted to!</p>
<p>Lots of new features: new web interface (<strong>+10</strong> neatness, <strong>+20</strong> usability), new internal architecture (<strong>+30</strong> flexibility), new built-in modules (<strong>+10</strong> usefulness)&#8230;</p>
<script type="text/javascript">AKPC_IDS += "105,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>Unit testing your Ruby on Rails plugin</title>
		<link>http://usefulfor.com/ruby/2009/01/22/unit-testing-your-ruby-on-rails-plugin/</link>
		<comments>http://usefulfor.com/ruby/2009/01/22/unit-testing-your-ruby-on-rails-plugin/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 10:51:40 +0000</pubDate>
		<dc:creator>siebert</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://usefulfor.com/ruby/?p=74</guid>
		<description><![CDATA[So you want to write some tests for your hot new Rails plugin that extends the behaviour of a ActiveRecord model? The thing is &#8211; for it to be decent tests it needs to be functional outside of the context of you Rails application, so you need to create a temporary testing environment. I think [...]]]></description>
			<content:encoded><![CDATA[<p>So you want to write some tests for your hot new Rails plugin that extends the behaviour of a ActiveRecord model? The thing is &#8211; for it to be decent tests it needs to be functional outside of the context of you Rails application, so you need to create a temporary testing environment. I think there is a few ways to this but the following is what I did.</p>
<script type="text/javascript">AKPC_IDS += "74,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>DeepSec 2008</title>
		<link>http://usefulfor.com/security/2008/12/18/deepsec-2008/</link>
		<comments>http://usefulfor.com/security/2008/12/18/deepsec-2008/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 11:20:13 +0000</pubDate>
		<dc:creator>rdv</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=101</guid>
		<description><![CDATA[DeepSec 2008 took place in Vienna in November. For a period of two days attendees enjoyed a good set of talks, a good atmosphere and had the chance to talk to different people from different security backgrounds.
I was invited to present my &#8216;Behind Enemy lines&#8217; research, which mainly focused on different attack techniques that are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://deepsec.net/">DeepSec 2008</a> took place in Vienna in November. For a period of two days attendees enjoyed a good set of talks, a good atmosphere and had the chance to talk to different people from different security backgrounds.</p>
<p>I was invited to present my &#8216;Behind Enemy lines&#8217; research, which mainly focused on different attack techniques that are currently affecting a large number of administrative web interfaces.</p>
<p>The slides of this presentation can be found here: <a href="http://usefulfor.com/security/files/2008/12/mwri_behind-enemy-lines-presentation-deepsec2008.pdf">[1]</a></p>
<p>More information about this research can be found in the following white paper: <a href="http://usefulfor.com/security/files/2008/08/mwri_behind-enemy-lines_2008-07-25.pdf">[3]</a> <a href="http://www.mwrinfosecurity.com/publications/mwri_behind-enemy-lines_2008-07-25.pdf">[4]</a><br />
<a href="https://deepsec.net/"></p>
<script type="text/javascript">AKPC_IDS += "101,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>usefulfor.com now in twitter</title>
		<link>http://usefulfor.com/blog/2008/12/12/usefulforcom-now-in-twitter/</link>
		<comments>http://usefulfor.com/blog/2008/12/12/usefulforcom-now-in-twitter/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 15:06:10 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Community]]></category>

		<guid isPermaLink="false">http://usefulfor.com/?p=5</guid>
		<description><![CDATA[Because we all know there is some amazing content around, we have opened a twitter channel so we can point you to interesting articles that we come across on our daily browsing. Of course they will be related with the main areas of interest of the usefulfor community (/security, /ruby and /nothing).
What are you waiting [...]]]></description>
			<content:encoded><![CDATA[<p>Because we all know there is some amazing content around, we have opened a twitter channel so we can point you to interesting articles that we come across on our daily browsing. Of course they will be related with the main areas of interest of the <strong>usefulfor</strong> community (<a href="/security/">/security</a>, <a href="/ruby/">/ruby</a> and <a href="/nothing/">/nothing</a>).</p>
<p>What are you waiting for? Follow us on <a href="http://twitter.com/usefulfor">twitter.com/usefulfor</a> (also available through <a href="http://twitter.com/statuses/user_timeline/17620817.rss">RSS</a>).</p>
<p>If you stumble upon any interesting article, tutorial or piece of news that you think can be of interest to the community, do not hesitate in sending it to us to <strong>contribute[ {at} ]usefulfor{ [dot] }com</strong>.</p>
<script type="text/javascript">AKPC_IDS += "5,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
	<item>
		<title>lucent firewall ruleset parser</title>
		<link>http://usefulfor.com/security/2008/12/01/lucent-firewall-ruleset-parser/</link>
		<comments>http://usefulfor.com/security/2008/12/01/lucent-firewall-ruleset-parser/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:46:24 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://usefulfor.com/security/?p=102</guid>
		<description><![CDATA[Recently I had to go through the ruleset of a Lucent firewall, and the truth is that the export format of the rules is everything but easy to read.
The information is split into three files:

rules file: Contains the rules, each one takes about 72 lines (rules have many properties, each property is written in a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to go through the ruleset of a Lucent firewall, and the truth is that the export format of the rules is everything but easy to read.</p>
<p>The information is split into three files:</p>
<ul>
<li><strong>rules file</strong>: Contains the rules, each one takes about 72 lines (rules have many properties, each property is written in a separate line). Rules match source hosts with destination hosts and services, no surprise there, but the value of any of this three key fields can be an alias.</li>
<li><strong>hosts file</strong>: in this file the aliases for host groups are defined.</li>
<li><strong>services file</strong>: service groups are defined here.</li>
</ul>
<p>So the challenge here is: <em>how do we merge this three files into something meaningful?</em></p>
<p>I know that purists can do this with a bash one-liner that uses grep, awk and sed, but <a href="/ruby/">ruby</a> is my weapon of choice, so I created the <a href="/security/files/2008/12/lucent_metaparser.rb">lucent_metaparser.rb</a> script. It basically takes the three files and applies some regular expressions to extract the information and store it into data structures and then outputs the rules in format that is easy to go through. Here is an example:-</p>
<div class="hl-surround" ><div class="hl-main"><pre>1047: (CH43) 10.0.1.12 ---(both)--- RF400 [permit https - change 43] - enabled | pass
CH43: tcp/443/* ()
10.0.1.12
RF400: 192.168.1.140-192.168.1.145;192.252.1.155;192.252.1.120;
1048: (tcp/80) RF132 ---(both)--- PK012 [web traffic to the dmz - change 74] - enabled | pass
tcp/80
RF132: 172.0.1.38-172.0.1.226 (external reverse proxies)
PK012: 10.15.2.1;10.15.2.2; (internal servers)</pre></div></div>
<p>I know that it is not perfect and there is room for improvement, but the idea is that the script can be used as a starting point for the review process, and hopefully this will save us some time in the future <img src='http://usefulfor.com/security/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<script type="text/javascript">AKPC_IDS += "102,";</script><p class="akpc_pop">Popularity: unranked <span class="akpc_help">[<a href="http://alexking.org/projects/wordpress/popularity-contest" title="What does this mean?">?</a>]</span></p>]]></content:encoded>
			<wfw:commentRss></wfw:commentRss>
		</item>
</channel>
</rss>
<!-- 300 queries 0.624 seconds. -->
