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

<channel>
	<title>Darknet - The Darkside &#187; DOSBox</title>
	<atom:link href="http://www.darknet.org.uk/tag/dosbox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darknet.org.uk</link>
	<description>Ethical Hacking, Penetration Testing &#38; Computer Security</description>
	<lastBuildDate>Tue, 07 Feb 2012 18:34:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>the Art of Virology 02h</title>
		<link>http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/</link>
		<comments>http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 19:35:02 +0000</pubDate>
		<dc:creator>backbone</dc:creator>
				<category><![CDATA[Virology]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[backbone]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[darknet]]></category>
		<category><![CDATA[DOSBox]]></category>
		<category><![CDATA[infant-a]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[source-code]]></category>
		<category><![CDATA[virus]]></category>

		<guid isPermaLink="false">http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/</guid>
		<description><![CDATA[This is the one and only (and first article) which will present you the source code of a virus on Darknet, and a lame one too :) Theory again&#8230; First should mention a couple of things which haven&#8217;t been specified till now. This virus is going to be an appending virus: An appending virus is [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p>This is the one and only (and first article) which will present you the source code of a virus on Darknet, and a lame one too :)</p>
<p><strong>Theory again&#8230;</strong></p>
<p>First should mention a couple of things which haven&#8217;t been specified till now. This virus is going to be an appending virus:</p>
<blockquote><p>
An appending virus is a virus that writes all of his code to the end of the file, after which it writes a simple jump to the code at the start of the file
</p></blockquote>
<p>I will use this method, for first in the virus i&#8217;ll present here, maybe later I will adopt another technique as EPO:</p>
<blockquote><p>
Entry Point Obscuring is a method which inserts the entry point of the virus somewhere in the host file, where it can do an interception of the code for later replication, but not at the start.
</p></blockquote>
<p>&#8230;but definitely not overwriting viruses:</p>
<blockquote><p>
An overwriting virus has a simple routine to overwrite the host file, thus being easily detected because of the fact that infected files in 99% of cases won&#8217;t run anymore
</p></blockquote>
<p><strong>Back to reality</strong></p>
<p>So my first virus is called infant-a, because it only does a single thing (like an infant); also it is a DOS COM infecter, so you won&#8217;t have much trouble with it. What to say more, the source if fully commented, and if you have read the book I have suggested you in the 00h article than you won&#8217;t have any problems in understanding it.It is not detected by Avira anti virus, check it with other anti viruses and tell me if it found and under which name, oh yeah Kaspersky doesn&#8217;t find it either. </p>
<p><strong><em>BTW: don&#8217;t compile and infect other files (computers) with it because I will look lame not you</em></strong></p>
<p>The brilliant (and simple code) follows: <a href="http://www.darknet.org.uk/content/files/infant-a.asm"> infant-a</a></p>
<p><strong>How to play with it?</strong></p>
<p>Everything goes in 3 steps, or 2 depends on you&#8230;</p>
<p><strong>1st step &#8211; dummy com files</strong></p>
<p>Enter in DOS mode (run cmd from Windows run) and write the following lines:</p>
<pre><code>
C:\ &gt;debug
-a100
xxxx:0100 mov  ax,4c00
xxxx:0103 int    21h
xxxx:0105 ^C
// this is a comment ^C means CTRL+C :)
-rcx
CX 0000
:5
-n dummy.com
-w
Writing 00005 bytes
-q
C:\&gt;copy dummy.com uninfectedFile.com
</code></pre>
<p><strong>2nd step &#8211; compile the virus</strong></p>
<p>For this one you need TASM &amp; TLINK, google to get them; if you have them enter the following lines supposing infant-a.asm is the virus:</p>
<pre><code>
C:\ &gt;tasm infant-a.asm
C:\ &gt;tlink /t infant-a.obj
//comment: /t tells tlink to make it a dos image file = com file
</code></pre>
<p><strong>3rd step &#8211; optional</strong></p>
<p>Download <a href="http://dosbox.sourceforge.net/">DOSBox</a>, install it and use the following commands (after starting DOSBox):</p>
<pre><code>
Z:\ &gt;mount C:\ Folder\ Where\ The\ Virus\ And\ Dummy\ COM\ Files\ Are\ Located c:
//comment: c with : (c:) or without I don't remember exactly
Z:\ &gt;C:
C:\ &gt;
//comment: and now your C drive (in DOSBox) is C:\ Folder\ Where\ The\ Virus\ And\ Dummy\ COM\ FIles\ Are\ Located
</code></pre>
<p><strong>Let&#8217;s play</strong></p>
<p>And now you can start the virus and see how it infects one file per run, the dummy COM files should have 6 bytes length, and after infection 161, you can&#8217;t miss them&#8230;</p>
<p><strong>Are we done already?</strong></p>
<p></p>
<p>Well 02h is over, but 03h is there waiting to be written; whats next? infant-b of course which will have:</p>
<ul>
<li>An encryption method (XOR)</li>
<li>A traversal infection (dotdot [..] method)</li>
<li>More infections per run</li>
<li>Stealth?</li>
</ul>
<p>Till then have fun with infant-a, and see you as soon as possible (if anybody reads this series). </p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=the+Art+of+Virology+02h+http%3A%2F%2Fdarknet.org.uk%2F%3Fp%3D421+from+%40THEdarknet" title="Post to Twitter"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a class="tt" href="http://www.facebook.com/share.php?u=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;t=the+Art+of+Virology+02h" title="Post to Facebook"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a class="tt" href="http://www.google.com/buzz/post?url=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-micro3.png" alt="Post to Google Buzz" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;title=the+Art+of+Virology+02h" title="Post to Delicious"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious-micro3.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;title=the+Art+of+Virology+02h" title="Post to Digg"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-micro3.png" alt="Post to Digg" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;title=the+Art+of+Virology+02h" title="Post to Reddit"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-micro3.png" alt="Post to Reddit" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/&amp;title=the+Art+of+Virology+02h" title="Post to StumbleUpon"><img class="nothumb" src="http://www.darknet.org.uk/wp-content/plugins/tweet-this/icons/en/su/tt-su-micro3.png" alt="Post to StumbleUpon" /></a></p></div><div class="AWD_like_button "><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.darknet.org.uk%2F2006%2F12%2Fthe-art-of-virology-02h%2F&amp;send=false&amp;layout=standard&amp;width=&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=arial&amp;height=40" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:40px;" allowTransparency="true"></iframe></div>]]></content:encoded>
			<wfw:commentRss>http://www.darknet.org.uk/2006/12/the-art-of-virology-02h/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

