<?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>born2c0de's Blog &#187; Do It Yourself</title>
	<atom:link href="http://www.sanchitkarve.com/blog/category/do-it-yourself/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sanchitkarve.com/blog</link>
	<description>Demystifying Code Internals, Secrets and more…</description>
	<lastBuildDate>Sat, 07 Aug 2010 16:49:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Removing Viruses From Thumb Drives</title>
		<link>http://www.sanchitkarve.com/blog/2009/02/removing-viruses-from-thumb-drives/</link>
		<comments>http://www.sanchitkarve.com/blog/2009/02/removing-viruses-from-thumb-drives/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 19:07:41 +0000</pubDate>
		<dc:creator>born2c0de</dc:creator>
				<category><![CDATA[Do It Yourself]]></category>
		<category><![CDATA[attrib]]></category>
		<category><![CDATA[pen drive virus]]></category>
		<category><![CDATA[thumb drive]]></category>
		<category><![CDATA[usb drive]]></category>
		<category><![CDATA[virus removal]]></category>
		<category><![CDATA[windows vista]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://www.sanchitkarve.com/blog/?p=107</guid>
		<description><![CDATA[You&#8217;ve probably come across Thumb Drive Viruses when you connect your thumb drive to a computer at work or at school. These viruses copy themselves onto a thumb drive as soon as it is connected to an infected computer and the second they&#8217;re connected to any other computer, the virus spreads on that machine as [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve probably come across Thumb Drive Viruses when you connect your thumb drive to a computer at work or at school.</p>
<p>These viruses copy themselves onto a thumb drive as soon as it is connected to an infected computer and the second they&#8217;re connected to any other computer, the virus spreads on that machine as well.</p>
<p>Since you may not be able to remove the virus from the infected computer (due to insufficient admin privileges, etc.), you can ensure that the virus on the thumb drive does not spread on another machine.</p>
<p>Suppose you&#8217;re not sure if your thumb drive is infected or not and wish to connect it to your computer without taking the risk of infecting it. To ensure that the virus does not start, <strong>Hold Shift and insert the thumb drive into the USB Port</strong>. This will prevent the AutoPlay function from being executed from the thumb drive, and hence does not start the virus when the thumb drive is inserted.</p>
<p>Now that you&#8217;ve connected your thumb drive, it&#8217;s time to check if it has a virus or not. Most Thumb drive viruses can be detected by using these 2 techniques:</p>
<p><strong>1) Check Drive Icon:</strong></p>
<p>Although the virus is an exe file, it uses the directory icon to fool users into clicking it.&#160; Though not all viruses do this, it&#8217;s still worthwhile to check if the icons have been changed.</p>
<p>This what an uninfected thumb-drive looks like:</p>
<p><img class="alignnone size-full wp-image-113" title="not_infected" alt="not_infected" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/not_infected.png" width="799" height="596" /></p>
<p>An infected thumb-drive looks like this:</p>
<p><img class="alignnone size-full wp-image-112" title="infected" alt="infected" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/infected.png" width="799" height="596" /></p>
<p>Now, if you want to access the files in this pen-drive, <strong>DO NOT DOUBLE-CLICK THE THUMB-DRIVE ICON</strong> as it starts AutoPlay and will execute the virus program.</p>
<p><img class="alignnone size-full wp-image-109" title="donts" alt="donts" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/donts.png" width="799" height="596" /></p>
<p>Instead, right-click the icon and choose Explore OR click the Folders icon on the menu bar and select the thumb drive from the left pane as shown below:</p>
<p><img class="alignnone size-full wp-image-111" title="dos2" alt="dos2" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/dos2.png" width="794" height="597" /></p>
<p><img class="alignnone size-full wp-image-110" title="dos1" alt="dos1" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/dos1.png" width="795" height="598" /></p>
<p>Now it&#8217;s time to find the viruses and remove them. If you look at your directory contents it will look like this:</p>
<p><img class="alignnone size-full wp-image-116" title="virus_before" alt="virus_before" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/virus_before.png" width="800" height="600" /></p>
<p>You won&#8217;t see any viruses as they are hidden. What&#8217;s worse, since they are also marked as system files some anti-virus programs ignore virus scans on such files. This is the time to use the second technique.</p>
<p><strong>2) The ATTRIB Test</strong></p>
<p>Click Start-&gt;Run and type <strong>cmd</strong> and press Enter. Once you see the command prompt, type <strong>[USBDriveLetter]:</strong> and press Enter i.e. <strong>E:</strong> in this example.</p>
<p>Now type <strong>attrib</strong> and press Enter. The output should look like this:</p>
<p><img class="alignnone size-full wp-image-117" title="virus_check" alt="virus_check" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/virus_check.png" width="669" height="338" /></p>
<p>You&#8217;ll notice a few files with the <strong>SHR</strong> File attributes in this window. One of these files will be autorun.inf, which instructs the OS which applications to run when the thumb drive is inserted. The other files will be .exe, .vbs or .pif files and are usually the viruses that you are looking for.</p>
<p>To remove all file attributes type this command: <strong>attrib -s -h -r &lt;filename.extension&gt;</strong></p>
<p>After you type this command for all the filenames set with SHR file attributes, type <strong>attrib</strong> again and observe the result:</p>
<p><img class="alignnone size-full wp-image-108" title="after_attrib" alt="after_attrib" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/after_attrib.png" width="669" height="338" /></p>
<p>Cool, now open Windows Explorer and you&#8217;ll notice that the viruses are now visible.</p>
<p><img class="alignnone size-full wp-image-115" title="virus_after" alt="virus_after" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/virus_after.png" width="800" height="600" /></p>
<p>The next part is simple, choose all the viruses and delete them. You should also delete the autorun.inf file unless your thumb drive is made by SanDisk (SanDisk thumb drives depend on autorun.inf to start its own utility programs). If your thumb drive is manufactured by SanDisk, open the autorun.inf file and simply remove all lines that contain the virus filenames.</p>
<p>That&#8217;s all. Your Thumb Drive is no longer infected.</p>
<p>There&#8217;s something you should take care of though. Many Thumb Drive viruses make copies of itself in every directory on the thumb drive. If that&#8217;s the case then you will have to perform the above steps for each folder or use <strong>attrib -s -h -r /s *.*</strong> to unset SHR attributes of all files in your thumb drive. You can then delete them individually.</p>
<p>To play safe, instead of relying on pressing Shift every time you insert your thumb drive, it is wiser to disable autorun for all removal drives so that Autorun.inf is never executed when your thumb-drive is inserted.</p>
<p>To do that in Windows XP, download a powertoy called <a title="TweakUI Download" href="http://www.microsoft.com/windowsxp/Downloads/powertoys/Xppowertoys.mspx" target="_blank">TweakUI</a> and disable autoplay for all removable devices as shown below:</p>
<p><img class="alignnone size-full wp-image-114" title="tweakui" alt="tweakui" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/02/tweakui.png" width="521" height="422" /></p>
<p>Once that is done, you no longer have to press Shift to disable autorun every time you connect your thumb drive.</p>
<p>However, you will still need to use the <strong>attrib</strong> command to unset file attributes and delete the files manually.</p>
<p>You can also use <a title="Ninja Pendisk" href="http://nunobrito.eu/ninja/" target="_blank">Ninja PenDisk</a> to do the same thing automatically but I suggest doing this on your own as Ninja Pendisk may not be able to detect and remove all viruses.</p>
<p><strong>UPDATE:</strong></p>
<p>Some “USB-Viruses” hide all directories on your thumb drive and replace them with exe files (i.e. the virus) having the same name.</p>
<p>In that case, change your attrib command to this:</p>
<p><strong>attrib –s –h –r /s /d *.*</strong></p>
<p>This will make all the hidden directories visible again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanchitkarve.com/blog/2009/02/removing-viruses-from-thumb-drives/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fixing a CD in 3 easy steps</title>
		<link>http://www.sanchitkarve.com/blog/2009/01/fixing-a-cd-in-3-easy-steps/</link>
		<comments>http://www.sanchitkarve.com/blog/2009/01/fixing-a-cd-in-3-easy-steps/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 10:26:53 +0000</pubDate>
		<dc:creator>born2c0de</dc:creator>
				<category><![CDATA[Do It Yourself]]></category>
		<category><![CDATA[fixing a cd]]></category>

		<guid isPermaLink="false">http://www.sanchitkarve.com/blog/?p=51</guid>
		<description><![CDATA[A friend gave me his CD which had broken into two pieces and asked if I could fix it. Looking at it I knew there was no way I could recover all the files correctly, but there was a possibility that some files could be recovered. So I took up the challenge. The first thing [...]]]></description>
			<content:encoded><![CDATA[<p>A friend gave me his CD which had broken into two pieces and asked if I could fix it.</p>
<p><img class="alignnone size-full wp-image-52" title="cd_before" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/cd_before.jpg" alt="cd_before" width="640" height="480" /></p>
<p>Looking at it I knew there was no way I could recover all the files correctly, but there was a possibility that some files could be recovered. So I took up the challenge.</p>
<p>The first thing that I wanted to do was to attach the CD using Pidilite&#8217;s FeviQuick but I didn&#8217;t have any so I used FeviCol instead to attach the two pieces together.</p>
<p><img class="alignnone size-full wp-image-53" title="step1" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/step1.jpg" alt="step1" width="640" height="480" /></p>
<p>There were way too many scratches and the portion near the crack had vanished so I wasn&#8217;t too optimistic about the result. But I had way too much time on my hands so I thought I&#8217;d go all the way just to see what happens.</p>
<p>After an hour or two, the glue had hardened but the CD would still bend when lifted. I then used cellotape to ensure that the CD remained in one piece.</p>
<p><img class="alignnone size-full wp-image-54" title="step2" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/step2.jpg" alt="step2" width="640" height="480" /></p>
<p>After the cellotape fix, I realized that I had spilt some of the Fevicol on the CD layer.</p>
<p><img class="alignnone size-full wp-image-55" title="step3_before" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/step3_before.jpg" alt="step3_before" width="640" height="480" /></p>
<p>I used a combination of cologne and my mom&#8217;s nail polish remover to remove the glue and it even managed to remove a few scratches.</p>
<p><img class="alignnone size-full wp-image-56" title="step3_after" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/step3_after.jpg" alt="step3_after" width="640" height="480" /></p>
<p>That&#8217;s it. The CD was firm, relatively clean and seemed ready for the Acid Test  so I inserted it in my laptop&#8217;s CD drive.</p>
<p><img class="alignnone size-full wp-image-57" title="step4" src="http://www.sanchitkarve.com/blog/wp-content/uploads/2009/01/step4.jpg" alt="step4" width="640" height="480" /></p>
<p>Obviously with the amount of damage the disc had taken there was no way Windows would even detect it as a CD.</p>
<p>I used some of the free tools from <a title="Google it" href="http://www.google.com/search?hl=en&amp;client=opera&amp;rls=en&amp;hs=4gn&amp;q=free+CD+Recovery&amp;btnG=Search" target="_blank">here</a> and I managed to recover a few text files, pictures and portions of a video.</p>
<p>You&#8217;ll probably have more luck with your recovery process if your CDs are in better condition. <img src='http://www.sanchitkarve.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sanchitkarve.com/blog/2009/01/fixing-a-cd-in-3-easy-steps/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
