Sunday, January 26, 2014

LiveCD Boot, HDD Wipe, and Reseting CMOS RAM Memory

My dad had an old computer he kept from a prior job .  It's a J7F2 custom made computer for embedded engineering applications.  The CPU is a 1.5GHz VIA C7-series x86-instruction set 90nm chip designed by Centaur Technology and sold by VIA Technologies.  You can check out the specs some more if you're interested; it does have some enhanced encryption acceleration hardware which would make it ideal to encrypt HDD's or USB's with important information.

Here's a couple pictures of the inside of the computer:


Well, some of my family members (I'm sure some of you out there can relate), no matter how much you lock down a computer, somehow, someway they will get a nasty virus on the computer.  This particular nasty has disabled a lot of USB ports (thankfully not all) and within the Windows XP OS I couldn't even see the Device Manager in the Control Panel.  Programs would crash randomly too and there still may be some nastiness lurking somewhere in RAM (a scan mentioned an error at address 00010dbd010) or even still in the HDD (hard disk drive) since there are ~3.5GB unaccounted for after wiping.  I will update this post if I find more infections.

So, my dad asked me to get this computer back to somewhat normal operation.  The god-send here?--Live USB sticks.  If you have never played with any of these neat software hacks, you should.  Used with malice, of course you can do many bad things, like reset passwords on BIOS and OS-logon, encrypt a HDD and throw-away the key rendering it a worthless mess, etc.  But you can also attempt recovering from viral infections, even if they write over the entire HDD, you can boot up in RAM via a USB stick.  In my case, I still had functioning ports and a BIOS so I had a minimally invasive way in.  What's weird though, is I was only able to boot on the backside, bottom USB port.

So that's the background, now for an easy to follow tutorial.  You need an internet connection for some downloads.

1)  On a Windows or Apple machine (if you're already on a Linux/Unix machine here then you don't need to read this most likely); download an ISO burner, most likely your computer has one already, but there are others.  BurnCDCC is one, google to find/try whichever one you want.  There's a list of LiveCD's, go there and there's plenty to choose from and try.  Now depending on your PC, you can opt for a CD or a USB stick, choice is yours.  The one we're going to use for this tutorial is the Ultimate Boot CD.  Download it, and burn it onto the disk or USB stick.  You shouldn't have any problems with having to open the file and putting the inside ISO file onto the disk, it should just work.  Use the comments sections if you have problems here (or for any questions, for that matter).

2)  Now, more likely than not, your computer BIOS is set to boot up the HDD before other devices.  You need to change that.  So, your mileage may vary, as far as what version/type of BIOS you have, but they're pretty similar.  When you initially power on the computer, you'll see buttons to push for BIOS settings.  You have to push whatever they are quickly before it boots up the HDD with the virus.  My BIOS version is AwardBIOS, by Phoenix, V6.00PG.  I have to push the <DEL> button to get into more settings.  Go to Advanced BIOS Features.  Make sure the 1st, 2nd, and 3rd boot devices are USB (or CDROM).  Ok, and another trick I found out after while was to go into the Integrated Peripherals section and then to OnChip Device Function.  Within there make sure USB Host Controller, USB 2.0 Support, and USB Device Legacy Support are all enabled.

This should be the screen before you get into BIOS settings:

3)  Now this should be enough to get working.  You power down, put in the USB stick, then power up.  You'll likely go to BIOS screen first or it'll boot up the LiveCD/USB.  However, in my little learning experience, after I messed around with some of the jumpers on the motherboard, because I saw "USB-Enable/Disable" and thought that it was causing the other USB ports to fail.  Well, it turned out to be for Power on USB, as in not using the power from the power supply.  And I also messed with the "Reset CMOS" jumpers too; and was only getting the most annoying non-stop beeping from the speaker on the motherboard.  Looking up the beep codes (since this is a kind of old, not very common PC, it took me a little), long beeps in an endless loop meant "No DRAM installed/detected".  That didn't make sense since I had 512MB or DDRII plugged in the appropriate place.  It was because I messed with the CMOS jumpers.  Luckily I found how to properly reset them.  On the first website I linked above, at the bottom are a lot of document downloads, the Manual 5.0 zip file is what you want to look at if you have this computer.

4)  So, to reset the CMOS RAM memory, a battery must be used to retain the motherboard configuration.  Default is leaving JBAT 1-2 pins shorted to store CMOS data.
Turn off computer and unplug AC power.  Remove ATX power cable from its connector.  Locate JBAT and short pins 2-3 for a few seconds.  Return JBAT pins to default setting of shorting pins 1-2.  Re-connect ATX power cable to its connector.--And that's it.  Pretty simple, eh?  After doing this and then resetting the BIOS settings again, I got the single beep on start up which means no error during POST (Power On Self Test).  The BIOS runs an auto diagnostic test called POST for all necessary hardware, detects all available devices, and configures parameters of the hardware syncronization during that time.

5)   Now this should be the screen you get when you get the Ultimate Boot CD up and running:
From here there are *a lot* of tools you can choose to run.  To finish the tutorial, go to the HDD option.  Next choose Disk Wiping option.  Again, you have choices, I chose to use "Darik's Boot and Nuke 2.2.8".  It's pretty easy and intuitive, and you can choose just how hard you want to wipe the HDD.  I chose the DoD 5220.22-M method, and opted for 4 rounds, so medium security.  It took all night (around 10-15 hours, forget precise time) to complete.  Also MAKE SURE YOU SELECT ONLY THE HARDDRIVE AND NOT THE USB STICK TO WIPE because it will wipe that as well and I'm not sure what will happen; unless you want to try don't do it.

And that's it.  Be sure to try out the other tools on the LiveUSB.  PartedMagic is a GUI Linux OS that has a lot more tools on it; mostly to partition up a HDD and maybe encrypt it with Truecrypt.  Have fun and ask if you have trouble.

No comments: