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

<channel>
	<title>0xCAFED00D</title>
	<atom:link href="http://stevebirstok.com/wp/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://stevebirstok.com/wp</link>
	<description>Passing on the knowledge to hack the world around you.</description>
	<lastBuildDate>Mon, 03 Jan 2011 04:24:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Binary to Decimal &#8211; PHP</title>
		<link>http://stevebirstok.com/wp/?p=67</link>
		<comments>http://stevebirstok.com/wp/?p=67#comments</comments>
		<pubDate>Mon, 03 Jan 2011 04:24:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=67</guid>
		<description><![CDATA[Another snippet that converts a binary string into decimal. These are mostly done for practice purposes. &#60;?php $input = "100 0000 0100 0000 0100"; // d263172 $input = str_replace(' ', '', $input); // convert spaces to blank. (e.g.: 1000000010000000100) echo "Converting {$input} into decimal...\n\n"; $exp = 1; $total = 0; for($i = (strlen($input) - 1); [...]]]></description>
			<content:encoded><![CDATA[<p>Another snippet that converts a binary string into decimal.</p>
<p>These are mostly done for practice purposes.</p>
<p><code><br />
&lt;?php<br />
$input = "100 0000 0100 0000 0100"; // d263172<br />
$input = str_replace(' ', '', $input); // convert spaces to blank. (e.g.: 1000000010000000100)<br />
echo "Converting {$input} into decimal...\n\n";<br />
$exp = 1;<br />
$total = 0;<br />
for($i = (strlen($input) - 1); $i &gt; -1; $i--) { // start from the back of the string, and work our way to the left.<br />
if($input[$i] == "1") $total += $exp; // if current position is 1, increase our total by the current power value<br />
$exp *= 2; // increase to next power of 2.<br />
}<br />
echo number_format($total); // output in a formatted string (e.g.: 263,172)<br />
?&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=67</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burger King Code Generator</title>
		<link>http://stevebirstok.com/wp/?p=61</link>
		<comments>http://stevebirstok.com/wp/?p=61#comments</comments>
		<pubDate>Mon, 03 Jan 2011 04:19:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=61</guid>
		<description><![CDATA[Quick Snippet of code to generate &#8220;free whopper&#8221; coupon codes for Burger King. &#60;?php $months = array("BB","LS","JH","PL","BK", "WH","FF","BF","CF","CK","CB","VM"); $code = $months[(int)date('m')-1]; for($i=0; $i &#60; 5; $i++) $code .= rand(0, 9); echo $code."\n"; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>Quick Snippet of code to generate &#8220;free whopper&#8221; coupon codes for Burger King.</p>
<p><code><br />
&lt;?php<br />
$months = array("BB","LS","JH","PL","BK",<br />
"WH","FF","BF","CF","CK","CB","VM");<br />
$code = $months[(int)date('m')-1];<br />
for($i=0; $i &lt; 5; $i++) $code .= rand(0, 9);<br />
echo $code."\n";<br />
?&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DeVry: Bypassing Bluesocket</title>
		<link>http://stevebirstok.com/wp/?p=59</link>
		<comments>http://stevebirstok.com/wp/?p=59#comments</comments>
		<pubDate>Sun, 14 Nov 2010 18:49:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[/dev/urandom]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=59</guid>
		<description><![CDATA[My DeVry campus recently integrated a new system for the wireless networks. It&#8217;s a very controversial application; it scans everything on your computer to verify that you aren&#8217;t using any torrent/p2p software, as well as ensuring that you have a virus scanner that has been approved. If you fail to meet any of the requirements, [...]]]></description>
			<content:encoded><![CDATA[<p>My DeVry campus recently integrated a new system for the wireless networks.</p>
<p>It&#8217;s a very controversial application; it scans everything on your computer to verify that you aren&#8217;t using any torrent/p2p software, as well as ensuring that you have a virus scanner that has been approved.</p>
<p>If you fail to meet any of the requirements, or the system simply finds something it doesn&#8217;t like: you are not getting online.</p>
<p>That is, until a workaround was found.</p>
<p><span id="more-59"></span>The workaround is actually very simple.</p>
<p>All you have to do is spoof your <a title="User Agent" href="http://en.wikipedia.org/wiki/User_agent" target="_blank">user agent</a> to resemble a mobile device, and you will instantly be granted access.</p>
<p>The easiest way to do this is with Firefox.</p>
<p>You can install the <a title="User Agent Switcher" href="https://addons.mozilla.org/en-US/firefox/addon/59/" target="_blank">user agent switcher addon</a> or follow these steps:</p>
<ol>
<li>Navigate to &#8220;about:config&#8221; (without the &#8220;&#8221;&#8216;s)</li>
<li>In the search/filter box type: &#8220;general.useragent.extra.firefox&#8221;</li>
<li>Double click the result, copy the string that is currently there (should be similar to &#8220;Firefox xx/xx&#8221;)</li>
<li>Type in &#8220;Android&#8221;</li>
<li>Save</li>
<li>Head over to any site, and boom! You have access</li>
</ol>
<p>After getting access you can put that setting back to normal and continue on with business as usual.</p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with IPs and Subnets!</title>
		<link>http://stevebirstok.com/wp/?p=45</link>
		<comments>http://stevebirstok.com/wp/?p=45#comments</comments>
		<pubDate>Sat, 24 Jul 2010 01:09:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[/dev/urandom]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=45</guid>
		<description><![CDATA[So, I&#8217;m studying to earn my CCNA and I had to learn subnetting again. I felt like I should share this with you guys, seeing how I learnt some neat tricks that I&#8217;ve never seen before (allowing me to solve subnet based problems very quickly.) So let&#8217;s jump right to it! Finding CIDR equivalents. 255.255.255.0 [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;m studying to earn my CCNA and I had to learn subnetting again.</p>
<p>I felt like I should share this with you guys, seeing how I learnt some neat tricks that I&#8217;ve never seen before (allowing me to solve subnet based problems very quickly.)</p>
<p>So let&#8217;s jump right to it!</p>
<p><span id="more-45"></span></p>
<p>Finding CIDR equivalents.</p>
<blockquote>
<pre>255.255.255.0</pre>
<pre>FF.FF.FF.00</pre>
<pre>11111111.11111111.11111111.00000000</pre>
<pre>8 one's.8 one's.8 one's.zero</pre>
<pre>8+8+8 = 24</pre>
<pre>CIDR: /24</pre>
</blockquote>
<p>this works for every example (that i&#8217;ve seen.)</p>
<p>It also works in reverse.</p>
<blockquote>
<pre>CIDR: /30</pre>
<pre>30 - 8 = 22 - 8 = 14 - 8 = 6</pre>
<pre>we subtracted 8 three times (255.255.255) and we have 6 left over</pre>
<pre>11111111.11111111.11111111.11111100</pre>
<pre>FF.FF.FF.FC</pre>
<pre>255.255.255.252</pre>
</blockquote>
<p>These are some methods I saw for determining ranges:</p>
<blockquote>
<pre>192.168.5.0/26 or 192.168.5.0 255.255.255.192</pre>
<pre>convert to binary (192.168.5.0 to binary)
11000000.01111110.00000101.00000000</pre>
<pre>00 | first (network id)
01 | first host
10 | last host
11 | broadcast</pre>
<pre>11000000.01111110.00000101.00|000000 = 192.168.5.0 (network id)</pre>
<pre>11000000.01111110.00000101.00|000001 = 192.168.5.1 (first host)</pre>
<pre>11000000.01111110.00000101.00|111110 = 192.168.5.62 (last host)</pre>
<pre>11000000.01111110.00000101.00|111111 = 192.168.5.63 (broadcast)</pre>
<pre>1.2.3.4/8 or 1.2.3.4 255.0.0.0</pre>
<pre>00000001.00000010.00000011.00000100</pre>
<pre>00000001.|00000000.00000000.00000000 = 1.0.0.0 (network id)</pre>
<pre>00000001.|00000000.00000000.00000001 = 1.0.0.1 (first host)</pre>
<pre>00000001.|11111111.11111111.11111110 = 1.255.255.254 (last host)</pre>
<pre>00000001.|11111111.11111111.11111111 = 1.255.255.255 (broadcast)</pre>
</blockquote>
<p>This is just a quick post put together showing how to do subnets and playing with hosts per subnet and etc.</p>
<p>Hope someone finds it useful! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=45</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Whitepages Application</title>
		<link>http://stevebirstok.com/wp/?p=37</link>
		<comments>http://stevebirstok.com/wp/?p=37#comments</comments>
		<pubDate>Sun, 04 Jul 2010 19:08:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Reversing]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=37</guid>
		<description><![CDATA[Quick little post&#8230; Many of you may remember the &#8220;hidden whitepages screen&#8221; from a while back. Today I was fooling around and decided to grab the latest copy of the Whitepages app ($7, why not?) and I noticed the &#8220;415&#8243; trick no longer worked. Took a quick look around, and discovered their new method of [...]]]></description>
			<content:encoded><![CDATA[<p>Quick little post&#8230;</p>
<p>Many of you may remember the <a href="http://twitter.com/haykuro/status/4115600315" target="_blank">&#8220;hidden whitepages screen&#8221; from a while back</a>.</p>
<p>Today I was fooling around and decided to grab the latest copy of the Whitepages app ($7, why not?) and I noticed the &#8220;415&#8243; trick no longer worked.</p>
<p>Took a quick look around, and discovered their new method of accessing the hidden screen.</p>
<p>Two taps on the &#8220;Whitepages&#8221; logo, and two taps on the &#8220;developer&#8221; logo and it&#8217;ll pan you right over to the hidden screen.</p>
<p>Enjoy!</p>
<p><em>Oh, and happy fourth of July everyone :)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=37</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MyScribe DRM</title>
		<link>http://stevebirstok.com/wp/?p=24</link>
		<comments>http://stevebirstok.com/wp/?p=24#comments</comments>
		<pubDate>Mon, 28 Jun 2010 04:41:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[/dev/urandom]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=24</guid>
		<description><![CDATA[I am a soon-to-be student at DeVry University. I chose the school (mostly) because of its guaranteed job placement. My friend, who also graduated recently from DeVry, is currently a network administrator at a Hard Rock Hotel &#38; Casino in South Florida thanks to DeVry. But that&#8217;s besides the point. DeVry, like few other colleges, [...]]]></description>
			<content:encoded><![CDATA[<p>I am a soon-to-be student at DeVry University.</p>
<p>I chose the school (mostly) because of its guaranteed job placement. My friend, who also graduated recently from DeVry, is currently a network administrator at a Hard Rock Hotel &amp; Casino in South Florida thanks to DeVry.</p>
<p>But that&#8217;s besides the point.</p>
<p>DeVry, like few other colleges, has chosen to use an online system called &#8220;MyScribe&#8221; (owned by the site CafeScribe.com ["Fourteen40, Inc."])</p>
<p>The charges for the EBook are automatic, and the online classes even tell you that the books are available online &#8220;for portability.&#8221;</p>
<p>The problem? It&#8217;s all DRMed.</p>
<p>You can&#8217;t view the books anywhere other than a windows-based environment with MyScribe installed (or using it&#8217;s portable client).</p>
<p>But this can easily be bypassed.</p>
<p><span id="more-24"></span></p>
<p><em>Legal Disclaimer: I do not condone the illegal reproduction of any works accessible through MyScribe, and you cannot hold me responsible for anything discussed within this post. By reading this technique, you agree and understand that it is simply for educational purposes, and must NEVER be used in a real life application.</em></p>
<p>With that said..</p>
<blockquote><p>Install a &#8220;print-to-pdf&#8221; enabled software. (CutePDF is freeware, and can be found online)<br />
Open up MyScribe.<br />
Select the book you&#8217;d like to read elsewhere.<br />
File -&gt; Print.<br />
Select &#8220;all pages&#8221;<br />
Press Print<br />
Select your software PDF converter.<br />
Print.<br />
Enjoy DRM-Free PDF EBooks. :)</p></blockquote>
<ol></ol>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 2px; width: 1px; height: 1px; overflow: hidden;">Fourteen40Four</div>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=24</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Binary bomb (part 1)</title>
		<link>http://stevebirstok.com/wp/?p=16</link>
		<comments>http://stevebirstok.com/wp/?p=16#comments</comments>
		<pubDate>Sun, 04 Apr 2010 02:52:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Reversing]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=16</guid>
		<description><![CDATA[In today&#8217;s lesson I&#8217;m going to go over hacking a &#8220;binary bomb.&#8221; I found this bomb on the ubuntu forums, although a copy can be downloaded off my server (for archiving purposes, etc) So let&#8217;s get to it! Tools required: - demobomb (the binary bomb!) - GDB (should come stock on mainstream distro&#8217;s.) Hacking it: [...]]]></description>
			<content:encoded><![CDATA[<p>In today&#8217;s lesson I&#8217;m going to go over hacking a &#8220;binary bomb.&#8221;</p>
<p>I found this bomb on the <a title="ubuntu forums" href="http://ubuntuforums.org/showpost.php?p=3740524&amp;postcount=3" target="_blank">ubuntu forums</a>, although a copy can be downloaded off <a title="demobomb" href="http://www.stevebirstok.com/other/demobomb">my server</a> (for archiving purposes, etc)</p>
<p>So let&#8217;s get to it!</p>
<p><span id="more-16"></span></p>
<p>Tools required:</p>
<p>- demobomb (the binary bomb!)</p>
<p>- GDB (should come stock on mainstream distro&#8217;s.)</p>
<p>Hacking it:</p>
<p>Binary bombs usually come in &#8220;phases.&#8221; These phases are, for the most part, just different layers of protection before you reach the ending.</p>
<p>Phase 1:</p>
<p><code>$ gdb ./demobomb<br />
(gdb) set disassembly-flavor intel <span style="color: #ff0000;">; set gdb to display disassembly in intel format (easier to read)</span><br />
(gdb) break main<br />
Breakpoint 1 at 0x80484af</code></p>
<p>we set a breakpoint on &#8220;main&#8221; so the app won&#8217;t run through by itself</p>
<p><code>(gdb) disas main<br />
Dump of assembler code for function main:<br />
0x080484a1 &lt;main+0&gt;:	lea    ecx,[esp+0x4]<br />
0x080484a5 &lt;main+4&gt;:	and    esp,0xfffffff0<br />
0x080484a8 &lt;main+7&gt;:	push   DWORD PTR [ecx-0x4]<br />
0x080484ab &lt;main+10&gt;:	push   ebp<br />
0x080484ac &lt;main+11&gt;:	mov    ebp,esp<br />
0x080484ae &lt;main+13&gt;:	push   ecx<br />
0x080484af &lt;main+14&gt;:	sub    esp,0x4<br />
0x080484b2 &lt;main+17&gt;:	mov    DWORD PTR [esp],0x80485bc<br />
0x080484b9 &lt;main+24&gt;:	call   0x8048314 &lt;puts@plt&gt; <span style="color: #ff0000;">; welcome message</span><br />
0x080484be &lt;main+29&gt;:	mov    DWORD PTR [esp],0x80485b4<br />
0x080484c5 &lt;main+36&gt;:	call   0x8048314 &lt;puts@plt&gt;<br />
0x080484ca &lt;main+41&gt;:	call   0x804843e &lt;phase_1_of_1&gt; <span style="color: #ff0000;">; heres the call that sends us into our first phase! let's set a breakpoint on it</span><br />
0x080484cf &lt;main+46&gt;:	mov    DWORD PTR [esp],0x8048618<br />
0x080484d6 &lt;main+53&gt;:	call   0x8048314 &lt;puts@plt&gt;<br />
0x080484db &lt;main+58&gt;:	mov    eax,0x0<br />
0x080484e0 &lt;main+63&gt;:	add    esp,0x4<br />
0x080484e3 &lt;main+66&gt;:	pop    ecx<br />
0x080484e4 &lt;main+67&gt;:	pop    ebp<br />
0x080484e5 &lt;main+68&gt;:	lea    esp,[ecx-0x4]<br />
0x080484e8 &lt;main+71&gt;:	ret<br />
End of assembler dump.<br />
(gdb) break phase_1_of_1<br />
Breakpoint 2 at 0x8048444</code></p>
<p>now let&#8217;s look at our first phase</p>
<p><code>(gdb) disas phase_1_of_1<br />
Dump of assembler code for function phase_1_of_1:<br />
0x0804843e &lt;phase_1_of_1+0&gt;:	push   ebp<br />
0x0804843f &lt;phase_1_of_1+1&gt;:	mov    ebp,esp<br />
0x08048441 &lt;phase_1_of_1+3&gt;:	sub    esp,0x28<br />
0x08048444 &lt;phase_1_of_1+6&gt;:	lea    eax,[ebp-0x8]<br />
0x08048447 &lt;phase_1_of_1+9&gt;:	mov    DWORD PTR [esp+0xc],eax<br />
0x0804844b &lt;phase_1_of_1+13&gt;:	lea    eax,[ebp-0x4]<br />
0x0804844e &lt;phase_1_of_1+16&gt;:	mov    DWORD PTR [esp+0x8],eax<br />
0x08048452 &lt;phase_1_of_1+20&gt;:	mov    DWORD PTR [esp+0x4],0x80485ae<br />
0x0804845a &lt;phase_1_of_1+28&gt;:	mov    eax,ds:0x804974c<br />
0x0804845f &lt;phase_1_of_1+33&gt;:	mov    DWORD PTR [esp],eax<br />
0x08048462 &lt;phase_1_of_1+36&gt;:	call   0x8048324 &lt;fscanf@plt&gt; <span style="color: #ff0000;">; grab every integer in our input (separated by blank space [return (\x0a), or space [\x20])</span><br />
0x08048467 &lt;phase_1_of_1+41&gt;:	cmp    eax,0x2<span style="color: #ff0000;"> ; compare how many integers we inputted (again, separated by blank space) to 2</span><br />
0x0804846a &lt;phase_1_of_1+44&gt;:	je     0x8048471 &lt;phase_1_of_1+51&gt; <span style="color: #ff0000;">; if we put in exactly 2 integers, jump to +51, if not.. continue</span><br />
0x0804846c &lt;phase_1_of_1+46&gt;:	call   0x8048420 &lt;explode_bomb&gt; <span style="color: #ff0000;">; explode</span><br />
0x08048471 &lt;phase_1_of_1+51&gt;:	mov    edx,DWORD PTR [ebp-0x4] <span style="color: #ff0000;">; land here from previous jump (move our first integer into edx)</span><br />
0x08048474 &lt;phase_1_of_1+54&gt;:	mov    ecx,0x1 <span style="color: #ff0000;">; set ecx to 1, land here if jump</span><br />
0x08048479 &lt;phase_1_of_1+59&gt;:	cmp    edx,0x1 <span style="color: #ff0000;">; compare edx to 1</span><br />
0x0804847c &lt;phase_1_of_1+62&gt;:	jle    0x8048492 &lt;phase_1_of_1+84&gt; <span style="color: #ff0000;">; if edx is less than or equal to 1, jump to check at +84</span><br />
0x0804847e &lt;phase_1_of_1+64&gt;:	mov    eax,0x1 <span style="color: #ff0000;">; set eax to 1</span><br />
0x08048483 &lt;phase_1_of_1+69&gt;:	mov    ecx,0x1 <span style="color: #ff0000;">; set ecx to 1</span><br />
0x08048488 &lt;phase_1_of_1+74&gt;:	imul   ecx,eax <span style="color: #ff0000;">; multiply ecx by eax (store in ecx)</span><br />
0x0804848b &lt;phase_1_of_1+77&gt;:	add    eax,0x1 <span style="color: #ff0000;">; eax++</span><br />
0x0804848e &lt;phase_1_of_1+80&gt;:	cmp    edx,eax <span style="color: #ff0000;">; compare edx (first input) to eax (number of times we looped)</span><br />
0x08048490 &lt;phase_1_of_1+82&gt;:	jne    0x8048488 &lt;phase_1_of_1+74&gt; <span style="color: #ff0000;">; if not equal, jump to +74, if not.. continue</span><br />
0x08048492 &lt;phase_1_of_1+84&gt;:	cmp    DWORD PTR [ebp-0x8],ecx <span style="color: #ff0000;">; compare our second input to ecx</span><br />
0x08048495 &lt;phase_1_of_1+87&gt;:	je     0x804849c &lt;phase_1_of_1+94&gt; <span style="color: #ff0000;">; if equal, defuse, if not.. continue</span><br />
0x08048497 &lt;phase_1_of_1+89&gt;:	call   0x8048420 &lt;explode_bomb&gt; <span style="color: #ff0000;">; explode</span><br />
0x0804849c &lt;phase_1_of_1+94&gt;:	leave<br />
0x0804849d &lt;phase_1_of_1+95&gt;:	lea    esi,[esi+0x0]<br />
0x080484a0 &lt;phase_1_of_1+98&gt;:	ret<br />
End of assembler dump.</code></p>
<p>we already have all the information we need to code a generator, or do some math on our own!</p>
<p>The bare-bones for this (in assembly) is:</p>
<p><code>mov eax, 1<br />
mov ecx, 1<br />
mov edx, [input]<br />
:loop<br />
imul ecx, eax<br />
add eax, 1<br />
cmp edx, eax<br />
jne :loop<br />
<span style="color: #ff0000;">; ecx now holds our magical value</span></code></p>
<p>In C it looks like this:</p>
<p><code>#include &lt;stdio.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
int main() {<br />
int eax,ecx,edx;<br />
eax=1;<br />
ecx=1;<br />
edx=5;<br />
if(edx &gt; 0) {<br />
while(edx != eax) {<br />
ecx *= eax;<br />
eax++;<br />
}<br />
}<br />
printf("1: %d\n2: %d\n", edx, ecx); <span style="color: #ff0000;">// this part will show you our values!</span><br />
return 0;<br />
}</code></p>
<p>So to conclude, it grabs our first number of input, and multiplies until eax reaches that value.</p>
<p>i.e. if we input 5:</p>
<p>(eax = 1)</p>
<p>1 * eax = 1 (increase eax, eax = 2)</p>
<p>1 * eax = 2 (increase, eax = 3)</p>
<p>2 * eax = 6 (increase ,eax = 4)</p>
<p>6 * eax = 24 (increase, eax = 5.. STOP!)</p>
<p>magic: 5 24</p>
<p><code>$ ./demobomb<br />
Welcome to the demo bomb. In another moment of weakness, Dr. Evil created this demo bomb.<br />
Phase 1<br />
5 24<br />
You safely defused the bomb. Well done.</code></p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=16</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to REALLY leave no trace&#8230;</title>
		<link>http://stevebirstok.com/wp/?p=13</link>
		<comments>http://stevebirstok.com/wp/?p=13#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:40:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=13</guid>
		<description><![CDATA[I noticed a post today on lifehacker/gizmodo about how to &#8220;completely erase your hard drives, ssds, and thumb drives.&#8221; (link here) The sad part was that they took a very simple process and complicated it- 10 fold. The following procedure will insure that your data will be wiped from existence, and uses nothing more than [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed a post today on lifehacker/gizmodo about how to &#8220;completely erase your hard drives, ssds, and thumb drives.&#8221; (<a href="http://gizmodo.com/5489933/leave-no-trace-how-to-completely-erase-your-hard-drives-ssds-and-thumb-drives" target="_blank">link here</a>)</p>
<p>The sad part was that they took a very simple process and complicated it- 10 fold.</p>
<p>The following procedure will insure that your data will be wiped from existence, and uses nothing more than the power of open source tools. (both for wiping, and checking)</p>
<p><span id="more-13"></span></p>
<h2>What data?</h2>
<p><em>shred</em> is an open source tool (part of the GNU core utilities series) and is an <strong>extremely</strong> powerful wiper.</p>
<p>It comes stock on various main-stream linux distributions (Ubuntu, Mint, Fedora, etc) and if it isn&#8217;t available on whatever distro you happen to be on, it is easily available from a bootable distro (Ubuntu, again) or with a more powerful front-end known as DBAN (discussed in the gizmodo article mentioned above).</p>
<p>The most effective way to use shred is as follows:</p>
<ol>
<li>Have the disk you&#8217;d like to wipe hooked up (<span style="color: #ff0000;">unmounted!</span>)</li>
<li>Figure out which device file is the disk you&#8217;d like to wipe.
<ul>
<li>This is accomplished by one of two ways:
<ol>
<li>Using a 3rd party tool, such as fdisk or gparted to find the device file with the right partitions / size that match the disk. (the easy way)</li>
<li>Have the device disconnected, &#8220;ls /dev&#8221; Connect the device, &#8220;ls /dev&#8221; and see which device file pops up. (the i-like-to-complicate-things way)</li>
</ol>
</li>
</ul>
</li>
<li>Run the following command:
<ul>
<li>note: for this demonstration i&#8217;m going to use &#8220;/dev/hda.&#8221;</li>
<li>note: you may see various device files with the same prefix (i.e. &#8220;/dev/hda&#8221;, &#8220;/dev/hda1&#8243;, &#8220;/dev/hda2&#8243;) please understand that /dev/hda is the entire disk, and /dev/hda1 etc. are PARTITIONS on the drive.</li>
</ul>
</li>
</ol>
<blockquote><p>shred -f -z -n 0 -v /dev/hda</p></blockquote>
<p>This can take several hours depending on the size, and speed, of the disk you are erasing.</p>
<p>This will effectively erase EVERYTHING on the disk, and overwrite it with zeros.</p>
<p>Just as a quick breakdown:</p>
<p><span style="color: #ff0000;">shred</span> <span style="color: #00ff00;">-f</span> <span style="color: #000080;">-z</span> <span style="color: #ff6600;">-n 0</span> <span style="color: #800080;">-v</span> <span style="color: #ff00ff;">/dev/hda</span></p>
<p><span style="color: #ff0000;">shred</span> <em>this is the actual command.</em></p>
<p><span style="color: #00ff00;">-f</span><em> this switch means &#8220;force.&#8221; It tells shred to, pretty much, do whatever is necessary to erase the drive (permissions / etc)</em></p>
<p><span style="color: #000080;">-z</span> <em>this switch means &#8220;zero.&#8221; It tells shred to overwrite our data with nothing but zeros.</em></p>
<p><span style="color: #ff6600;">-n 0</span> <em>this switch means &#8220;iterations.&#8221; It tells shred to only overwrite once. (you can up the number of times to shred, but only once is necessary. more than that is just overkill.)</em></p>
<p><span style="color: #800080;">-v</span> <em>this switch means &#8220;verbose.&#8221; It tells shred to be more verbose.</em></p>
<p><span style="color: #ff00ff;">/dev/hda</span> <em>this is the disk. say good-bye.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=13</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello&#8230; again</title>
		<link>http://stevebirstok.com/wp/?p=10</link>
		<comments>http://stevebirstok.com/wp/?p=10#comments</comments>
		<pubDate>Wed, 10 Mar 2010 01:34:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[/dev/urandom]]></category>

		<guid isPermaLink="false">http://stevebirstok.com/wp/?p=10</guid>
		<description><![CDATA[Hello, again, everyone! I&#8217;m going to give blogging one last shot. This time I think it&#8217;s going to work a little different around here. If anyone has any good graphical skills (which as a right brained person, I lack completely) and would like to throw together a little something-something for me, please try and get [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, again, everyone! I&#8217;m going to give blogging one last shot.</p>
<p>This time I think it&#8217;s going to work a little different around here. If anyone has any good graphical skills (which as a right brained person, I lack completely) and would like to throw together a little something-something for me, please try and get in touch me.</p>
<p><span id="more-10"></span>The blog this time will contain a bit more than just my usual ramblings; I plan on keeping this strictly tech.</p>
<p>I&#8217;ve setup a few categories so far, the general being &#8220;/dev/urandom&#8221; (random posts) &#8220;Hacking&#8221; (hacking related posts, which contain subcategories &#8220;linux,&#8221; &#8220;netsec,&#8221; and some others) and &#8220;Tips&#8221; (life, food, health, etc)</p>
<p>Let&#8217;s see how it goes!</p>
]]></content:encoded>
			<wfw:commentRss>http://stevebirstok.com/wp/?feed=rss2&#038;p=10</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

