The "Red Pill" of Virtualization – Detect if your program is running in a Virtual Machine

A film not too long ago ignited a whole new generation of armchair epistemologists with it’s plot proposing that our minds may be living inside an virtual simulation (or matrix if you will), while our physical bodies are being used as batteries. Those familiar with philosophy will be all too familiar with this question posed since Descartes. In the Virtualization world, we have the converse: What if, unbeknownst to us, our computers were really running inside other computers for the selfish self-interest a special group of people? Such a setup has been in use for a very long time in the form of a Virtual Machines/Virtualization which basically fools an operating system into thinking it’s running on its own hardware.

 

Well here’s the script to detect if your application is running on VMWare or Virtual PC courtesy of Elias (aka lallous) from The Code Project.

*Intro adapted from arstechnica VMWare Vs. VPC.

Advertisements

October 27, 2006 at 6:26 am 2 comments

OSx86 – How To install Mac OS X on VMware Server & AMD 64

Ingredients:
1. VMWare Server
2. Mac OS X 10.4.6 iso
3. Daemon Tools 3.4.7
4. At least 6Gb of Free Space.

Machine Specs:
AMD 64 3500+
1Gb RAM

1. Download and Install VMware Server
VMware Server is available for free at www.vwmare.com

2. Download and Install Daemon Tools
Daemon Tools available for free at www.daemon-tools.cc

2. Obtain a legal OS X 10.4.6 ISO
When possible you should operate from a legal copy of the operating system. The image I used is “Mac OS X 10.4.5 Jas.iso”. *cough*cough*

3. Mount the ISO 
VMware has the ability to mount CD/DVD images but not HFS+ images (the file system used by the Mac OS X installation DVD). You will thus need to load the iso into a virtual drive. I used Daemon Tools version 3.47. Some guides say Alcohol 120% is easier as you can skip step 5b.

4.Create a Virtual Machine
Fire Up VMWare, Select Local Host. Click on New Virtual Machine.  Click Next at the Wizard. Select Custom then Next. Select Other, then pick FreeBSD and click Next. Give your Virtual Machine a name. (I went with Mac OS X). *Put it wherever you want (I placed it in the location where I keep all my virtual machines. Note: make sure you have enough disk space for the virtual machine hard disk file. [6Gb]. Click Next. select Make Virtual Machine Private. Next then User That Powers On The Virtual Machine. Next again. Number of Processors, One. Next. Memory For The Virtual Machine , 512Mb. Next. Use Host-Only Networking (prevent Mac OS X from registering itself during installation). Next. SCSI Adapter , LSI Logic. Next. Create A New Virtual Disk. Next. Virtual Disk Type , IDE. Next. Disk Size, 6. Tick Allocate All Disk Space Now. Next. Wait for the disk space allocation. Give the Disk File a name. I also went with Mac OS X and save it to a location. Finish. Exit VMware.

5. Editing your VMware Config file [*.vmx] 
a.
Locate where you’ve stored your Virtual Machine in * at step 4. Open file (.vmx extension) in notepad and add the following line to the end of the file.

paevm=”true”

b. Help VMware find the Daemon Tools virtual drive by replacing the line auto detect with your virtual drive letter.

ide1:0.present = “TRUE”
ide1:0.fileName = “n:
ide1:0.deviceType = “cdrom-raw”

(note replace n: with the drive you have configured in Daemon Tools).

Close notepad and save the config file.

7. Installing Mac OS X
Launch VMWare Server and start your Virtual Machine. Press F2 and go into the Virtual Machine’s “BIOS” and set the boot order to CD-ROM first and HDD second. Save Changes and Exit. When the Mac OS X boot prompt appears (Read. Darwin) then the installation wizard welcome screen. It may take a while. Be patient.

8. Setting up your Hard Drive
Follow along in the installation, you’ll reach a point where it’s time to select your hard drive, but nothing is listed. Go to the menu and open up the Disk Utility. Create a Journal partition that utilizes the entire disk space. Done. The drive now shows up in setup. Proceed , Proceed.

9. Using a Custom Installation
Select the Custom Installation. You can opt to remove the Languages and Printer Driver Packages. Expand the “Patches” Packages and select the 3 AMD options – SSE2, SSE3 and AMD base system. Proceed along. Done.

 

10. Make your partition active.
On first restart of your Mac OS X you’d get a b0 error. You’ll need to mark your hard disk partition as active. To fix, boot from the iso again, and at Darwin initial prompt, hit F8. Type “-v -s” and then once a prompt appears, type “fdisk -e /dev/rdisk0“. Type “print” to display a list of partitions on the disk. Find the partition number for the one where you installed Mac OS X and then use the “flag n” command to mark the partition as active (n is the partition number). type “quit” and reboot. Mac OS X should boot off the hard disk as normal now.

October 1, 2006 at 4:48 am 242 comments

3 small apps

Been fairly busy with work (migration & integration) and play (Relic/THQ’s Company of Heroes ftw!) hence no updates at the blog. Here’s a quick post on 3 lifesaving applications that I’ve used recently till I can find the time to do a proper update. First off are 2 small password protected and encrypted notepad editors that are install-less and a couple of KB’s in size and the last application is a small dictionary program.

I needed to store the license keys of some application in a shared folder but couldn’t be bothered with NTSF permission et cetera, so I just dumped the file into the encrypted text file, place a password, go over to the users terminal, open up the text file, supply password, copy insert the license key and delete the text file after I’m done (confident no snoop would stumble upon it or open it during the duration of the install).

Fsekrit

Fsekrit’s weighs in at a mere 50KB and it’s self-contained install-less notes editor (somewhat like notepad) application that uses very strong encryption (256-bit AES/Rijndael in CBC mode).

Download from here.

Steganos LockNote

Similar to Fskerit, LockNote allows you to write, save, and automatically encrypt the notes you write from a stand-alone, install-less application. Also uses encrypted AES 256bit encryption technology from the CryptoPP program library.The advantage over Fskerit is that you can easily convert text files you already have by dragging them into LockNote. The downside? It’s almost 5x the size of fsekrit at 259KB.

Download from here

TinySpell

TinySpell is a cross-application spell checking utility that warns you of misspelled words and suggests replacements when you press the autosuggestion hotkey. If you suddenly change between application, eg. WLW to MSN and back, it’s a little slow in detecting the change though.

Download from here.

September 25, 2006 at 8:45 am 3 comments

Spambox.us

One thing most people have aside from 2 credit cards (or more) is 2 email addresses (also maybe more). For myself, I have 3 email addresses. Hotmail for personal, Gmail as a online storage and Mailcity as a dummy account (you won’t believe the amount of crap that gets send to the last one). Here’s a screenie.

Alot of us have had to register at various sites in order to;

1. view contents,

2. download stuff,

3. get redirected to another site (some won’t even tell that you need to subscribe but harvest your email anyway – damn them).

Being in the ‘business’ of evaluating softwares, I get my fair share and needless to say, suffer through the inevitable spam that follows. I’d normally enter a dud email address (eg. someone@somewhere.net) to see what the registration wizard does. If it’s a harvest attempt then they can very well have my dud email. If not, then I’ll have to re-register again as the first time confirmation was sent to the dud email account. (Nevertheless, spam still arrive at my dummy account and I had to purge it weekly).

I can cut down the number of steps considerably by using a service provided by Spambox which essentially creates a temporary email inbox and then forwards all mails that goes there to your regular inbox – till the time you specified expires and the temporary inbox gets purged (Spammer will now receive a bounce notification of a non-existing mailbox :)). This might be especially helpful if you’re registering at a site that needs to be finalized with a user-action confirmation email. Just set your Spambox time limit for a day, get confirmed, and your record is wiped clean when your temporary mailbox is purged after a day.

http://spambox.us/

September 13, 2006 at 3:51 am 2 comments

Spherebox

Joined Spherebox as a contributor beginning of this week (via invite from Shockw@ve). Go here for info on what Spherebox is about.

Two of my software reviews only available at that site at the moment are:

  1. Review of Ghostzilla Web Browser
  2. Review of Windows Live Write Beta

Head on over if you wanna read it and lend your support.

September 8, 2006 at 4:59 pm Leave a comment

Encrypt with Truecrypt

Today we’ll go over a simple way to encrypt sensitive files on your hard disk, external hard disk, usb thumbdrive and CD. TrueCrypt is a free, open source encryption application that works on Windows and Linux. It creates a virtual hard drive in the form of a single file that will read and write encrypted files on the fly.

1. Download TrueCrypt, install and launch.


2. Select “Create Volume” which will launch a walkthrough wizard. Choose “Create a Standard TrueCrypt Volume” and select Next. Hit the “Select File” (it really should be called “Create File” actually) button and navigate to a location to create your virtual encrypted drive file – which is really a file that acts like an encrypted folder. Type a name for it. I’ve created it in “C:\Documents and Settings\xxx\My Documents\stuff.ben”. try to pick a non-important filename (naming it private or encrypted will only make people more curious). your file can have any or no extension (i made mine *.ben). Hit Next.


3. Choose an encryption algorithm from the dropdown box. Next. Choose the size of the virtual encrypted drive file. You have to comit to a size (realize that it’s non-growable and regardless of how many files you throw inside, it will always show that size.Next.


4. Choose a password. If you don’t choose a badass 20-in-length alphanumeric password, TrueCrypt will complain, but you can choose to accept your wussy password as well :P.


5. Format the virtual encrypted drive file. (Don’t worry, you’re not formatting your hard drive but preparing the virtual encrypted drive file.) This is where the coolness factor comes in, TrueCrypt gathers random information from your system like the location of your mouse pointer to incorporate into the encryption algorithm. Done. Exit or create another…


6. Now you’ve got a virtual encrypted drive file, you need to mount it to use it. Choose “Select File” and navigate to the location in which you created it. Select an available drive letter from the list and then hit the “Mount” button, and enter the password.


7. The virtual encrypted drive will be mounted. Go to My Computer and listed alongside all the other drives on your computer, there will be a new one listed corresponding to the drive letter you selected. Drag and drop all your sensitive data to this drive and work from it as if you would any other disk.
8. Once you’re finished working with the data, in TrueCrypt, select the mounted drive and hit “Dismount”. The drive will no longer be available and it’s now totally encrypted.

How to use it on your external hard disk & USB thumbdrive.
TrueCrypt does need not be installed to work. Just dump truecrypt.exe, truecrypt.sys, and your virtual encrypted drive onto a tumbdrive or external hard disk. On the move, just stick it in any computer, launch truecrypt.exe, and browse to your virtual encrypted volume.

How to use it on a CD.
The cool part about using a CD is you can use the autorun function to launch truecrypt.exe whenever you pop it into a CD-ROM drive (unless autorun has been disabled on the machine). To create an autorun file, open a notepad and insert these lines:

[autorun]
OPEN=truecrypt.exe

and save it as Autorun.inf.


Burn truecrypt.exe, truecrypt.sys, your virtual encrypted drive and the Autorun.inf file to your CD root. The uncool part? it’s read only (naturally being a CD-ROM).

September 6, 2006 at 3:23 am 1 comment

AccidentCam™…made by malaysians for malaysians :)

how many times have we experienced the traffic jams caused by an auto accident not because of the accident itself but because of the gawking drive-by onlookers? pretty normal occurance in malaysia no matter which state you’re from. call it curious, call it malaysians fascination with gore, call it ‘kaypohchee‘, it’s a fact of life in malaysia. You hear radio annoucements (to move on and don’t stop) and jokes (alex yoong and him slowing down when there’s a crash at the race) about it.

We have products designed “by gamers for gamers” and smart tags (the toll ePayment contactless drive-through system), so along the same line, I now introduce you to a device that would hopefully ease the accident-related traffic congestion the next time an accident happens – the AccidentCam™. With 8x zoom, full spectrum low light mode down to 0.05lux, linux-embeded computerized item-focused & tracking, motorized pan/tilt (200°/70°) 100/s rotating base, 10″ LCD screen HUD, and options of velcro straps, you don’t have to slow down to ‘enjoy coverage’ of the accidents on the affected lane ever again.


The AccidentCam™

Simply mount the device (on your dashboard, roof or wherever you think will get the best view). Direct the camera as you’re coming up the the vehicle(s) involved in the accident (the only interaction needed from you to power up the AccidentCAM™ and start the sequence), and let the embedded computer take over. AccidentCAM™ then uses it’s item-focus lock-on to the spot (targeting is shown on the 10″ LCD HUD) and the camera starts capturing “the moment”. the camera even rotates the full 200° arc to capture the scene as you drive past. you can later review the footage by interfacing it with your personal computer. The joy is in the unlimmited replays, zooming, sharing it with your like-minded malaysian friends and family, and not missing the minute details as you ‘relive’ the accident at the comforts of your own couch.


object-focused targeting & tracking view from the 10″ LCD HUD.

Get your AccidentCam™ today and never miss an accident, no accident-gawking-related-jams, never needing to shift gears to slow down and never being too late to jot down that license plate number to punter at your local 4D/Magnum shop. Now how cool is that? Retailing now at RM299.99 at wherever they’re selling one.

Next up: MatRempitCAM Edition by the same people that brought you Crittercam. Designed by NatGeo in association with Putera Umno chairperson Abdul Azeez Abdul Rahim :).

August 30, 2006 at 6:46 am Leave a comment

Older Posts Newer Posts


Recent Posts

Feeds