<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Security Ripcord &#187; Hacking</title>
	<atom:link href="http://www.cutawaysecurity.com/blog/archives/category/hacking/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cutawaysecurity.com/blog</link>
	<description>Cutaway's Observations, Opinions, Rants, Raves, Tantrums, and Tirades</description>
	<lastBuildDate>Tue, 01 Jun 2010 15:17:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license>		<item>
		<title>Leveraging Road Sign Hacking</title>
		<link>http://www.cutawaysecurity.com/blog/archives/450</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/450#comments</comments>
		<pubDate>Thu, 29 Jan 2009 17:21:12 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Risk]]></category>
		<category><![CDATA[road sign]]></category>
		<category><![CDATA[Security Ripcord]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/?p=450</guid>
		<description><![CDATA[Although we have seen some recent activity concerning a hacked road-side construction sign, you should be aware that this situation was documented on Jun 23, 2006 at 11:49 a.m. on the Rotten Eggs website in an article titled (amazingly enough): Hacking electronic road signs.  Of course the newest article is a little more in-depth, but [...]]]></description>
			<content:encoded><![CDATA[<p>Although we have seen some recent activity concerning a <a title="Inside Programmable Road Signs " href="http://www.i-hacked.com/content/view/274/48/" target="_blank">hacked road-side construction sign</a>, you should be aware that this situation was documented on Jun 23, 2006 at 11:49 a.m. on the <a title="Rotten Eggs" href="http://www.rotteneggs.com" target="_blank">Rotten Eggs</a> website in an article titled (amazingly enough): <a title="Hacking electronic road signs" href="http://www.rotteneggs.com/r3/show/se/189885.html" target="_blank">Hacking electronic road signs</a>.  Of course the newest article is a little more in-depth, but this type of activity and vulnerability should not have been a surprise to anyone.  Those of you who subscribe here are very familiar with this type of situation.</p>
<p>Now that the situation is back in the public eye, how do we leverage it with our friends, family, co-workers, customers, and management?</p>
<p>What this situation does is emphasize the fact that default passwords and devices with built in reset capabilities should be controlled in a much better manner.  The changing of a road sign will not last very long or adversely affect (generally) anything beyond inconvenience.  The real problem is the mentality of companies creating devices that operate in this manner.  Things are still getting built this way and we have to make the logical leap that developers of hardware, programs, operating systems, network devices, mobile devices, and applications are making the same mistakes even today.</p>
<p>We can use this opportunity to remind our our friends, family, co-workers, customers, and managers to evaluate their deployed technologies for default passwords.  We should also remind them that they need to take these things into consideration during the initial purchasing process where they are evaluating new technologies. That is the only way to find these types of problems and mitigate the risk properly before purchasing and deployment.  Should they find devices or applications with these limited or hamstrung security capabilities they should do a risk assessment to determine the best method to increase the security surrounding the technology or what can effectively and securely replace it.</p>
<p>Your mission is to determine a way to put the preceding paragraph into words and terms that your audience will understand.  Most of you reading this know exactly what I talked about.  You cannot assume that your audience will be able to understand it in the same manner.  If they don&#8217;t understand it they cannot proceed effectively.  Think about your audience before approaching them with your recommendations.  Determine the proper terminology, references, and examples to help them make an informed assessment and conclusion.  Be prepared with solutions for situations that you know exist and methods to move forward and locating those situations that have not identified.  And be sure to stress the importance of taking security into consideration during the initial evaluation and purchasing process.</p>
<p>Go forth and do good things,</p>
<p>Don C. Weber</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/450/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TcpReplay &#8211; Replaying Ping</title>
		<link>http://www.cutawaysecurity.com/blog/archives/249</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/249#comments</comments>
		<pubDate>Sun, 18 May 2008 05:06:56 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Penetration Testing]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Don C. Weber]]></category>
		<category><![CDATA[editcap]]></category>
		<category><![CDATA[pcap]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[Security Ripcord]]></category>
		<category><![CDATA[tcpreplay]]></category>
		<category><![CDATA[tshark]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/?p=249</guid>
		<description><![CDATA[This will show the capture of ping requests to a specific host.  This information will be captured using tshark to a pcap file.  This pcap file will be edited to cut out the ping reply packets.  This file will then be used to replay the ping requests and receive responses.
This should be [...]]]></description>
			<content:encoded><![CDATA[<p>This will show the capture of ping requests to a specific host.  This information will be captured using <a href="http://www.wireshark.org/docs/man-pages/tshark.html" target="_blank"><em>tshark</em></a> to a pcap file.  This pcap file will be edited to cut out the ping reply packets.  This file will then be used to replay the ping requests and receive responses.</p>
<p>This should be the first step to many similar replays.</p>
<p><strong>Run <em>tshark</em> to capture</strong></p>
<blockquote><p><span style="color: red;">[user@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -i eth0 -w ping_default.pcap<br />
Password:<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
Capturing on eth0<br />
8<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Ping remote host</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> ping -c 4 192.168.2.1<br />
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.<br />
64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=0.422 ms<br />
64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=0.339 ms<br />
64 bytes from 192.168.2.1: icmp_seq=3 ttl=64 time=0.243 ms<br />
64 bytes from 192.168.2.1: icmp_seq=4 ttl=64 time=0.334 ms</p>
<p>&#8212; 192.168.2.1 ping statistics &#8212;<br />
4 packets transmitted, 4 received, 0% packet loss, time 3001ms<br />
rtt min/avg/max/mdev = 0.243/0.334/0.422/0.065 ms<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Read pcap file with tshark</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -r ping_default.pcap<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
1   0.000000 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
2   0.000370  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
3   1.000509 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
4   1.000783  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
5   2.001345 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
6   2.001524  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
7   3.001984 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
8   3.002263  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Rip out only the wanted packets</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> ls<br />
ping_default.pcap<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/editcap ping_default.pcap ping_requests.pcap 1 3 5 7<br />
Password:<br />
Add_Selected: 1<br />
Not inclusive &#8230; 1<br />
Add_Selected: 3<br />
Not inclusive &#8230; 3<br />
Add_Selected: 5<br />
Not inclusive &#8230; 5<br />
Add_Selected: 7<br />
Not inclusive &#8230; 7<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> ll<br />
total 16<br />
-rw&#8212;&#8212;- 1 root root 936 2008-05-17 23:33 ping_default.pcap<br />
-rw-r&#8211;r&#8211; 1 root root 480 2008-05-17 23:35 ping_requests.pcap<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Read pcap file with tshark</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -r ping_requests.pcap<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
1   0.000000  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
2   1.000413  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
3   2.001154  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
4   3.001893  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>I am not sure why that happened.  Grap the right packets with <a href="http://www.ethereal.com/docs/man-pages/editcap.1.html" target="_blank">editcap</a>.</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/editcap ping_default.pcap ping_requests.pcap 2 4 6 8<br />
Add_Selected: 2<br />
Not inclusive &#8230; 2<br />
Add_Selected: 4<br />
Not inclusive &#8230; 4<br />
Add_Selected: 6<br />
Not inclusive &#8230; 6<br />
Add_Selected: 8<br />
Not inclusive &#8230; 8<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Read pcap file with tshark</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -r ping_requests.pcap<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
1   0.000000 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
2   1.000509 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
3   2.001345 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
4   3.001984 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Replay with TcpReplay</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo tcpreplay &#8211;intf1=eth0 ping_requests.pcap<br />
sending out eth0<br />
processing file: ping_requests.pcap<br />
Actual: 4 packets (392 bytes) sent in 3.10 seconds<br />
Rated: 130.2 bps, 0.00 Mbps/sec, 1.33 pps</p>
<p>Statistics for network device: eth0<br />
Attempted packets:   4<br />
Successful packets:  4<br />
Failed packets:      0<br />
Retried packets:     0<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Capture replay with tshark</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">r@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -i eth0 -w ping_replay.pcap<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
Capturing on eth0<br />
8<br />
(process:8719): CaptureChild-INFO (recursed): Signal: Stop capture<br />
aborting&#8230;<br />
tshark: Child capture process died: Abort<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p><strong>Review what happened with tshark</strong></p>
<blockquote><p><span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span> sudo /usr/sbin/tshark -r ping_replay.pcap<br />
Running as user &#8220;root&#8221; and group &#8220;root&#8221;. This could be dangerous.<br />
1   0.000000 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
2   0.000332  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
3   1.001619 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
4   1.001905  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
5   2.002310 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
6   2.002494  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
7   3.003997 192.168.2.242 -&gt; 192.168.2.1  ICMP Echo (ping) request<br />
8   3.004201  192.168.2.1 -&gt; 192.168.2.242 ICMP Echo (ping) reply<br />
<span style="color: red;">[</span><span style="color: red;">user</span><span style="color: red;">@localhost tshark]</span><span style="color: blue;">$</span></p></blockquote>
<p>Go forth and do good things,</p>
<p>Don C. Weber</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/249/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Price of Disassembly</title>
		<link>http://www.cutawaysecurity.com/blog/archives/248</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/248#comments</comments>
		<pubDate>Sun, 11 May 2008 19:02:39 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Disassembly]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[atlas]]></category>
		<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Don C. Weber]]></category>
		<category><![CDATA[Learn Security Online]]></category>
		<category><![CDATA[LSO]]></category>
		<category><![CDATA[Security Ripcord]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/?p=248</guid>
		<description><![CDATA[I was checking prices for a few books that atlas mentioned in his interview on Learn Security Online.  I was not expecting to pay this much for any of the books.  I think I&#8217;ll wait.  Those of you who are done with your versions might think about becoming a reseller.  Or, [...]]]></description>
			<content:encoded><![CDATA[<p>I was checking prices for a few books that <a href="Hacker Disassembling Uncovered" target="_blank">atlas</a> mentioned in his interview on <a title="Interview with Atlas" href="http://www.learnsecurityonline.com/index.php?option=com_content&amp;task=view&amp;id=237&amp;Itemid=1" target="_blank">Learn Security Online</a>.  I was not expecting to pay this much for any of the books.  I think I&#8217;ll wait.  Those of you who are done with your versions might think about becoming a reseller.  Or, you can contact me if you are willing to make a donation.</p>
<p><a href="http://www.cutawaysecurity.com/blog/wp-content/uploads/2008/05/hacker_disass_book.png"><img class="aligncenter size-medium wp-image-246" title="hacker_disass_book" src="http://www.cutawaysecurity.com/blog/wp-content/uploads/2008/05/hacker_disass_book.png" alt="Hacker Disassembling Uncovered" /></a></p>
<p><a href="http://www.cutawaysecurity.com/blog/wp-content/uploads/2008/05/hacker_disass_book1.png"><img class="aligncenter size-medium wp-image-247" title="hacker_disass_book1" src="http://www.cutawaysecurity.com/blog/wp-content/uploads/2008/05/hacker_disass_book1.png" alt="Hacker Disassembling Uncovered Prices" /></a></p>
<p>Go forth and do good things,</p>
<p>Don C. Weber</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/248/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello World Assembly Compiling</title>
		<link>http://www.cutawaysecurity.com/blog/archives/240</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/240#comments</comments>
		<pubDate>Sun, 27 Apr 2008 06:55:14 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[atlas]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/archives/240</guid>
		<description><![CDATA[I have moved on from C code to Assembly.  Certainly I broke down the C into Assembly earlier, but this time I wanted to write and compile from an Assembly file.  This proved more difficult than I expected.  This is not because doing so is hard, it is because of the differences [...]]]></description>
			<content:encoded><![CDATA[<p>I have moved on from C code to Assembly.  Certainly I broke down the C into Assembly earlier, but this time I wanted to write and compile from an Assembly file.  This proved more difficult than I expected.  This is not because doing so is hard, it is because of the differences between the INTEL and AT&amp;T syntaxs.  I didn&#8217;t realize that this was going to be a problem until I tried to use NASM to compile the hello.s file.  NASM expects INTEL syntax while GCC output a file in AT&amp;T syntax.  The following is an example of the error messages I received.</p>
<blockquote><p><font color="red">bt</font> <font color="blue">hello</font> # nasm -f elf hello.s<br />
hello.s:1: error: attempt to define a local label before any non-local labels<br />
hello.s:1: error: parser: instruction expected<br />
hello.s:2: error: attempt to define a local label before any non-local labels<br />
hello.s:2: error: parser: instruction expected<br />
hello.s:3: error: attempt to define a local label before any non-local labels<br />
hello.s:4: error: attempt to define a local label before any non-local labels<br />
hello.s:4: error: parser: instruction expected<br />
hello.s:5: error: attempt to define a local label before any non-local labels<br />
hello.s:6: error: attempt to define a local label before any non-local labels<br />
hello.s:6: error: parser: instruction expected<br />
hello.s:7: error: attempt to define a local label before any non-local labels<br />
hello.s:7: error: parser: instruction expected<br />
hello.s:9: error: parser: instruction expected<br />
hello.s:10: error: parser: instruction expected<br />
hello.s:11: error: parser: instruction expected<br />
hello.s:12: error: parser: instruction expected<br />
hello.s:13: error: symbol `movl&#8217; redefined<br />
hello.s:13: error: parser: instruction expected<br />
hello.s:14: error: parser: instruction expected<br />
hello.s:15: error: symbol `addl&#8217; redefined<br />
hello.s:15: error: parser: instruction expected<br />
hello.s:16: error: parser: instruction expected<br />
hello.s:17: error: parser: instruction expected<br />
hello.s:18: error: symbol `subl&#8217; redefined<br />
hello.s:18: error: parser: instruction expected<br />
hello.s:19: error: symbol `subl&#8217; redefined<br />
hello.s:19: error: parser: instruction expected<br />
hello.s:20: error: symbol `pushl&#8217; redefined<br />
hello.s:20: error: parser: instruction expected<br />
hello.s:22: error: symbol `addl&#8217; redefined<br />
hello.s:22: error: parser: instruction expected<br />
hello.s:23: error: symbol `movl&#8217; redefined<br />
hello.s:23: error: parser: instruction expected<br />
hello.s:26: error: parser: instruction expected<br />
hello.s:27: error: parser: instruction expected<br />
hello.s:28: error: parser: instruction expected<br />
<font color="red">bt</font> <font color="blue">hello</font> #</p></blockquote>
<p>It wasn&#8217;t after a lot of reading that I realized that the two syntaxes are completely different.  This explained why my attempts at correcting these errors did not work at all.  Of course, hunting for the problem lead me to some very useful resources.</p>
<ul>
<li> <a href="http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24592.pdf" target="_blank">AMD64 Architecture Programmer&#8217;s Manual Volume 1: Application Programming</a></li>
<li><a href="http://asm.sourceforge.net/articles/linasm.html" target="_blank">Using Assembly Language in Linux.</a></li>
<li><a href="http://members.save-net.com/jko@save-net.com/asm/h_code_tut.htm" target="_blank">Linux Assembly Tutorial: Step-by-Step Guide</a></li>
<li><a href="http://home.comcast.net/~fbkotler/nasmdoc0.html" target="_blank">The Netwide Assembler: NASM</a></li>
<li><a href="http://sig9.com/articles/att-syntax" target="_blank">AT&amp;T Assembly Syntax</a></li>
</ul>
<p>From these resources I determined there were three ways to compile and run the Hello World assembly code program.  For the AT&amp;T syntax a developer could use the GCC command or a combination of the AS and LD commands (yes, as I am working on Linux, case sensitivity does matter, but I am using caps for emphasis).  The INTEL syntax requires the use of NASM and LD.  The following output shows the compilation performed in each case.  Note the size of the executable generated by the GCC command (ouch!!).</p>
<blockquote><p><strong>NASM Command</strong></p>
<p><font color="red">bt</font> <font color="blue">nasm</font> # nasm -f elf hello.asm<br />
<font color="red">bt</font> <font color="blue">nasm</font> # ld -s -o hello_nasm.exe hello.o<br />
<font color="red">bt</font> <font color="blue">nasm</font> # ./hello_nasm.exe<br />
Hello World<br />
<font color="red">bt</font> <font color="blue">nasm</font> # ls -al<br />
total 20<br />
drwxr-xr-x 2 root root 4096 Apr 26 23:46 ./<br />
drwxr-xr-x 3 root root 4096 Apr 26 23:39 ../<br />
-rw-r&#8211;r&#8211; 1 root root  685 Apr 26 23:46 hello.asm<br />
-rw-r&#8211;r&#8211; 1 root root  720 Apr 26 23:46 hello.o<br />
-rwxr-xr-x 1 root root  <strong>536</strong> Apr 26 23:46 <strong>hello_nasm.exe*</strong><br />
<font color="red">bt</font> <font color="blue">nasm</font> #</p>
<p><strong>AS Command</strong></p>
<p><font color="red">bt</font> <font color="blue">as</font> # as -o hello_as.o hello_as.s<br />
<font color="red">bt</font> <font color="blue">as</font> # ld -s -o hello_hello_as.o<br />
<font color="red">bt</font> <font color="blue">as</font> # ./hello_as.exe<br />
Hello World</p>
<p><font color="red">bt</font> <font color="blue">as</font> # ls -al<br />
total 20<br />
drwxr-xr-x 2 root root 4096 Apr 27 00:00 ./<br />
drwxr-xr-x 4 root root 4096 Apr 26 23:55 ../<br />
-rwxr-xr-x 1 root root  <strong>444</strong> Apr 27 00:00 <strong>hello_as.exe*</strong>    <em><strong>&lt;-NOTE: Size Winner Is AS</strong></em><br />
-rw-r&#8211;r&#8211; 1 root root  620 Apr 27 00:00 hello_as.o<br />
-rw-r&#8211;r&#8211; 1 root root  770 Apr 27 00:00 hello_as.s<br />
<font color="red">bt</font> <font color="blue">as</font> #</p>
<p><strong>GCC Command</strong></p>
<p><font color="red">bt</font> <font color="blue">hello</font> # gcc -o hello.exe hello.s<br />
<font color="red">bt</font> <font color="blue">hello</font> # gcc -s -o hello_stripped.exe hello.s<br />
<font color="red">bt</font> <font color="blue">hello</font> # ls -al<br />
total 32<br />
drwxr-xr-x  4 root root 4096 Apr 27 00:48 ./<br />
drwxr-xr-x 12 root root 4096 Apr 23 20:19 ../<br />
drwxr-xr-x  2 root root 4096 Apr 27 00:00 as/<br />
-rwxr-xr-x  1 root root <strong>7932</strong> Apr 27 00:48 <strong>hello.exe*</strong><br />
-rw-r&#8211;r&#8211;  1 root root  766 Apr 26 22:59 hello.s<br />
-rwxr-xr-x  1 root root <strong>2808</strong> Apr 27 00:48 <strong>hello_stripped.exe*</strong>    <em><strong>&lt;-NOTE: Even stripped GCC is bigger</strong></em><br />
drwxr-xr-x  2 root root 4096 Apr 26 23:54 nasm/<br />
<font color="red">bt</font> <font color="blue">hello</font> # ./hello.exe<br />
Hello World</p>
<p><font color="red">bt</font> <font color="blue">hello</font> # ./hello_stripped.exe<br />
Hello World</p>
<p><font color="red">bt</font> <font color="blue">hello</font> #</p></blockquote>
<p>It is very easy to see that how you compile the assembly code leads directly to the size of the executable and, perhaps, the speed and stability as well.  Of course I cannot prove either of these theories, but I will take this guess because of the additional systems calls that go into the GCC version.</p>
<p>What I can do, in the meantime, is show you how these programs appear after they have been run through a disassembler.  The versions compiled via AS and NASM are amazingly similar.  The version compiled through GCC, however, is not even close.  It&#8217;s output really shows how the additional libraries play a roll in the overall size of this executable.  To disassemble these programs I will use the latest version of atlas&#8217; <a href="http://atlas.r4780y.com/resources/disass-3.0-080424.tgz" target="_blank">Disass-3.0</a>.  I&#8217;ll leave the download and installation of this tool up to you.</p>
<blockquote><p><strong>NASM</strong></p>
<p><font color="red">bt</font> <font color="blue">nasm</font> # disass-cli hello_nasm.exe<br />
VirtualMemory:init:section:  .text<br />
BEGIN Processing Sub: ELF Start, .text (8048080)   &#8230;..END Processing Sub: ELF Start, .text (8048080)<br />
disass v3.00 Enhanced Disassembler<br />
ELF HEADER OBJECT:hello_nasm.exe<br />
= Intimate Details:<br />
==Magic:                                ELF<br />
==Type:                                 Executable file<br />
==Machine Arch:                         Intel 80386<br />
==Version:                              1<br />
==Entry:                                0&#215;08048080<br />
==Program Headers(offset):              52 (0&#215;34) bytes<br />
==Section Headers(offset):              256 (0&#215;100) bytes<br />
==Flags:                                0L<br />
==Elf Header Size:                      52 (0&#215;34 bytes)<br />
==Program Header Size:                  32 (0&#215;20 bytes)<br />
==Program Header Count:                 2 (0&#215;2)<br />
==Section Header Size:                  40 (0&#215;28 bytes)<br />
==Section Header Count:                 7 (0&#215;7)<br />
==Section Header String Index           6 (0&#215;6 bytes)</p>
<p>= Sections:<br />
Elf Section: [                    ] VMA: 0&#215;00000000  offset:        0  ent/size:        0/       0  align:        0<br />
Elf Section: [               .text] VMA: 0&#215;08048080  offset:      128  ent/size:        0/      35  align:       16<br />
Elf Section: [            .got.plt] VMA: 0&#215;080490a4  offset:      176  ent/size:        0/       0  align:        1<br />
Elf Section: [               .data] VMA: 0&#215;080490a4  offset:      164  ent/size:        0/      12  align:        4<br />
Elf Section: [                .bss] VMA: 0&#215;080490b0  offset:      176  ent/size:        0/       0  align:        1<br />
Elf Section: [            .comment] VMA: 0&#215;00000000  offset:      176  ent/size:        0/      31  align:        1<br />
Elf Section: [           .shstrtab] VMA: 0&#215;00000000  offset:      207  ent/size:        0/      46  align:        1</p>
<p>= Program Headers:<br />
[           Loadable program segment] VMA: 0&#215;08048000  offset:        0  memsize:      163  align:     4096  (filesz:      163)  flags: 5<br />
[           Loadable program segment] VMA: 0&#215;080490a4  offset:      164  memsize:       12  align:     4096  (filesz:       12)  flags: 6<br />
Dynamics:</p>
<p>Virtual Memory: hello_nasm.exe,          start: 8048080,         flags: 0</p>
<p><strong>====== Section Header:       .text ======<br />
======  Starting Address:       0&#215;08048080      Length:         0&#215;0023<br />
======  File Offset:            0&#215;0080          Size in File:   0&#215;0023<br />
======  Size in Memory:         0&#215;0000<br />
==================</strong></p>
<p>Subroutine: ELF Start, .text (8048080)   9 lines         0&#215;23 bytes<br />
Starting address: 8048080               Ending address: 80480a2</p>
<p>;       ELF Start, .text<br />
<strong> 8048080:                   \xb8\x04\x00\x00\x00        mov           $0&#215;4, %eax<br />
8048085:                   \xbb\x01\x00\x00\x00        mov           $0&#215;1, %ebx<br />
804808a:                   \xb9\xa4\x90\x04\x08        mov           $0&#215;80490a4, %ecx             ;  .got.plt, .data, &#8216;Hello World<br />
&#8216; (.data)<br />
804808f:                   \xba\x0c\x00\x00\x00        mov           $0xc, %edx<br />
8048094:                               \xcd\x80        int           $0&#215;80<br />
8048096:                   \xb8\x01\x00\x00\x00        mov           $0&#215;1, %eax<br />
804809b:                   \xbb\x00\x00\x00\x00        mov           $0&#215;0, %ebx<br />
80480a0:                               \xcd\x80        int           $0&#215;80<br />
80480a2:                                   \xc3        ret</strong><br />
End Subroutine: ELF Start, .text (8048080)       9 lines         0&#215;23 bytes<br />
8048080: ELF Start, .text<br />
80490a4: .got.plt, .data, &#8216;Hello World<br />
&#8216; (.data)<br />
80490b0: .bss</p>
<p><font color="red">bt</font> <font color="blue">nasm</font> #</p>
<p><strong>AS</strong></p>
<p><font color="red">bt</font> <font color="blue">as</font> # disass-cli hello_as.exe<br />
VirtualMemory:init:section:  .text<br />
BEGIN Processing Sub: ELF Start, .text (8048074)   &#8230;..END Processing Sub: ELF Start, .text (8048074)<br />
disass v3.00 Enhanced Disassembler<br />
ELF HEADER OBJECT:hello_as.exe<br />
= Intimate Details:<br />
==Magic:                                ELF<br />
==Type:                                 Executable file<br />
==Machine Arch:                         Intel 80386<br />
==Version:                              1<br />
==Entry:                                0&#215;08048074<br />
==Program Headers(offset):              52 (0&#215;34) bytes<br />
==Section Headers(offset):              204 (0xcc) bytes<br />
==Flags:                                0L<br />
==Elf Header Size:                      52 (0&#215;34 bytes)<br />
==Program Header Size:                  32 (0&#215;20 bytes)<br />
==Program Header Count:                 2 (0&#215;2)<br />
==Section Header Size:                  40 (0&#215;28 bytes)<br />
==Section Header Count:                 6 (0&#215;6)<br />
==Section Header String Index           5 (0&#215;5 bytes)</p>
<p>= Sections:<br />
Elf Section: [                    ] VMA: 0&#215;00000000  offset:        0  ent/size:        0/       0  align:        0<br />
Elf Section: [               .text] VMA: 0&#215;08048074  offset:      116  ent/size:        0/      35  align:        4<br />
Elf Section: [            .got.plt] VMA: 0&#215;08049098  offset:      167  ent/size:        0/       0  align:        1<br />
Elf Section: [               .data] VMA: 0&#215;08049098  offset:      152  ent/size:        0/      15  align:        4<br />
Elf Section: [                .bss] VMA: 0&#215;080490a8  offset:      167  ent/size:        0/       0  align:        4<br />
Elf Section: [           .shstrtab] VMA: 0&#215;00000000  offset:      167  ent/size:        0/      37  align:        1</p>
<p>= Program Headers:<br />
[           Loadable program segment] VMA: 0&#215;08048000  offset:        0  memsize:      151  align:     4096  (filesz:      151)  flags: 5<br />
[           Loadable program segment] VMA: 0&#215;08049098  offset:      152  memsize:       16  align:     4096  (filesz:       15)  flags: 6<br />
Dynamics:</p>
<p>Virtual Memory: hello_as.exe,    start: 8048074,         flags: 0</p>
<p><strong>====== Section Header:       .text ======<br />
======  Starting Address:       0&#215;08048074      Length:         0&#215;0023<br />
======  File Offset:            0&#215;0074          Size in File:   0&#215;0023<br />
======  Size in Memory:         0&#215;0000<br />
==================</strong></p>
<p>Subroutine: ELF Start, .text (8048074)   9 lines         0&#215;23 bytes<br />
Starting address: 8048074               Ending address: 8048096</p>
<p>;       ELF Start, .text<br />
<strong> 8048074:                   \xb8\x04\x00\x00\x00        mov           $0&#215;4, %eax<br />
8048079:                   \xbb\x01\x00\x00\x00        mov           $0&#215;1, %ebx<br />
804807e:                   \xb9\x98\x90\x04\x08        mov           $0&#215;8049098, %ecx             ;  .got.plt, .data, &#8216;Hello World<br />
&#8216; (.data)<br />
8048083:                   \xba\xa5\x90\x04\x08        mov           $0&#215;80490a5, %edx             ;  &#8216;\x0c&#8217; (.data)<br />
8048088:                               \xcd\x80        int           $0&#215;80<br />
804808a:                   \xb8\x01\x00\x00\x00        mov           $0&#215;1, %eax<br />
804808f:                   \xbb\x00\x00\x00\x00        mov           $0&#215;0, %ebx<br />
8048094:                               \xcd\x80        int           $0&#215;80<br />
8048096:                                   \xc3        ret</strong><br />
End Subroutine: ELF Start, .text (8048074)       9 lines         0&#215;23 bytes<br />
8048074: ELF Start, .text<br />
8049098: .got.plt, .data, &#8216;Hello World<br />
&#8216; (.data)<br />
80490a5: &#8216;\x0c&#8217; (.data)<br />
80490a8: .bss</p>
<p><font color="red">bt</font> <font color="blue">as</font> #</p>
<p><strong>GCC</strong></p>
<p><font color="red">bt</font> hello # disass-cli hello.exe<br />
VirtualMemory:init:section:  .init<br />
BEGIN Processing Sub: .init, (), _init(), , _init (8048260)   &#8230;..END Processing Sub: .init, (), _init(), , _init (8048260)<br />
VirtualMemory:init:section:  .plt<br />
BEGIN Processing Sub: .plt, (),  (8048278)   &#8230;..END Processing Sub: .plt, (),  (8048278)<br />
BEGIN Processing Sub: __libc_start_main()  (PLT) (8048288)   &#8230;..END Processing Sub: __libc_start_main()  (PLT) (8048288)<br />
VirtualMemory:init:section:  .text<br />
BEGIN Processing Sub: ELF Start, .text, (), _start(), , _start (80482a0)   &#8230;..END Processing Sub: ELF Start, .text, (), _start(), , _start (80482a0)<br />
BEGIN Processing Sub: __libc_csu_fini(), __libc_csu_fini (8048400)   &#8230;..END Processing Sub: __libc_csu_fini(), __libc_csu_fini (8048400)<br />
BEGIN Processing Sub: __libc_csu_init(), __libc_csu_init (80483a0)   &#8230;..END Processing Sub: __libc_csu_init(), __libc_csu_init (80483a0)<br />
BEGIN Processing Sub: __do_global_ctors_aux(), __do_global_ctors_aux (8048450)   &#8230;..END Processing Sub: __do_global_ctors_aux(), __do_global_ctors_aux (8048450)<br />
BEGIN Processing Sub: frame_dummy(), frame_dummy (8048340)   &#8230;..END Processing Sub: frame_dummy(), frame_dummy (8048340)<br />
BEGIN Processing Sub: call_gmon_start(), call_gmon_start (80482d0)   &#8230;..END Processing Sub: call_gmon_start(), call_gmon_start (80482d0)<br />
BEGIN Processing Sub: __do_global_dtors_aux(), __do_global_dtors_aux (8048300)   &#8230;..END Processing Sub: __do_global_dtors_aux(), __do_global_dtors_aux (8048300)<br />
VirtualMemory:init:section:  .fini<br />
BEGIN Processing Sub: .fini, (), _fini(), , _fini (8048480)   &#8230;..END Processing Sub: .fini, (), _fini(), , _fini (8048480)<br />
disass v3.00 Enhanced Disassembler<br />
ELF HEADER OBJECT:hello.exe<br />
= Intimate Details:<br />
==Magic:                                ELF<br />
==Type:                                 Executable file<br />
==Machine Arch:                         Intel 80386<br />
==Version:                              1<br />
==Entry:                                0&#215;080482a0<br />
==Program Headers(offset):              52 (0&#215;34) bytes<br />
==Section Headers(offset):              3484 (0xd9c) bytes<br />
==Flags:                                0L<br />
==Elf Header Size:                      52 (0&#215;34 bytes)<br />
==Program Header Size:                  32 (0&#215;20 bytes)<br />
==Program Header Count:                 7 (0&#215;7)<br />
==Section Header Size:                  40 (0&#215;28 bytes)<br />
==Section Header Count:                 34 (0&#215;22)<br />
==Section Header String Index           31 (0&#215;1f bytes)</p>
<p>= Sections:<br />
Elf Section: [                    ] VMA: 0&#215;00000000  offset:        0  ent/size:        0/       0  align:        0<br />
Elf Section: [             .interp] VMA: 0&#215;08048114  offset:      276  ent/size:        0/      19  align:        1<br />
Elf Section: [       .note.ABI-tag] VMA: 0&#215;08048128  offset:      296  ent/size:        0/      32  align:        4<br />
Elf Section: [               .hash] VMA: 0&#215;08048148  offset:      328  ent/size:        4/      40  align:        4<br />
Elf Section: [             .dynsym] VMA: 0&#215;08048170  offset:      368  ent/size:       16/      80  align:        4<br />
Elf Section: [             .dynstr] VMA: 0&#215;080481c0  offset:      448  ent/size:        0/      89  align:        1<br />
Elf Section: [        .gnu.version] VMA: 0&#215;0804821a  offset:      538  ent/size:        2/      10  align:        2<br />
Elf Section: [      .gnu.version_r] VMA: 0&#215;08048224  offset:      548  ent/size:        0/      32  align:        4<br />
Elf Section: [            .rel.dyn] VMA: 0&#215;08048244  offset:      580  ent/size:        8/       8  align:        4<br />
Elf Section: [            .rel.plt] VMA: 0&#215;0804824c  offset:      588  ent/size:        8/       8  align:        4<br />
Elf Section: [               .init] VMA: 0&#215;08048260  offset:      608  ent/size:        0/      23  align:       16<br />
Elf Section: [                .plt] VMA: 0&#215;08048278  offset:      632  ent/size:        4/      32  align:        4<br />
Elf Section: [               .text] VMA: 0&#215;080482a0  offset:      672  ent/size:        0/     480  align:       16<br />
Elf Section: [               .fini] VMA: 0&#215;08048480  offset:     1152  ent/size:        0/      27  align:       16<br />
Elf Section: [             .rodata] VMA: 0&#215;0804849c  offset:     1180  ent/size:        0/       8  align:        4<br />
Elf Section: [           .eh_frame] VMA: 0&#215;080484a4  offset:     1188  ent/size:        0/       4  align:        4<br />
Elf Section: [              .ctors] VMA: 0&#215;080494a8  offset:     1192  ent/size:        0/       8  align:        4<br />
Elf Section: [              .dtors] VMA: 0&#215;080494b0  offset:     1200  ent/size:        0/       8  align:        4<br />
Elf Section: [                .jcr] VMA: 0&#215;080494b8  offset:     1208  ent/size:        0/       4  align:        4<br />
Elf Section: [            .dynamic] VMA: 0&#215;080494bc  offset:     1212  ent/size:        8/     200  align:        4<br />
Elf Section: [                .got] VMA: 0&#215;08049584  offset:     1412  ent/size:        4/       4  align:        4<br />
Elf Section: [            .got.plt] VMA: 0&#215;08049588  offset:     1416  ent/size:        4/      16  align:        4<br />
Elf Section: [               .data] VMA: 0&#215;08049598  offset:     1432  ent/size:        0/      28  align:        4<br />
Elf Section: [                .bss] VMA: 0&#215;080495b4  offset:     1460  ent/size:        0/       4  align:        4<br />
Elf Section: [            .comment] VMA: 0&#215;00000000  offset:     1460  ent/size:        0/     108  align:        1<br />
Elf Section: [      .debug_aranges] VMA: 0&#215;00000000  offset:     1568  ent/size:        0/     136  align:        8<br />
Elf Section: [     .debug_pubnames] VMA: 0&#215;00000000  offset:     1704  ent/size:        0/      37  align:        1<br />
Elf Section: [         .debug_info] VMA: 0&#215;00000000  offset:     1741  ent/size:        0/     642  align:        1<br />
Elf Section: [       .debug_abbrev] VMA: 0&#215;00000000  offset:     2383  ent/size:        0/     118  align:        1<br />
Elf Section: [         .debug_line] VMA: 0&#215;00000000  offset:     2501  ent/size:        0/     511  align:        1<br />
Elf Section: [          .debug_str] VMA: 0&#215;00000000  offset:     3012  ent/size:        1/     174  align:        1<br />
Elf Section: [           .shstrtab] VMA: 0&#215;00000000  offset:     3186  ent/size:        0/     295  align:        1<br />
Elf Section: [             .symtab] VMA: 0&#215;00000000  offset:     4844  ent/size:       16/    1984  align:        4<br />
Elf Section: [             .strtab] VMA: 0&#215;00000000  offset:     6828  ent/size:        0/    1104  align:        1</p>
<p>= Program Headers:<br />
[      Entry for header table itself] VMA: 0&#215;08048034  offset:       52  memsize:      224  align:        4  (filesz:      224)  flags: 5<br />
[                Program interpreter] VMA: 0&#215;08048114  offset:      276  memsize:       19  align:        1  (filesz:       19)  flags: 4<br />
[           Loadable program segment] VMA: 0&#215;08048000  offset:        0  memsize:     1192  align:     4096  (filesz:     1192)  flags: 5<br />
[           Loadable program segment] VMA: 0&#215;080494a8  offset:     1192  memsize:      272  align:     4096  (filesz:      268)  flags: 6<br />
[        Dynamic linking information] VMA: 0&#215;080494bc  offset:     1212  memsize:      200  align:        4  (filesz:      200)  flags: 6<br />
[              Auxiliary information] VMA: 0&#215;08048128  offset:      296  memsize:       32  align:        4  (filesz:       32)  flags: 4<br />
[      Indicates stack executability] VMA: 0&#215;00000000  offset:        0  memsize:        0  align:        4  (filesz:        0)  flags: 7<br />
Dynamics:<br />
libc.so.6 Name of needed library<br />
0&#215;8048260L Address of init function<br />
0&#215;8048480L Address of termination function<br />
0&#215;8048148L Address of symbol hash table<br />
0&#215;80481C0L Address of string table<br />
0&#215;8048170L Address of symbol table<br />
0&#215;59L Size of string table<br />
0&#215;10L Size of one symbol table entry<br />
0&#215;0L For debugging; unspecified<br />
0&#215;8049588L Processor defined value<br />
0&#215;8L Size in bytes of PLT relocs<br />
0&#215;11L Type of reloc in PLT<br />
0&#215;804824CL Address of PLT relocs<br />
0&#215;8048244L Address of Rel relocs<br />
0&#215;8L Total size of Rel relocs<br />
0&#215;8L Size of one Rel reloc<br />
0&#215;8048224L Unknown: 0&#215;6FFFFFFEL<br />
0&#215;1L Unknown: 0&#215;6FFFFFFFL<br />
0&#215;804821AL Unknown: 0&#215;6FFFFFF0L<br />
0&#215;0L Marks end of dynamic section</p>
<p>Virtual Memory: hello.exe,       start: 80482a0,         flags: 0</p>
<p>====== Section Header:       .init ======<br />
======  Starting Address:       0&#215;08048260      Length:         0&#215;0017<br />
======  File Offset:            0&#215;0260          Size in File:   0&#215;0017<br />
======  Size in Memory:         0&#215;0000<br />
==================</p>
<p>Subroutine: .init, (), _init(), , _init (8048260)        8 lines         0&#215;17 bytes<br />
Starting address: 8048260               Ending address: 8048276</p>
<p>;       .init, (), _init(), , _init<br />
Called from: __libc_csu_init(), __libc_csu_init (80483a0)   at 80483b6<br />
8048260:                                   \x55        push          %ebp<br />
8048261:                               \x89\xe5        mov           %esp, %ebp<br />
8048263:                           \x83\xec\x08        sub           $0&#215;8, %esp<br />
8048266:                   \xe8\x65\x00\x00\x00        call          0&#215;80482d0                         ;  call_gmon_start(), call_gmon_start<br />
804826b:                   \xe8\xd0\x00\x00\x00        call          0&#215;8048340                         ;  frame_dummy(), frame_dummy<br />
8048270:                   \xe8\xdb\x01\x00\x00        call          0&#215;8048450                         ;  __do_global_ctors_aux(), __do_global_ctors_aux<br />
8048275:                                   \xc9        leave<br />
8048276:                                   \xc3        ret<br />
End Subroutine: .init, (), _init(), , _init (8048260)    8 lines         0&#215;17 bytes</p>
<p>====== Section Header:       .plt ======<br />
======  Starting Address:       0&#215;08048278      Length:         0&#215;0020<br />
======  File Offset:            0&#215;0278          Size in File:   0&#215;0020<br />
======  Size in Memory:         0&#215;0004<br />
==================</p>
<p>Subroutine: .plt, (),  (8048278)         4 lines         0&#215;10 bytes</p>
<p>;       .plt, (),<br />
JMPed from: __libc_start_main()  (PLT) (8048288)   at 8048293<br />
8048278:               \xff\x35\x8c\x95\x04\x08        pushl         0&#215;804958c                         ;  &#8216;\x00\x00\x00\x00\x00&#8242;&#8230; (.got.plt+0&#215;4)<br />
804827e:               \xff\x25\x90\x95\x04\x08        jmpl          *0&#215;8049590                        ;  &#8216;\x00\x00\x00\x00\x8e\x82\x04\x08&#8242;&#8230; (.got.plt+0&#215;8)<br />
8048284:                               \x00\x00        add           %al, (%eax)<br />
8048286:                               \x00\x00        add           %al, (%eax)<br />
End Subroutine: .plt, (),  (8048278)     4 lines         0&#215;10 bytes</p>
<p>Subroutine: __libc_start_main()  (PLT) (8048288)         3 lines         0&#215;10 bytes</p>
<p>;       __libc_start_main()  (PLT)<br />
Called from: ELF Start, .text, (), _start(), , _start (80482a0)   at 80482bc<br />
8048288:               \xff\x25\x94\x95\x04\x08        jmpl          *0&#215;8049594                        ;  __libc_start_main()<br />
804828e:                   \x68\x00\x00\x00\x00        push          $0&#215;0<br />
8048293:                   \xe9\xe0\xff\xff\xff        jmp           0&#215;8048278                         ; jmp .plt, (),  (8048278)  :-1b:<br />
End Subroutine: __libc_start_main()  (PLT) (8048288)     3 lines         0&#215;10 bytes</p>
<p><strong>====== Section Header:       .text ======<br />
======  Starting Address:       0&#215;080482a0      Length:         0&#215;01e0<br />
======  File Offset:            0&#215;02a0          Size in File:   0&#215;01e0<br />
======  Size in Memory:         0&#215;0000<br />
==================</strong></p>
<p>Subroutine: ELF Start, .text, (), _start(), , _start (80482a0)   28 lines        0&#215;30 bytes<br />
Starting address: 80482a0               Ending address: 80482cf</p>
<p>;       ELF Start, .text, (), _start(), , _start<br />
<strong> 80482a0:                               \x31\xed        xor           %ebp, %ebp<br />
80482a2:                                   \x5e        pop           %esi<br />
80482a3:                               \x89\xe1        mov           %esp, %ecx<br />
80482a5:                           \x83\xe4\xf0        and           $0xf0, %esp<br />
80482a8:                                   \x50        push          %eax<br />
80482a9:                                   \x54        push          %esp<br />
80482aa:                                   \x52        push          %edx<br />
80482ab:                   \x68\x00\x84\x04\x08        push          $0&#215;8048400                        ; push __libc_csu_fini(), __libc_csu_fini (8048400)  :+155:<br />
80482b0:                   \x68\xa0\x83\x04\x08        push          $0&#215;80483a0                        ; push __libc_csu_init(), __libc_csu_init (80483a0)  :+f0:<br />
80482b5:                                   \x51        push          %ecx<br />
80482b6:                                   \x56        push          %esi<br />
80482b7:                   \x68\x74\x83\x04\x08        push          $0&#215;8048374                        ; push frame_dummy(), frame_dummy (8048340) (+0&#215;34)  :+bd:<br />
80482bc:                   \xe8\xc7\xff\xff\xff        call          0&#215;8048288                         ; call __libc_start_main()  (PLT) (8048288)  :-34:<br />
80482c1:                                   \xf4        hlt</strong><br />
80482c2:                                   \x90        nop<br />
80482c3:                                   \x90        nop<br />
80482c4:                                   \x90        nop<br />
80482c5:                                   \x90        nop<br />
80482c6:                                   \x90        nop<br />
80482c7:                                   \x90        nop<br />
80482c8:                                   \x90        nop<br />
80482c9:                                   \x90        nop<br />
80482ca:                                   \x90        nop<br />
80482cb:                                   \x90        nop<br />
80482cc:                                   \x90        nop<br />
80482cd:                                   \x90        nop<br />
80482ce:                                   \x90        nop<br />
80482cf:                                   \x90        nop<br />
End Subroutine: ELF Start, .text, (), _start(), , _start (80482a0)       28 lines        0&#215;30 bytes</p>
<p>Subroutine: call_gmon_start(), call_gmon_start (80482d0)         26 lines        0&#215;30 bytes<br />
Starting address: 80482d0               Ending address: 80482ff</p>
<p>;       call_gmon_start(), call_gmon_start<br />
80482d0:                                   \x55        push          %ebp<br />
80482d1:                               \x89\xe5        mov           %esp, %ebp<br />
80482d3:                                   \x53        push          %ebx<br />
80482d4:                           \x83\xec\x04        sub           $0&#215;4, %esp<br />
80482d7:                   \xe8\x16\x00\x00\x00        call          0&#215;80482f2                         ; call (local)  :+1b:<br />
80482dc:               \x81\xc3\xac\x12\x00\x00        add           $0&#215;12ac, %ebx<br />
80482e2:               \x8b\x83\xfc\xff\xff\xff        mov           0xfffffffc(%ebx), %eax<br />
80482e8:                               \x85\xc0        test          %eax, %eax<br />
80482ea:                               \x74\x02        jz            0&#215;80482ee                         ; jz  (local)  :+4:<br />
80482ec:                               \xff\xd0        call          *%eax</p>
<p>Referenced by: (local)   at 80482ea<br />
80482ee:                                   \x58        pop           %eax<br />
80482ef:                                   \x5b        pop           %ebx<br />
80482f0:                                   \x5d        pop           %ebp<br />
80482f1:                                   \xc3        ret</p>
<p>;       __i686.get_pc_thunk.bx(), __i686.get_pc_thunk.bx<br />
Called from: __libc_csu_fini(), __libc_csu_fini (8048400)   at 8048409<br />
Called from: __libc_csu_init(), __libc_csu_init (80483a0)   at 80483ab<br />
Called from: (local)   at 80482d7<br />
Called from: .fini, (), _fini(), , _fini (8048480)   at 8048487<br />
80482f2:                           \x8b\x1c\x24        mov           (%esp), %ebx<br />
80482f5:                                   \xc3        ret<br />
80482f6:                                   \x90        nop<br />
80482f7:                                   \x90        nop<br />
80482f8:                                   \x90        nop<br />
80482f9:                                   \x90        nop<br />
80482fa:                                   \x90        nop<br />
80482fb:                                   \x90        nop<br />
80482fc:                                   \x90        nop<br />
80482fd:                                   \x90        nop<br />
80482fe:                                   \x90        nop<br />
80482ff:                                   \x90        nop<br />
End Subroutine: call_gmon_start(), call_gmon_start (80482d0)     26 lines        0&#215;30 bytes</p>
<p>Subroutine: __do_global_dtors_aux(), __do_global_dtors_aux (8048300)     31 lines        0&#215;40 bytes<br />
Starting address: 8048300               Ending address: 804833f</p>
<p>;       __do_global_dtors_aux(), __do_global_dtors_aux<br />
Called from: .fini, (), _fini(), , _fini (8048480)   at 8048492<br />
8048300:                                   \x55        push          %ebp<br />
8048301:                               \x89\xe5        mov           %esp, %ebp<br />
8048303:                           \x83\xec\x08        sub           $0&#215;8, %esp<br />
8048306:           \x80\x3d\xb4\x95\x04\x08\x00        cmpb          $0&#215;0, 0&#215;80495b4                   ;  .bss, (), completed.1(), __bss_start(), _edata(), , completed.1, __bss_start, _edata<br />
804830d:                               \x74\x1b        jz            0&#215;804832a                         ; jz  (local)  :+1d:<br />
804830f:                               \xeb\x2b        jmp           0&#215;804833c                         ; jmp (local)  :+2d:<br />
8048311:                               \xeb\x0d        jmp           0&#215;8048320                         ; jmp (local)  :+f:<br />
8048313:                                   \x90        nop<br />
8048314:                                   \x90        nop<br />
8048315:                                   \x90        nop<br />
8048316:                                   \x90        nop<br />
8048317:                                   \x90        nop<br />
8048318:                                   \x90        nop<br />
8048319:                                   \x90        nop<br />
804831a:                                   \x90        nop<br />
804831b:                                   \x90        nop<br />
804831c:                                   \x90        nop<br />
804831d:                                   \x90        nop<br />
804831e:                                   \x90        nop<br />
804831f:                                   \x90        nop</p>
<p>Referenced by: (local)   at 8048333<br />
JMPed from: (local)   at 8048311<br />
8048320:                           \x83\xc0\x04        add           $0&#215;4, %eax<br />
8048323:                   \xa3\xa0\x95\x04\x08        mov           %eax, 0&#215;80495a0<br />
8048328:                               \xff\xd2        call          *%edx</p>
<p>Referenced by: (local)   at 804830d<br />
804832a:                   \xa1\xa0\x95\x04\x08        mov           0&#215;80495a0, %eax<br />
804832f:                               \x8b\x10        mov           (%eax), %edx<br />
8048331:                               \x85\xd2        test          %edx, %edx<br />
8048333:                               \x75\xeb        jnz           0&#215;8048320                         ; jnz (local)  :-13:<br />
8048335:           \xc6\x05\xb4\x95\x04\x08\x01        movb          $0&#215;1, 0&#215;80495b4                   ;  .bss, (), completed.1(), __bss_start(), _edata(), , completed.1, __bss_start, _edata</p>
<p>JMPed from: (local)   at 804830f<br />
804833c:                                   \xc9        leave<br />
804833d:                                   \xc3        ret<br />
804833e:                               \x89\xf6        mov           %esi, %esi<br />
End Subroutine: __do_global_dtors_aux(), __do_global_dtors_aux (8048300)         31 lines        0&#215;40 bytes</p>
<p>Subroutine: frame_dummy(), frame_dummy (8048340)         37 lines        0&#215;60 bytes<br />
Starting address: 8048340               Ending address: 804839f</p>
<p>;       frame_dummy(), frame_dummy<br />
8048340:                                   \x55        push          %ebp<br />
8048341:                               \x89\xe5        mov           %esp, %ebp<br />
8048343:                           \x83\xec\x08        sub           $0&#215;8, %esp<br />
8048346:                   \xa1\xb8\x94\x04\x08        mov           0&#215;80494b8, %eax<br />
804834b:                               \x85\xc0        test          %eax, %eax<br />
804834d:                               \x74\x21        jz            0&#215;8048370                         ; jz  (local)  :+23:<br />
804834f:                   \xb8\x00\x00\x00\x00        mov           $0&#215;0, %eax<br />
8048354:                               \x85\xc0        test          %eax, %eax<br />
8048356:                               \x74\x18        jz            0&#215;8048370                         ; jz  (local)  :+1a:<br />
8048358:                           \x83\xec\x0c        sub           $0xc, %esp<br />
804835b:                   \x68\xb8\x94\x04\x08        push          $0&#215;80494b8                        ;  .jcr, (), __JCR_LIST__(), __JCR_END__(), , __JCR_LIST__, __JCR_END__<br />
8048360:                   \xe8\x9b\x7c\xfb\xf7        call          0&#215;0<br />
8048365:                           \x83\xc4\x10        add           $0&#215;10, %esp<br />
8048368:                                   \x90        nop<br />
8048369:           \x8d\xb4\x26\x00\x00\x00\x00        lea           0&#215;0(%esi), %esi</p>
<p>Referenced by: (local)   at 804834d<br />
Referenced by: (local)   at 8048356<br />
8048370:                                   \xc9        leave<br />
8048371:                                   \xc3        ret<br />
8048372:                                   \x90        nop<br />
8048373:                                   \x90        nop</p>
<p>;       main(), main<br />
Referenced by: ELF Start, .text, (), _start(), , _start (80482a0)   at 80482b7<br />
8048374:                   \xb8\x04\x00\x00\x00        mov           $0&#215;4, %eax<br />
8048379:                   \xbb\x01\x00\x00\x00        mov           $0&#215;1, %ebx<br />
804837e:                   \xb9\xa4\x95\x04\x08        mov           $0&#215;80495a4, %ecx                  ;  hello(), hello<br />
8048383:                   \xba\xb1\x95\x04\x08        mov           $0&#215;80495b1, %edx                  ;  &#8216;\x0c&#8217; (.data) , hlen(), hlen<br />
8048388:                               \xcd\x80        int           $0&#215;80<br />
804838a:                   \xb8\x01\x00\x00\x00        mov           $0&#215;1, %eax<br />
804838f:                   \xbb\x00\x00\x00\x00        mov           $0&#215;0, %ebx<br />
8048394:                               \xcd\x80        int           $0&#215;80<br />
8048396:                                   \xc3        ret<br />
8048397:                                   \x90        nop<br />
8048398:                                   \x90        nop<br />
8048399:                                   \x90        nop<br />
804839a:                                   \x90        nop<br />
804839b:                                   \x90        nop<br />
804839c:                                   \x90        nop<br />
804839d:                                   \x90        nop<br />
804839e:                                   \x90        nop<br />
804839f:                                   \x90        nop<br />
End Subroutine: frame_dummy(), frame_dummy (8048340)     37 lines        0&#215;60 bytes</p>
<p>Subroutine: __libc_csu_init(), __libc_csu_init (80483a0)         35 lines        0&#215;60 bytes<br />
Variables:<br />
fffffff0 (   10) _____________________________________________________<br />
Starting address: 80483a0               Ending address: 80483ff</p>
<p>;       __libc_csu_init(), __libc_csu_init<br />
Referenced by: ELF Start, .text, (), _start(), , _start (80482a0)   at 80482b0<br />
80483a0:                                   \x55        push          %ebp<br />
80483a1:                               \x89\xe5        mov           %esp, %ebp<br />
80483a3:                                   \x57        push          %edi<br />
80483a4:                                   \x56        push          %esi<br />
80483a5:                               \x31\xf6        xor           %esi, %esi<br />
80483a7:                                   \x53        push          %ebx<br />
80483a8:                           \x83\xec\x0c        sub           $0xc, %esp<br />
80483ab:                   \xe8\x42\xff\xff\xff        call          0&#215;80482f2                         ; call call_gmon_start(), call_gmon_start (80482d0) (+0&#215;22)  :-b9:<br />
80483b0:               \x81\xc3\xd8\x11\x00\x00        add           $0&#215;11d8, %ebx<br />
80483b6:                   \xe8\xa5\xfe\xff\xff        call          0&#215;8048260                         ; call .init, (), _init(), , _init (8048260)  :-156:<br />
80483bb:               \x8d\x83\x20\xff\xff\xff        lea           0xffffff20(%ebx), %eax<br />
80483c1:               \x8d\x93\x20\xff\xff\xff        lea           0xffffff20(%ebx), %edx<br />
80483c7:                           \x89\x45\xf0        mov           %eax, 0xfffffff0(%ebp)<br />
80483ca:                               \x29\xd0        sub           %edx, %eax<br />
80483cc:                           \xc1\xf8\x02        sar           $0&#215;2, %eax<br />
80483cf:                               \x39\xc6        cmp           %eax, %esi<br />
80483d1:                               \x73\x1f        jnc           0&#215;80483f2                         ; jnc (local)  :+21:<br />
80483d3:                               \x89\xd7        mov           %edx, %edi<br />
80483d5:                       \x8d\x74\x26\x00        lea           0&#215;0(%esi), %esi<br />
80483d9:           \x8d\xbc\x27\x00\x00\x00\x00        lea           0&#215;0(%edi), %edi</p>
<p>Referenced by: (local)   at 80483f0<br />
80483e0:                           \xff\x14\xb2        calll         *(%edx, %esi, 4)<br />
80483e3:                           \x8b\x4d\xf0        mov           0xfffffff0(%ebp), %ecx<br />
80483e6:                                   \x46        inc           %esi<br />
80483e7:                               \x89\xfa        mov           %edi, %edx<br />
80483e9:                               \x29\xf9        sub           %edi, %ecx<br />
80483eb:                           \xc1\xf9\x02        sar           $0&#215;2, %ecx<br />
80483ee:                               \x39\xce        cmp           %ecx, %esi<br />
80483f0:                               \x72\xee        jc            0&#215;80483e0                         ; jc  (local)  :-10:</p>
<p>Referenced by: (local)   at 80483d1<br />
80483f2:                           \x83\xc4\x0c        add           $0xc, %esp<br />
80483f5:                                   \x5b        pop           %ebx<br />
80483f6:                                   \x5e        pop           %esi<br />
80483f7:                                   \x5f        pop           %edi<br />
80483f8:                                   \x5d        pop           %ebp<br />
80483f9:                                   \xc3        ret<br />
80483fa:               \x8d\xb6\x00\x00\x00\x00        lea           0&#215;0(%esi), %esi<br />
End Subroutine: __libc_csu_init(), __libc_csu_init (80483a0)     35 lines        0&#215;60 bytes</p>
<p>Subroutine: __libc_csu_fini(), __libc_csu_fini (8048400)         30 lines        0&#215;50 bytes<br />
Variables:<br />
fffffffc (    4) _____________________________________________________<br />
fffffff8 (    4) _____________________________________________________<br />
fffffff4 (    4) _____________________________________________________<br />
Starting address: 8048400               Ending address: 804844f</p>
<p>;       __libc_csu_fini(), __libc_csu_fini<br />
Referenced by: ELF Start, .text, (), _start(), , _start (80482a0)   at 80482ab<br />
8048400:                                   \x55        push          %ebp<br />
8048401:                               \x89\xe5        mov           %esp, %ebp<br />
8048403:                           \x83\xec\x18        sub           $0&#215;18, %esp<br />
8048406:                           \x89\x5d\xf4        mov           %ebx, 0xfffffff4(%ebp)<br />
8048409:                   \xe8\xe4\xfe\xff\xff        call          0&#215;80482f2                         ; call call_gmon_start(), call_gmon_start (80482d0) (+0&#215;22)  :-117:<br />
804840e:               \x81\xc3\x7a\x11\x00\x00        add           $0&#215;117a, %ebx<br />
8048414:                           \x89\x7d\xfc        mov           %edi, 0xfffffffc(%ebp)<br />
8048417:               \x8d\x83\x20\xff\xff\xff        lea           0xffffff20(%ebx), %eax<br />
804841d:               \x8d\xbb\x20\xff\xff\xff        lea           0xffffff20(%ebx), %edi<br />
8048423:                           \x89\x75\xf8        mov           %esi, 0xfffffff8(%ebp)<br />
8048426:                               \x29\xf8        sub           %edi, %eax<br />
8048428:                           \xc1\xf8\x02        sar           $0&#215;2, %eax<br />
804842b:                           \x8d\x70\xff        lea           0xffffffff(%eax), %esi<br />
804842e:                               \xeb\x04        jmp           0&#215;8048434                         ; jmp (local)  :+6:</p>
<p>Referenced by: (local)   at 8048437<br />
8048430:                           \xff\x14\xb7        calll         *(%edi, %esi, 4)<br />
8048433:                                   \x4e        dec           %esi</p>
<p>JMPed from: (local)   at 804842e<br />
8048434:                           \x83\xfe\xff        cmp           $0xffffffff, %esi<br />
8048437:                               \x75\xf7        jnz           0&#215;8048430                         ; jnz (local)  :-7:<br />
8048439:                   \xe8\x42\x00\x00\x00        call          0&#215;8048480                         ;  .fini, (), _fini(), , _fini<br />
804843e:                           \x8b\x5d\xf4        mov           0xfffffff4(%ebp), %ebx<br />
8048441:                           \x8b\x75\xf8        mov           0xfffffff8(%ebp), %esi<br />
8048444:                           \x8b\x7d\xfc        mov           0xfffffffc(%ebp), %edi<br />
8048447:                               \x89\xec        mov           %ebp, %esp<br />
8048449:                                   \x5d        pop           %ebp<br />
804844a:                                   \xc3        ret<br />
804844b:                                   \x90        nop<br />
804844c:                                   \x90        nop<br />
804844d:                                   \x90        nop<br />
804844e:                                   \x90        nop<br />
804844f:                                   \x90        nop<br />
End Subroutine: __libc_csu_fini(), __libc_csu_fini (8048400)     30 lines        0&#215;50 bytes</p>
<p>Subroutine: __do_global_ctors_aux(), __do_global_ctors_aux (8048450)     30 lines        0&#215;30 bytes<br />
Starting address: 8048450               Ending address: 804847f</p>
<p>;       __do_global_ctors_aux(), __do_global_ctors_aux<br />
8048450:                                   \x55        push          %ebp<br />
8048451:                               \x89\xe5        mov           %esp, %ebp<br />
8048453:                                   \x53        push          %ebx<br />
8048454:                                   \x52        push          %edx<br />
8048455:                   \xbb\xa8\x94\x04\x08        mov           $0&#215;80494a8, %ebx                  ;  .ctors, &#8216;\xff\xff\xff\xff&#8217; (.ctors) , (), __CTOR_LIST__(), __fini_array_end(), __fini_array_start(), __init_array_end(), __init_array_start(), , __CTOR_LIST__, __fini_array_end, __fini_array_start, __init_array_end, __init_array_start<br />
804845a:                   \xa1\xa8\x94\x04\x08        mov           0&#215;80494a8, %eax<br />
804845f:                               \xeb\x16        jmp           0&#215;8048477                         ; jmp (local)  :+18:<br />
8048461:                               \xeb\x0d        jmp           0&#215;8048470                         ; jmp (local)  :+f:<br />
8048463:                                   \x90        nop<br />
8048464:                                   \x90        nop<br />
8048465:                                   \x90        nop<br />
8048466:                                   \x90        nop<br />
8048467:                                   \x90        nop<br />
8048468:                                   \x90        nop<br />
8048469:                                   \x90        nop<br />
804846a:                                   \x90        nop<br />
804846b:                                   \x90        nop<br />
804846c:                                   \x90        nop<br />
804846d:                                   \x90        nop<br />
804846e:                                   \x90        nop<br />
804846f:                                   \x90        nop</p>
<p>Referenced by: (local)   at 804847a<br />
JMPed from: (local)   at 8048461<br />
8048470:                           \x83\xeb\x04        sub           $0&#215;4, %ebx<br />
8048473:                               \xff\xd0        call          *%eax<br />
8048475:                               \x8b\x03        mov           (%ebx), %eax</p>
<p>JMPed from: (local)   at 804845f<br />
8048477:                           \x83\xf8\xff        cmp           $0xffffffff, %eax<br />
804847a:                               \x75\xf4        jnz           0&#215;8048470                         ; jnz (local)  :-a:<br />
804847c:                                   \x58        pop           %eax<br />
804847d:                                   \x5b        pop           %ebx<br />
804847e:                                   \x5d        pop           %ebp<br />
804847f:                                   \xc3        ret<br />
End Subroutine: __do_global_ctors_aux(), __do_global_ctors_aux (8048450)         30 lines        0&#215;30 bytes</p>
<p>====== Section Header:       .fini ======<br />
======  Starting Address:       0&#215;08048480      Length:         0&#215;001b<br />
======  File Offset:            0&#215;0480          Size in File:   0&#215;001b<br />
======  Size in Memory:         0&#215;0000<br />
==================</p>
<p>Subroutine: .fini, (), _fini(), , _fini (8048480)        11 lines        0&#215;1b bytes<br />
Starting address: 8048480               Ending address: 804849a</p>
<p>;       .fini, (), _fini(), , _fini<br />
8048480:                                   \x55        push          %ebp<br />
8048481:                               \x89\xe5        mov           %esp, %ebp<br />
8048483:                                   \x53        push          %ebx<br />
8048484:                           \x83\xec\x04        sub           $0&#215;4, %esp<br />
8048487:                   \xe8\x66\xfe\xff\xff        call          0&#215;80482f2                         ; call call_gmon_start(), call_gmon_start (80482d0) (+0&#215;22)  :-195:<br />
804848c:               \x81\xc3\xfc\x10\x00\x00        add           $0&#215;10fc, %ebx<br />
8048492:                   \xe8\x69\xfe\xff\xff        call          0&#215;8048300                         ; call __do_global_dtors_aux(), __do_global_dtors_aux (8048300)  :-192:<br />
8048497:                                   \x5a        pop           %edx<br />
8048498:                                   \x5b        pop           %ebx<br />
8048499:                                   \x5d        pop           %ebp<br />
804849a:                                   \xc3        ret<br />
End Subroutine: .fini, (), _fini(), , _fini (8048480)    11 lines        0&#215;1b bytes<br />
0: (), (), (), (), (), (), (), (), (), (), (), <command>(), ./../include/libc-symbols.h(), ./../include/libc-symbols.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/config.h(), ./../include/libc-symbols.h(), <command>(), <built-in>(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/csu//(), abi-note.S(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/abi-tag.h(), abi-note.S(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/config.h(), abi-note.S(), <command>(), ./../include/libc-symbols.h(), ./../include/libc-symbols.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/config.h(), ./../include/libc-symbols.h(), <command>(), <built-in>(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/csu//(), abi-note.S(), init.c(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crti.S(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/defs.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/defs.h(), initfini.c(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crti.S(), <command>(), ./../include/libc-symbols.h(), ./../include/libc-symbols.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/config.h(), ./../include/libc-symbols.h(), <command>(), <built-in>(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crti.S(), crtstuff.c(), crtstuff.c(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crtn.S(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/defs.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/defs.h(), initfini.c(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crtn.S(), <command>(), ./../include/libc-symbols.h(), ./../include/libc-symbols.h(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/config.h(), ./../include/libc-symbols.h(), <command>(), <built-in>(), /glibc-tmp-91a3c13f482c0e54fcb31801829d957b/glibc-2.3.6/build-glibc-2.3.6/csu/crtn.S(), __libc_start_main@@GLIBC_2.0(), _Jv_RegisterClasses(), __gmon_start__(), (), __libc_start_main(), _Jv_RegisterClasses(), __gmon_start__()<br />
8048114: .interp, &#8216;/lib/ld-linux.so.2&#8242; (.interp) , (),<br />
8048128: .note.ABI-tag, &#8216;\x04&#8242; (.note.ABI-tag) , (),<br />
804812c: &#8216;\x10&#8242; (.note.ABI-tag)<br />
8048130: &#8216;\x01&#8242; (.note.ABI-tag)<br />
8048134: &#8216;GNU&#8217; (.note.ABI-tag)<br />
804813c: &#8216;\x02&#8242; (.note.ABI-tag)<br />
8048140: &#8216;\x04&#8242; (.note.ABI-tag)<br />
8048144: &#8216;\x01&#8242; (.note.ABI-tag)<br />
8048148: .hash, &#8216;\x03&#8242; (.hash) , (),<br />
804814c: &#8216;\x05&#8242; (.hash)<br />
8048150: &#8216;\x04&#8242; (.hash)<br />
8048154: &#8216;\x01&#8242; (.hash)<br />
8048158: &#8216;\x02&#8242; (.hash)<br />
804816c: &#8216;\x03&#8242; (.hash)<br />
8048170: .dynsym, (),<br />
8048180: &#8216;=&#8217; (.dynsym)<br />
8048188: &#8216;\xde&#8217; (.dynsym)<br />
804818c: &#8216;\x12&#8242; (.dynsym)<br />
8048190: &#8216;.&#8217; (.dynsym)<br />
8048194: &#8216;\xa0\x84\x04\x08\x04&#8242; (.dynsym)<br />
804819c: &#8216;\x11&#8242; (.dynsym)<br />
804819e: &#8216;\x0e&#8217; (.dynsym)<br />
80481a0: &#8216;\x01&#8242; (.dynsym)<br />
80481ac: &#8216; &#8216; (.dynsym)<br />
80481b0: &#8216;\x15&#8242; (.dynsym)<br />
80481bc: &#8216; &#8216; (.dynsym)<br />
80481c0: .dynstr, (),<br />
80481c1: &#8216;_Jv_RegisterClasses&#8217; (.dynstr)<br />
80481d5: &#8216;__gmon_start__&#8217; (.dynstr)<br />
80481e4: &#8216;libc.so.6&#8242; (.dynstr)<br />
80481ee: &#8216;_IO_stdin_used&#8217; (.dynstr)<br />
80481fd: &#8216;__libc_start_main&#8217; (.dynstr)<br />
804820f: &#8216;GLIBC_2.0&#8242; (.dynstr)<br />
804821a: .gnu.version, (),<br />
804821c: &#8216;\x02&#8242; (.gnu.version)<br />
804821e: &#8216;\x01&#8242; (.gnu.version)<br />
8048224: .gnu.version_r, &#8216;\x01&#8242; (.gnu.version_r) , (),<br />
8048226: &#8216;\x01&#8242; (.gnu.version_r)<br />
8048228: &#8216;$&#8217; (.gnu.version_r)<br />
804822c: &#8216;\x10&#8242; (.gnu.version_r)<br />
&#8216; (.gnu.version_r)<br />
804823a: &#8216;\x02&#8242; (.gnu.version_r)<br />
804823c: &#8216;O&#8217; (.gnu.version_r)<br />
8048244: .rel.dyn, &#8216;\x84\x95\x04\x08\x06\x04&#8242; (.rel.dyn) , (),<br />
804824c: .rel.plt, &#8216;\x94\x95\x04\x08\x07\x01&#8242; (.rel.plt) , (),<br />
8048260: .init, (), _init(), , _init<br />
8048278: .plt, (),<br />
8048288: __libc_start_main()  (PLT)<br />
80482a0: ELF Start, .text, (), _start(), , _start<br />
80482d0: call_gmon_start(), call_gmon_start<br />
80482f2: __i686.get_pc_thunk.bx(), __i686.get_pc_thunk.bx<br />
8048300: __do_global_dtors_aux(), __do_global_dtors_aux<br />
8048340: frame_dummy(), frame_dummy<br />
8048374: main(), main<br />
80483a0: __libc_csu_init(), __libc_csu_init<br />
8048400: __libc_csu_fini(), __libc_csu_fini<br />
8048450: __do_global_ctors_aux(), __do_global_ctors_aux<br />
8048480: .fini, (), _fini(), , _fini<br />
804849c: .rodata, &#8216;\x03&#8242; (.rodata) , (), _fp_hw(), , _fp_hw<br />
80484a0: &#8216;\x01&#8242; (.rodata) , _IO_stdin_used(), _IO_stdin_used(), _IO_stdin_used<br />
80484a2: &#8216;\x02&#8242; (.rodata)<br />
80484a4: .eh_frame, (), __FRAME_END__(), , __FRAME_END__<br />
80494a8: .ctors, &#8216;\xff\xff\xff\xff&#8217; (.ctors) , (), __CTOR_LIST__(), __fini_array_end(), __fini_array_start(), __init_array_end(), __init_array_start(), , __CTOR_LIST__, __fini_array_end, __fini_array_start, __init_array_end, __init_array_start<br />
80494ac: __CTOR_END__(), __CTOR_END__<br />
80494b0: .dtors, &#8216;\xff\xff\xff\xff&#8217; (.dtors) , (), __DTOR_LIST__(), , __DTOR_LIST__<br />
80494b4: __DTOR_END__(), __DTOR_END__<br />
80494b8: .jcr, (), __JCR_LIST__(), __JCR_END__(), , __JCR_LIST__, __JCR_END__<br />
80494bc: .dynamic, &#8216;\x01&#8242; (.dynamic) , (), _DYNAMIC(), , _DYNAMIC<br />
80494c0: &#8216;$&#8217; (.dynamic)<br />
80494c4: &#8216;\x0c&#8217; (.dynamic)<br />
80494c8: &#8216;\x60\x82\x04\x08\x0d&#8217; (.dynamic)<br />
80494d0: &#8216;\x80\x84\x04\x08\x04&#8242; (.dynamic)<br />
80494d8: &#8216;\x48\x81\x04\x08\x05&#8242; (.dynamic)<br />
80494e0: &#8216;\xc0\x81\x04\x08\x06&#8242; (.dynamic)<br />
80494e8: &#8216;\x70\x81\x04\x08\x0a&#8217; (.dynamic)<br />
80494f0: &#8216;Y&#8217; (.dynamic)<br />
80494f4: &#8216;\x0b&#8217; (.dynamic)<br />
80494f8: &#8216;\x10&#8242; (.dynamic)<br />
80494fc: &#8216;\x15&#8242; (.dynamic)<br />
8049504: &#8216;\x03&#8242; (.dynamic)<br />
8049508: &#8216;\x88\x95\x04\x08\x02&#8242; (.dynamic)<br />
8049510: &#8216;\x08&#8242; (.dynamic)<br />
8049514: &#8216;\x14&#8242; (.dynamic)<br />
8049518: &#8216;\x11&#8242; (.dynamic)<br />
804951c: &#8216;\x17&#8242; (.dynamic)<br />
8049520: &#8216;\x4c\x82\x04\x08\x11&#8242; (.dynamic)<br />
8049528: &#8216;\x44\x82\x04\x08\x12&#8242; (.dynamic)<br />
8049530: &#8216;\x08&#8242; (.dynamic)<br />
8049534: &#8216;\x13&#8242; (.dynamic)<br />
8049538: &#8216;\x08&#8242; (.dynamic)<br />
804953c: &#8216;\xfe\xff\xff\x6f\x24\x82\x04\x08\xff\xff\xff\x6f\x01&#8242; (.dynamic)<br />
804954c: &#8216;\xf0\xff\xff\x6f\x1a\x82\x04\x08&#8242; (.dynamic)<br />
8049584: .got, __gmon_start__(), (),<br />
8049588: .got.plt, (), _GLOBAL_OFFSET_TABLE_(), , _GLOBAL_OFFSET_TABLE_<br />
804958c: &#8216;\x00\x00\x00\x00\x00&#8242;&#8230; (.got.plt+0&#215;4)<br />
8049590: &#8216;\x00\x00\x00\x00\x8e\x82\x04\x08&#8242;&#8230; (.got.plt+0&#215;8)<br />
8049594: __libc_start_main()<br />
8049598: .data, (), data_start(), __data_start(), , data_start, __data_start<br />
804959c: __dso_handle(), __dso_handle<br />
80495a0: &#8216;Hello World<br />
&#8216; (.data) , p.0(), p.0<br />
80495a4: hello(), hello<br />
80495b1: &#8216;\x0c&#8217; (.data) , hlen(), hlen<br />
80495b4: .bss, (), completed.1(), __bss_start(), _edata(), , completed.1, __bss_start, _edata<br />
80495b5: &#8216;GCC&#8217; (.bss)<br />
80495b8: _end(), _end</built-in></command></command></built-in></command></command></built-in></command></command></built-in></command></command></p>
<p><font color="red">bt</font> <font color="blue">hello #</font></p></blockquote>
<p>Dang, the GCC output is so big and convoluted, I couldn&#8217;t keep up with it.</p>
<p>Now that we have seen the output of these files, you are probably asking yourself, &#8220;Why are disassemblers important?&#8221; Well, they analyze the executable for us so that we do not have to open the file in a hex editor and then begin decrypting the system calls and opcodes.  It also provides us with the locations of various interesting instructions and data within the virtual memory.  I am certain that <a href="http://atlas.r4780y.com/cgi-bin/atlas" target="_blank">atlas</a> has programmed in more features that I have not implemented here and I&#8217;m willing to place a bet that he has something very interesting in the works for future versions of <a href="http://atlas.r4780y.com/resources/disass-3.0-080424.tgz" target="_blank">Disass-3</a>.  For now we are just going to have to wait.</p>
<p>Of course I know that none of this is very exciting.  Just so you know, I did try to think of something that would liven it up a little bit.  Alas, it did not happen.  But at least I did learn a thing or two about Assembly.  Hopefully you did as well.</p>
<p>Go forth and do good things,</p>
<p>Don C. Weber</p>
<span class="ttag"><img src="http://www.cutawaysecurity.com/blog/wp-content/plugins/technobubble.gif" alt="Technorati Tags" /> <a href="http://www.technorati.com/tag/assembly" rel="tag">assembly</a>, <a href="http://www.technorati.com/tag/programming" rel="tag">programming</a>, <a href="http://www.technorati.com/tag/gcc" rel="tag">gcc</a>, <a href="http://www.technorati.com/tag/c" rel="tag">c</a>, <a href="http://www.technorati.com/tag/nasm" rel="tag">nasm</a>, <a href="http://www.technorati.com/tag/ld" rel="tag">ld</a>, <a href="http://www.technorati.com/tag/Disass-3.0" rel="tag">Disass-3.0</a>, <a href="http://www.technorati.com/tag/Security+Ripcord" rel="tag">Security Ripcord</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/240/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello Sleep &#8211; C I H4K U</title>
		<link>http://www.cutawaysecurity.com/blog/archives/239</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/239#comments</comments>
		<pubDate>Fri, 25 Apr 2008 04:27:12 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/archives/239</guid>
		<description><![CDATA[Here is the latest exercise I worked on.  This time I have taken the Hello World c-program I demonstrated in the Hello World &#8211; C to Assembly post and added a sleep to it.  The sleep command paused the program long enough so that I was able to locate the memory allocated to [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the latest exercise I worked on.  This time I have taken the Hello World c-program I demonstrated in the <a href="http://www.cutawaysecurity.com/blog/archives/238" target="_blank">Hello World &#8211; C to Assembly</a> post and added a sleep to it.  The sleep command paused the program long enough so that I was able to locate the memory allocated to the program and change the value of the output.  Of course I would have liked to have figured out a way to detect the code involved with the program instead of the actual string to be output because this might not be known.  But, I guess I am going to have to deal with this for now.</p>
<p>This first section will demonstrate the modifications that were made to the c-program to turn it into hello_sleep.c.  I diffed the assembly file with the version from yesterday so that you and I could see the difference.</p>
<blockquote><p><font color="red">bt</font> <font color="blue">hello_sleep</font> # cat hello_sleep.c<br />
#include &lt;stdio.h&gt;<br />
#include &lt;unistd.h&gt; //Required for sleep cmd</p>
<p>main(){</p>
<p>//Declare local variables<br />
unsigned int sec = 300; // 5 Minutes</p>
<p>sleep(sec);<br />
printf(&#8220;Hello World\n&#8221;);<br />
return(0);<br />
}<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ls<br />
Makefile  hello_sleep.c<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # make hello_sleep.s<br />
cc -S hello_sleep.c<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ls<br />
Makefile  hello_sleep.c  hello_sleep.s<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # cat hello_sleep.s<br />
.file   &#8220;hello_sleep.c&#8221;<br />
.section        .rodata<br />
.LC0:<br />
.string &#8220;Hello World\n&#8221;<br />
.text<br />
.globl main<br />
.type   main, @function<br />
main:<br />
pushl   %ebp<br />
movl    %esp, %ebp<br />
subl    $8, %esp<br />
andl    $-16, %esp<br />
movl    $0, %eax<br />
addl    $15, %eax<br />
addl    $15, %eax<br />
shrl    $4, %eax<br />
sall    $4, %eax<br />
subl    %eax, %esp<br />
movl    $300, -4(%ebp)<br />
subl    $12, %esp<br />
pushl   -4(%ebp)<br />
call    sleep<br />
addl    $16, %esp<br />
subl    $12, %esp<br />
pushl   $.LC0<br />
call    printf<br />
addl    $16, %esp<br />
movl    $0, %eax<br />
leave<br />
ret<br />
.size   main, .-main<br />
.section        .note.GNU-stack,&#8221;",@progbits<br />
.ident  &#8220;GCC: (GNU) 3.4.6&#8243;<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # diff hello_sleep.s ../hello/hello.s<br />
1c1<br />
&lt;       .file   &#8220;hello_sleep.c&#8221;<br />
&#8212;<br />
&gt;       .file   &#8220;hello.c&#8221;<br />
19,23d18<br />
&lt;       movl    $300, -4(%ebp)<br />
&lt;       subl    $12, %esp<br />
&lt;       pushl   -4(%ebp)<br />
&lt;       call    sleep<br />
&lt;       addl    $16, %esp<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # make<br />
cc -c hello_sleep.c<br />
cc hello_sleep.o -o hello_sleep.exe<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ls<br />
Makefile  hello_sleep.c  hello_sleep.exe*  hello_sleep.o  hello_sleep.s<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ./hello_sleep.exe<br />
Hello World<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ./hello_sleep.exe</p></blockquote>
<p>While this was running I opened another terminal and went to work.  Of course I had already set up my tools &#8211; <a href="http://atlas.r4780y.com/cgi-bin/atlas/2007/01/16#070116-FelizNavidad-d00d" target="_blank">VTrace</a> which is now a part of <a href="http://kenshoto.com/vtrace/" target="_blank">VDB</a>.  I also installed the <a href="http://atlas.r4780y.com/cgi-bin/atlas/2008/04/24#080424-released" target="_blank">latest version of libdisassemble and disass-3</a> which <a href="http://atlas.r4780y.com" target="_blank">@</a> just released today.  I&#8217;ll leave the installation process to you this time.  I have highlighted some key information and if you see a &#8220;<strong><em>&lt;- NOTE:</em></strong> &#8221; it is an added comment.</p>
<blockquote><p><font color="red">bt</font> <font color="blue">dev</font> # python        <strong><em>&lt;- NOTE: Time to learn Python</em></strong><br />
Python 2.4.3 (#1, Apr  3 2006, 14:02:53)<br />
[GCC 3.4.6] on linux2<br />
Type &#8220;help&#8221;, &#8220;copyright&#8221;, &#8220;credits&#8221; or &#8220;license&#8221; for more information.<br />
<font color="red">&gt;&gt;&gt;</font> import vtrace                            <em><strong>&lt;- NOTE: Pull in the VTrace functions and objects</strong></em><br />
<font color="red">&gt;&gt;&gt;</font> tr = vtrace.getTrace()            <em><strong>&lt;- NOTE: Create an object that will do the work</strong></em><br />
<font color="red">&gt;&gt;&gt;</font> tr.ps()                                            <em><strong>&lt;- NOTE:  Output the process list.  This could be scripted for future dynamic results.</strong></em><br />
[(1, 'init [3]   &#8216;), (1008, &#8216;/sbin/udevd &#8211;daemon &#8216;), (2178, &#8216;/usr/sbin/syslogd &#8216;), (2181, &#8216;/usr/sbin/klogd -c 3 -x &#8216;), (2198, &#8216;/sbin/dhcpcd -d -t 10 eth0 &#8216;), (2227, &#8216;/usr/sbin/cupsd &#8216;), (2238, &#8216;/usr/sbin/crond -l10 &#8216;), (2274, &#8216;/usr/sbin/gpm -m /dev/mouse -t ps2 &#8216;), (2543, &#8216;/bin/bash /usr/bin/fstab-update &#8211;daemon &#8216;), (2841, &#8216;-bash &#8216;), (2842, &#8216;/sbin/agetty 38400 tty2 linux &#8216;), (2843, &#8216;/sbin/agetty 38400 tty3 linux &#8216;), (2844, &#8216;/sbin/agetty 38400 tty4 linux &#8216;), (2845, &#8216;/sbin/agetty 38400 tty5 linux &#8216;), (2846, &#8216;/sbin/agetty 38400 tty6 linux &#8216;), (2884, &#8216;/bin/sh /usr/X11R6/bin/startx &#8216;), (2902, &#8216;/usr/X11R6/bin/xinit /usr/X11R6/lib/X11/xinit/xinitrc &#8212; -auth /root/.serverauth.2884 &#8216;), (2903, &#8216;X :0 -auth /root/.serverauth.2884 &#8216;), (2919, &#8216;/bin/sh /usr/X11R6/lib/X11/xinit/xinitrc &#8216;), (2923, &#8216;/bin/sh /opt/kde/bin/startkde &#8216;), (2957, &#8216;kdeinit Running&#8230;                     &#8216;), (2962, &#8216;dcopserver [kdeinit] &#8211;nosid           &#8216;), (2964, &#8216;klauncher [kdeinit] &#8211;new-startup      &#8216;), (2966, &#8216;kded [kdeinit] &#8211;new-startup           &#8216;), (2975, &#8216;kwrapper ksmserver &#8216;), (2977, &#8216;ksmserver [kdeinit]                    &#8216;), (2978, &#8216;kwin [kdeinit] -session 10736c6178000117232847800000030170000_1208991555_703768&#8242;), (2980, &#8216;kdesktop [kdeinit]                     &#8216;), (2984, &#8216;kicker [kdeinit]                       &#8216;), (2987, &#8216;kio_file [kdeinit] file /tmp/ksocket-root/klauncherPvcYNb.slave-socket /tmp/ksocket-root/kdesktopnUuTnb.slave-socket&#8217;), (2991, &#8216;kxkb [kdeinit]                         &#8216;), (2995, &#8216;artsd -F 10 -S 4096 -a alsa -m artsmessage -c drkonqi -l 3 -f &#8216;), (2999, &#8216;kaccess [kdeinit]                      &#8216;), (3002, &#8216;krandrtray -session 10736c6178000117232848400000030170007_1208991555_690824 &#8216;), (3006, &#8216;kmix [kdeinit] -session 10736c6178000117232848400000030170008_1208991555_687965&#8242;), (3007, &#8216;konsole [kdeinit] -session 10627400000120899154700000029640010_1208991555_692031 &#8211;ls&#8217;), (3011, &#8216;knotify [kdeinit]                      &#8216;), (3012, &#8216;konsole [kdeinit] &#8211;ls                 &#8216;), (3016, &#8216;konsole [kdeinit] &#8211;ls                 &#8216;), (3017, &#8216;-bash &#8216;), (3027, &#8216;-bash &#8216;), (3044, &#8216;-bash &#8216;), (3125, &#8216;/bin/sh /usr/bin/firefox &#8216;), (3137, &#8216;/bin/sh /opt/firefox/run-mozilla.sh /opt/firefox/firefox-bin &#8216;), (3142, &#8216;/opt/firefox/firefox-bin &#8216;), (3159, &#8216;/usr/local/libexec/gconfd-2 14 &#8216;), (21770, &#8216;/usr/bin/python /usr/bin/pydoc vtrace &#8216;), (21776, &#8216;less &#8216;), <strong>(22462, &#8216;./hello_sleep.exe &#8216;)</strong>, (22936, &#8216;python &#8216;), (23047, &#8217;sleep 1 &#8216;)]<br />
<font color="red">&gt;&gt;&gt;</font> tr.attach(22462)                        <em><strong>&lt;- NOTE:  Attach to the running process.  It is sleeping so be very quite.</strong></em><br />
<font color="red">&gt;&gt;&gt;</font> tr.searchMemory(&#8216;Hello&#8217;)    <em><strong>&lt;- NOTE:  Search the memory for, well, Hello</strong></em><br />
[134513956L, 134518052L]           <em><strong>&lt;- NOTE:  Those are the memory addresses in decimal  form.  The &#8220;L&#8221; means that it is a long integer.</strong></em><br />
<font color="red">&gt;&gt;&gt;</font> tr.readMemory(134513956L,14)  <em><strong>  &lt;- NOTE: Read the memory location</strong></em><br />
&#8216;Hello World\n\x00\x00&#8242;<br />
<font color="red">&gt;&gt;&gt;</font> tr.readMemory(134518052L,14)<br />
&#8216;Hello World\n\x00\x00&#8242;<br />
<font color="red">&gt;&gt;&gt;</font> tr.writeMemory(134513956L,&#8217;h4k3d&#8217;)    <em><strong>&lt;- NOTE: Change the memory location</strong></em><br />
<font color="red">&gt;&gt;&gt;</font> tr.writeMemory(134518052L,&#8217;h4k3d&#8217;)<br />
<font color="red">&gt;&gt;&gt;</font> tr.readMemory(134513956L,14)                <em><strong>&lt;- NOTE: Check your work</strong></em><br />
&#8216;h4k3d World\n\x00\x00&#8242;<br />
<font color="red">&gt;&gt;&gt;</font> tr.readMemory(134518052L,14)<br />
&#8216;h4k3d World\n\x00\x00&#8242;<br />
<font color="red">&gt;&gt;&gt;</font> tr.detach()                        <em><strong>&lt;- NOTE: Step away very quitely</strong></em></p>
<p><font color="red">&gt;&gt;&gt;</font><br />
<font color="red">bt</font> <font color="blue">dev</font> #</p></blockquote>
<p>Did you wake it?  No??&#8230;Good.  Now just sit back and wait for it.  It will wake up on its own.  You actually have to wait the full amount of time.  The method I used above blocks the process from running once VTrace attaches to the process.  I believe that it can be done without blocking but that is for another time.  Ohhhhh, here is the return value.  I&#8217;ll include a few of previous lines that I have already shown so you can remember where we were at.</p>
<blockquote><p><font color="red">bt</font> <font color="blue">hello_sleep</font> # make<br />
cc -c hello_sleep.c<br />
cc hello_sleep.o -o hello_sleep.exe<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ls<br />
Makefile  hello_sleep.c  hello_sleep.exe*  hello_sleep.o  hello_sleep.s<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ./hello_sleep.exe<br />
Hello World<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> # ./hello_sleep.exe<br />
h4k3d World<br />
<font color="red">bt</font> <font color="blue">hello_sleep</font> #</p></blockquote>
<p>Sweet!!!</p>
<p>Go forth and do good things,</p>
<p>Don C. Weber</p>
<span class="ttag"><img src="http://www.cutawaysecurity.com/blog/wp-content/plugins/technobubble.gif" alt="Technorati Tags" /> <a href="http://www.technorati.com/tag/@" rel="tag">@</a>, <a href="http://www.technorati.com/tag/atlas" rel="tag">atlas</a>, <a href="http://www.technorati.com/tag/libdisassemble" rel="tag">libdisassemble</a>, <a href="http://www.technorati.com/tag/disass-3" rel="tag">disass-3</a>, <a href="http://www.technorati.com/tag/python" rel="tag">python</a>, <a href="http://www.technorati.com/tag/c" rel="tag">c</a>, <a href="http://www.technorati.com/tag/programming" rel="tag">programming</a>, <a href="http://www.technorati.com/tag/memory" rel="tag">memory</a>, <a href="http://www.technorati.com/tag/Security+Ripcord" rel="tag">Security Ripcord</a>, <a href="http://www.technorati.com/tag/Hello+World" rel="tag">Hello World</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/239/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Considerations for an Information Assurance Laboratory</title>
		<link>http://www.cutawaysecurity.com/blog/archives/192</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/192#comments</comments>
		<pubDate>Fri, 21 Sep 2007 12:44:35 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Patch Management]]></category>
		<category><![CDATA[Penetration Testing]]></category>
		<category><![CDATA[SANS]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/archives/192</guid>
		<description><![CDATA[I find it interesting what professors will say and do when it comes to providing an educational experience to their students.  On one hand I can understand that the professor is trying to discover the best way possible to quickly train their students about a specific topic.  On the other hand I am [...]]]></description>
			<content:encoded><![CDATA[<p>I find it interesting what professors will say and do when it comes to providing an educational experience to their students.  On one hand I can understand that the professor is trying to discover the best way possible to quickly train their students about a specific topic.  On the other hand I am concerned about the, at times, lack of intelligent thought process on how it is going to affect other students, faculty and staff that also use and maintain the same resources and network environment.  </p>
<p>One of these situations arose in my organization the other day.  A college is in the processes of providing computer security courses that will train the students in subjects such as risk assessment, programming, networking, and defensive and offensive tactics (to name a few).  Because it is a new program the college faculty and staff are still gathering resources, deploying them in labs, and creating the teaching platforms.  All of this while the courses are being taught.  </p>
<p>When the college decided to start providing the students with this type of course work they did approach the university&#8217;s networking team to let them know what was happening.  After a few meetings it was determined that it was necessary to operate any labs that would be doing offensive tactics from a lab that was completely isolated from the university network as well as the Internet.  Although very good in theory, completely isolating a network in this manner really brings forward some interesting problems.  Problems that require a lot of planning, coordination, work and money.</p>
<p>The following is a list of a few things that should be taken into consideration as you are developing security courseware.</p>
<p>1.  Because of the types of network and other computer activities associated with information security the details on any lab deployments must be handled just like any other system development and bringing together all of the people and organizations involved and follow a life cycle.  By doing this you will determine issues and identify problem areas in the design phase and before classes start.  As with any system design, it is much harder to change or address issues during production.  The whole &#8220;fixing the plane while it is flying&#8221; issue.</p>
<p>2.  Labs that will be conducting offensive operations or monitoring must be completely isolated from the school&#8217;s network and the Internet.  There are many reasons for this.</p>
<ul>
<li>Network traffic will contain plain text personal information related to other students, faculty, and staff.  I used the gmail attack tools developed by <a href="http://www.erratasec.com/">Robert Graham</a> and <a href="http://blogs.zdnet.com/Ou/?p=651">presented at DefCon 15</a> as an example to drive this point home.</li>
<li>Student attack tool activities are hard to distinguish from malicious attack tool activities.  Many tools are designed this way to avoid network and other protections.</li>
<li>Being convicted, or even just accused, of hacking a resource without permission could ruin the career of the student and any teachers involved with the incident.  Each student is trying to learn and grow.  The majority of them are youths who want to test their boundaries and skill levels.  Sometimes the temptation is just too much, not to mention the potential for improper configuration, and they might scan or attempt to exploit a vulnerability.  The school administrators and teachers must help protect their students from this.</li>
<li>The reputation of a school is involved.  If the school&#8217;s students and professors are accused of attempting to hack computers connected to the Internet then the school is going to see a serious reduction in the amount of students attending the security courses and the rest of the school&#8217;s curriculum.</li>
</ul>
<p>3.  When you are building your labs be sure to take into considerations that students operating on an isolated network are still going to need access to the Internet.  They will need this to obtain tools, read manuals and howtos, and interact with their Facebook/MySpace accounts.  Although having a few computers off to one side is a good quick fix, it is not the optimal situation and you will be reading complaints about this in the class evaluations.  Perhaps a better solution is to have dual input monitors that can be quickly switched back and forth by the students. Each system should have different backgrounds or operating systems so that the students are aware which system they are using.  Considering thin clients is also a viable solution and would prevent network cables from being swapped around.</p>
<p>4.  Create separate networks for security classes and regular classes.  Nothing is more frustrating for a student or a teacher to come to a lab they have been working on most of the semester only to find that somebody has modified its configuration or hacked their resources.  This is detrimental to the learning experience and will lead to finger pointing and bad blood.</p>
<p>5.  Create update serves that can be a repository for OS and application patches.  With properly document procedures these servers can be kept on the campus&#8217; main network in order to retrieve updates via the Internet and then reconfigured to provide service to the isolated network.  Updating in this manner is a great learning experience for the students and will prepare them better for real world experiences.</p>
<p>6.  Start a tool repository to version control tools.  Many tools change rapidly and also disappear.  Maintaining this repository is a good way to show students product evolution.  It is also a good way to monitor these for malicious activity.  This helps keep developers honest.  Let&#8217;s face it, eventually some tool will be updated with malicious intent.  It is only a matter of time, and think of the publicity your school will get if you are the first to identify it.</p>
<p>7.  Network isolation is a common practice in the security research field.  <a href="http://www.counterhack.net/">Ed Skoudis</a> developed his <a href="http://www.sans.org/training/description.php?mid=40&#038;utm_content=affiliate_link1&#038;utm_campaign=Cutaway_Security">SANS GCIH</a> class to be an isolated environment.    The <a href="https://www.sans.org/ns2007/whitewolf.php&#038;utm_content=affiliate_link1&#038;utm_campaign=Cutaway_Security">SANS Integrated Cyber Exercise (ICE)</a> is conducted in an isolated environment.  And the RootWars at <a href="http://www.learnsecurityonline.com/">Learn Security Online</a> are conducted in an isolated environment.  It can be done but it requires planning.</p>
<p>8.  Finally, listen to and leverage the experience of the information security professionals within your organization.  Teaching security courseware is one thing, but working as a security professional is completely different.  There are different goals and different mindsets.  If the information security professionals within your organization are good they will get you what you need while also maintaining an acceptable level of security for the entire organization.</p>
<p>Remember, you are training the future information security professionals of the world.  You should show them that security is necessary as well as implementable.  Circumventing a schools security and infrastructure policies and procedures just to provide additional or &#8220;real world training&#8221; to the students is not setting a good example.  It is, in fact, sending the wrong message.</p>
<p>If you have any additional concerns or recommendations, please leave a comment sot that others can take it into consideration.</p>
<p>Go forth and do good things,<br />
Cutaway</p>
<span class="ttag"><img src="http://www.cutawaysecurity.com/blog/wp-content/plugins/technobubble.gif" alt="Technorati Tags" /> <a href="http://www.technorati.com/tag/education" rel="tag">education</a>, <a href="http://www.technorati.com/tag/SANS" rel="tag">SANS</a>, <a href="http://www.technorati.com/tag/GCIH" rel="tag">GCIH</a>, <a href="http://www.technorati.com/tag/Integrated+Cyber+Exercise" rel="tag">Integrated Cyber Exercise</a>, <a href="http://www.technorati.com/tag/security+labs" rel="tag">security labs</a>, <a href="http://www.technorati.com/tag/Ed+Skoudis" rel="tag">Ed Skoudis</a>, <a href="http://www.technorati.com/tag/Robert+Graham" rel="tag">Robert Graham</a>, <a href="http://www.technorati.com/tag/Security+Ripcord" rel="tag">Security Ripcord</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/192/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ethics, In Podcasts and Blogs</title>
		<link>http://www.cutawaysecurity.com/blog/archives/25</link>
		<comments>http://www.cutawaysecurity.com/blog/archives/25#comments</comments>
		<pubDate>Wed, 26 Apr 2006 05:55:17 +0000</pubDate>
		<dc:creator>cutaway</dc:creator>
				<category><![CDATA[Ethics]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[PDC]]></category>

		<guid isPermaLink="false">http://www.cutawaysecurity.com/blog/archives/25</guid>
		<description><![CDATA[Ethics is an important issue and it has been bouncing around the blogs and podcasts lately.  Here is my take on it.]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">There has been a lot of talk about <a title="Ethics" href="http://en.wikipedia.org/wiki/Ethics">Ethics </a>lately in several Podcasts and blogs.  Paul, <a title="haxorthematrix" href="http://www.haxorthematrix.com/">Larry</a>, and &#8220;<a title="Ah, Twitchy" href="http://www.drspock.com/faq/0,1511,1927,00.html">Twitchy</a>&#8221; have really pushed it to the forefront in their show <a title="Dring Beer" href="http://www.pauldotcom.com/security_weekly/">Security Weekly</a> where they have addressed <a title="Special Edition - Open Show" href="http://www.pauldotcom.com/2006/04/pauldotcom_security_weekly_spe_6.html">Wireless Piggybacking</a> (Special Edition &#8211; Open Show) and teachers assigning social engineering projects for their students (<a title="Drink more beer" href="http://www.pauldotcom.com/2006/04/pauldotcom_security_weekly_epi_25.html">Episode 24</a>).  <a title="Your Security Catalyst" href="http://www.securitycatalyst.com/">Michael Santarcangelo</a> has just talked to <a title="Perl Master" href="http://www.stonehenge.com/index.html">Randal L. Schwartz</a> on his show The Security Catalyst (<a title="Great show!" href="http://www.securitycatalyst.com/?p=110">Episode 26</a>) about his experience with the law and how it has affected his life.  Mark Russinovich has informed us of his <a title="Just pay the man!" href="http://www.sysinternals.com/blog/2006/04/why-winternals-sued-best-buy.html">company&#8217;s dealings with Best Buy</a> and how they handle licensed software.  <a title="Career Opportunities" href="http://welchwrite.com/dewelch/">Douglas E. Welch</a>, of Career Opportunities, recently talked about being truthful and straight forward in the work place and life (<a title="I will not tell a lie" href="http://welchwrite.com/dewelch/ce/2006/04/say-what-you-mean-and-mean-what-you.asp">April 21 edition</a>).  And, as a member of the <a title="SANS" href="http://www.sans.org">SANS </a>Advisory Board and Ethics Council, I have been exposed to several situations regarding ethics.</p>
<p class="MsoNormal">
<p class="MsoNormal">The point that I have really taken from these recent experiences is that ethics can be hard.  Sure the right choice is usually easy to make.  For instance, I currently work for a company that requires every employee to have a security clearance.  Three weeks ago, when I was walking through one of the conference rooms, I noticed 51 cents on a table.  It must have been forgotten by some unknown individual after removing it from his or her pocket to grab a business card or something.  Today, as I walked through the same conference room, I noticed the same 51 cents pushed to the back of the table but still visible to everybody entering or leaving the conference room.  I started thinking about what we could contribute this to as I walked away.  Could it be the fact that we have a bunch of honest employees who are paid well and do not need 51 cents?  Could it be that most of them are afraid that this might be a setup by security and pocketing the 51 cents could mean their job?  Could it mean that &#8220;Twitchy&#8221; hasn&#8217;t walked through the room, or maybe he did but somebody yelled out &#8220;<a title="Okay, this is just weird" href="http://www.popcorn.org/index.cfm">Popcorn</a>?&#8221;  Or could it be that deep down inside people believed that it was not ethical to take the 51 cents because the owner might come back for it one day?</p>
<p class="MsoNormal">
<p class="MsoNormal">Actually, I think that it is a little bit of everything.  Despite what we see on the news everyday I like to think that most people are honest and good (everybody says this but it is true).  Despite how we all tend to trust people to be honest I think that there are people out there who just don&#8217;t care.  And I also think that there are people out there who like to walk the line stepping one way or the other when it suits them best.  And lastly I like to think that there are people out there who are honest and good but who like to challenge the system in an attempt to keep the norm from controlling every situation and ensuring that the boundaries of everyday life do not impose themselves on them.  It is this last bunch of individuals that are really addressing the hard ethics questions, or, at least, bringing them to the forefront for all to ponder.</p>
<p class="MsoNormal">
<p class="MsoNormal">Is port scanning the Internet okay?  Is vulnerability scanning the Internet okay?  Is piggybacking an unencrypted wireless connection okay?  Is packet sniffing the college dormitories network after crawling through the ceiling tiles to get to the switch closet because the door was locked and they should have thought of the ceiling tiles if they wanted to secure the closet okay?  The answers to these questions are yes, no, and maybe.  Not in that order and of course, the answers are different to everybody.  The point is that people are going to push the limits a little bit to determine what is socially acceptable and what is not.  Generally these are kids who are exploring their boundaries and we can usually chalk it up to inexperience.  It is when these individuals are adults, with a more defined understanding of right and wrong, that we need to be more careful or, if you will, distrusting.</p>
<p class="MsoNormal">
<p class="MsoNormal">I am starting to see how important it is for people to be flexible in their thinking and yet setting the example in their actions.  Defining policy is the most effective way to inform people of where the boundaries lay.  Publishing these policies and having open discussions about them are the only way that these policies are going to grow and change with the times.  Holding people accountable for blatant violations of policy is a must to set the example of unacceptable behavior.  But compassion, understanding, and trust in human nature to not intentionally harm other people and things has to be remembered and considered during any decision making.</p>
<p class="MsoNormal">
<p class="MsoNormal">I would like to thank all of the people mentioned here for the wonderful insights and opinions.  I ask them all to stay true to themselves and to keep pushing society through their actions.  And I ask all of you to get permission before you do any port or vulnerability scanning and (cough &#8211; cough) wireless piggybacking.  And please do not climb in the ceiling, it may be ethically questionable but it is definately dangerous.</p>
<p class="MsoNormal">Cutaway</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cutawaysecurity.com/blog/archives/25/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
