Jun 01

Any operating system that contains the letters B, S and D usually conjures images of geeky elitism, arcane interfaces and the undead world of UNIX. Despite its similarity, this is an image Linux has largely been able to shake off, thanks to its friendly graphical installers and configuration tools. But BSDs can offer a unique insight into what has made Linux popular, as well as an opportunity to hone your command-line and trouble shooting skills in a world that might be getting too easy. And while you do need a little technical confidence to get any BSD system up and running, it’s not half as difficult as it first appears.

FreeBSD is not as demonic as its logo might suggest. Honest.

FreeBSD is a the most popular implementation of version 4.4 of the Berkeley Software Distribution. This was the original BSD, a version of UNIX that was developed between the late-70s and the mid-90s and used a famously liberal licence. This licence has meant that anyone can use, copy and redistribute and re-implement its code and APIs. Which is exactly what FreeBSD attempts to do, alongside other projects like OpenBSD and NetBSD. In turn, there are many projects like Apple’s OS X that build upon the foundations in FreeBSD, all thanks to the liberal licences of the original.

Step 1: Prologue

There are several important differences between FreeBSD and Linux, but the most fundamental is the kernel. The term ‘Linux’ is most often used to refer to the entire operating system, from the boot code and drivers to the desktop and the applications. We’d call Ubuntu, Fedora and OpenSUSE different versions of Linux, for instance. But this definition isn’t accurate. ‘Linux’ should only really refer to the kernel – the chunk of code at the heart of the system that deals with hardware, networking, drivers, storage, CPU and process management, and the BSD kernel is entirely different.

The Linux kernel that was originally developed by Linus Torvalds, and it’s still the only part of the whole operating system he has control over. The remainder of what makes a complete operating system, the windowing environment, the desktops and the applications, are pulled from open source project that are mostly using one of the the GNU Public Licences. Hence, the official name for the entire Linux operating system is really GNU/Linux to show that there are two parts of the whole project. Which is why replacing the kernel isn’t a trivial operation.

Don’t be scared of text mode. It’s part of Linux’s legacy, and serves a very useful purpose.

Any new kernel needs to be broadly compatible with Linux so that the remainder of the software stack can be ported without too much difficulty. Fortunately, both FreeBSD and Linux are UNIX-alike, which means there are many similarities, and the result is that with a standard installation, you’ll find many of the tools you’re already familiar with, albeit in a different configuration.

Many system administrators feel FreeBSD is has been a more stable choice for servers over the years, and that it can out-perform its cousin on certain tasks. It’s also a great choice if you want to run a server on limited hardware, as the requirements for a BSD-based system are often less than for the Linux equivalent. FreeBSD, for example, lists its minimum requirements as a 486 CPU with 24MB RAM, which is quite staggering in today’s world of terabytes and quad core processors. FreeBSD is also a i386-based platform. There are ports to other processors, but the project’s focus has always been compatibility with Intel’s standard architecture, and as a result, could be better suited to the majority of machines that parts of the Linux kernel.

Step 2: Installation

While there are Live CD versions of FreeBSD, the traditional install disc is still the most common medium for getting hold of the latest version. But you’ll need to steel yourself against its antiquated installation mechanism.

When you boot your machine with the disc in the drive, the first thing you’ll see is the black and white ASCII art of the install menu. You won’t see any other graphical embellishment until you’re able to boot successfully into a working desktop. For most installs, you’ll need to choose option 1 from the menu, but if you’re using an older machine, you may want to try 2 (with ACPI disabled) to avoid any potential problems.

Unlike trial Linux installation packages like Wubi, installing BSD has a tendency to be destructive. Make sure you’re not going to obliterate anything important before continuing.

You’ll then have to wait a few moments while various kernel messages scroll by before you’ll see the text-based installation and configuration screen. If you’ve used Debian, this kind of text installer will feel familiar. There’s no linearity to the install process. You can move backwards and forwards through the various options, and continue to make adjustments to the installation until you quit the installer and restart the system.

For a basic, working environment, you will need to do at least the following. Select the second option in the menu to initiate a ‘Standard Install’ and read the information on the screen that follows. The next page displays ‘fdisk’, the disk partitioning and formatting tool. Press F1 for documentation, but if you’re using your entire hard drive for this installation, press ‘a’ to select everything, followed by ‘q’ to apply the changes. This will delete everything currently on the drive, so be careful.

The next page will ask if you want to install a boot loader, which is the menu that lets you choose between whatever operating systems you have installed. Choose the second option (BootMGR), and on the following page, you need to create the various partitions used by FreeBSD using the same fdisk-like interface we’ve just seen.

Once again, if you’re using an entire drive for the installation, you can just press ‘a’ to let the installer create the most appropriate array of partitions followed by ‘q’ to make the changes permanent.

The next page will ask you to choose a distribution. Unlike a Linux distribution, FreeBSD uses the term to refer to the default selection of packages that are to be installed. Select ‘Custom’ and add ‘base’ and ‘kernels > GENERIC’ to your installation.

This will give you enough package to get a working system, and we’ll need to add the desktop environment at a later stage. Return to the ‘Exit’ option at the top of the list and press space to jump into the package installation routine.

Step 3: Post-Install

After all the preliminary configuration has completed, you’ll be asked whether you want to configure any Ethernet or SLIP/PPP devices. Select ‘Yes’ if you are connecting to the internet through your machine’s ethernet port, and you should see your adaptor listed in the top of thew connections list. Choose the adaptor, say no to IPV6, say yes to DHCP and skip through the configuration page to the OK button. Say ‘no’ to your machine being a network gateway,’no’ to enabling any inetd services or running SSH, FTP and NFS server and clients, and don’t edit the console settings. You can safely setup a timezone for your machine and enable the PS2 mouse emulation if you’re using one.

Don’t worry too much about your initial selection of packages. You can easily add more later.

Say ‘Yes’ to the next question, and you’ll now be looking at the package manager. This is where you choose what applications you want to be installed on top of the default option we chose earlier, and there are thousands of packages to choose between. For a simple setup, jump into the ‘x11’ menu and select the ‘kde4-4.3.1′ package. It’s exact name will depend on the version of FreeBSD you’re playing with. If you’re not a fan of Gnome, you could also choose ‘gnome2-2’ from the same list of packages. Selecting either will also mark their dependencies for installation. You also need to select xorg-7, and any other packages you know you’re going to need.

When you’re ready to go, jump back to the top package list, select ‘Install’ and press space. You’ll need to wait a while for all the packages to install. The next step is to create a user account. You can do this by saying ‘Yes’ to the option, then selecting ‘Add User’, and entering a user name in the page that follows. Select OK to make the change permanent and exit from the users and groups menu. You’ll then be asked for the system manager’s password, and you’ll need to type this twice.

After that, you can say ‘No’ to the post-install configuration request and wait for your machine to reboot. You’re now at the point where you should have a basic, working installation, and you can quit from the installation menu and restart your system.

Step 4: Configuration

When your machine re-appears, you’ll be greeted by the sombre monochrome of the command line. Login as ‘root’ with your system manager’s password. For both Gnome and KDE, you need to add the following two lines to the ‘/etc/rc.conf’ configuration file:

dbus_enable="YES"
hald_enable="YES"

Unfortunately, you’re going to need to use the ‘vi’ text editor. Type ‘vi /etc/rc.conf’ to load the file. Press ‘i’ to enter insert mode, move to a new line and type the following. Press escape to exit insert mode, followed by ‘:wq’ (without quotes) to save the changes and quit the editor. Next type ‘reboot’ to restart your system.

FreeBSD doesn’t come with a desktop activated by default, but it’s simple enough to change.

When you get back to the login screen, enter your user account details this time, and when you get dropped back to the command line, type ‘vi .xinitrc’ and add the following line to the file:

exec /usr/local/kde4/bin/startkde4

This is telling your system that when the X.org graphical system starts, you want KDE to be used as your desktop environment. Save and exit vi.

Step 5: Launch Desktop

Usually, at this point, you need to create an ‘xorg.conf’ file to define the display properties for your machine. But recent releases of the X server are able to create a working configuration without any further editing. Which means typing ‘startx’ is all you need to do to launch a graphical environment running KDE. If this doesn’t work, then you will need to create create a working /etc/X11/xorg.conf file.

But with FreeBSD 8, it’s more likely that you are now looking at KDE running through its Akanadi porting routines as it builds up a configuration for your desktop. After a couple of minutes, this will leave you with a KDE desktop running on-top of FreeBSD, and you’ve just earned another trophy for your awards cabinet.

At long last: a GUI! And one of the more stable interfaces you’ll find. Here’s hoping BSD serves you well.

This is exactly the same KDE you’ll find on Linux, and you’ll be hard pressed to find any difference between the way it works on FreeBSD and the way it works with Kubuntu. It’s only when it comes to system configuration that you’ll notice because FreeBSD doesn’t have any graphical configuration tools, which means if you need to change anything, you’ve got to be prepared to go back to the command line. But that’s another story.

See also: PC-BSD 8.0

If you’ve followed the main text to install a shiny new version of FreeBSD, you might have noticed that the install mechanism really wasn’t all that shiny or new. It reality, it feels ancient. But this doesn’t mean that the operating system has been languishing unloved and undeveloped, it just means that making the installer easier to use is low on the priority list.

Fortunately, this being open source, demand for a better way of doing things has led to several alternatives, the best of which is PC-BSD, which you’ll find at www.pcbsd.org. It does several impressive things. Firstly, it replaces the tepid monochrome installer of FreeBSD with a graphical application much-more in-line with its Linux counterparts. It will also automatically install and configure a recent version of the KDE desktop, which should mean you can get productive with a FreeBSD system as quickly as possible, without touching the command line, and there’s a wonderful wiki full of helpful documentation.

This means you can install PC-BSD by placing the disc in the drive, rebooting your machine, answer the questions that appear and wait for the operating system to install. You won’t even need to worry about manually partitioning your drive unless you want to create a custom configuration.

Another important difference is that it PC-BSD doesn’t use the same package management as FreeBSD, although you can still get to it if you need to. Instead, package are available as single files with the ‘.pbi’ file extension, which can then me installed with a simple click. It’s more like how packages are handled on OS X, and is far better than the weird world of dependencies you find on Linux.

Apr 22

Go beyond updates, PC Plus reveals some of the weird projects that Twitter has given birth to.

Twitter isn’t just about telling the world what you had for lunch, any more than the phone is just a way of calling Mum. It’s a communications platform in its own right now, and you can do amazing things with those 140 characters – automatically generating content, serving up data on demand, sharing photos and much more. But what if you’re not feeling inspired? We’ve gathered together some projects people have put together through the medium of Twitter. Some are funny, some are useful and some are plain odd – but all are more interesting than a simple status update.

1. Read (or write) a book

“It was the best of times, it was the worst of times.” One of the best known lines in all of literature, and there’s still 89 characters left. Twitter novels are served up in bite-size portions, and you don’t need any special software to do one yourself – just a manuscript and the ability to copy and paste. Get an intriguing introduction to a book by signing up for nothing but first lines, or if you fancy getting involved with an original Twitter story, check out We Tell Stories.

Some people have found another slant on the idea of Twitter books by serialising existing diaries. You can sign up for daily time-shifted entries from the likes of farm girl from 1937 and watch their lives unfold in quasi real-time.

2. Track the weather

As the winter chill froze the country earlier this year, many people were tweeting messages like ‘BA1 8/10 #uksnow’. What was that? It was a collaborative weather map that harnessed Twitter’s power to keep track of the UK’s current snow conditions. With everyone knowing that 2/10 meant ‘a few flakes’ and anything over 7/10 translated as ‘blizzard’, the map built up piece by piece as more and more people tweeted, giving a real-
time picture of which areas in the UK were experiencing snow. It may not have been entirely accurate, but neither was the official weather forecast, and this at least had the advantage of being interactive.

3. Kick the habit

Any diet or attempt to break an addiction benefits from keeping notes on your progress, and Twitter offers an easy way of reinforcing good behaviour. Get into the habit of tweeting important information on what you’re doing, and sneaking that chocolate bar/cigarette/entire black forest gateau becomes a much more public affair. Having an electronic copy of your intake also makes it much easier to work out how well you’re doing, especially if you need to count calories. For dieting, there’s Tweet What You Eat and for smokers there’s Qwitter. Compulsive auto-
tweeters may want to avoid these services, though: the only real hope for such Twitter addicts is for someone to sneak in and cut their internet connection.

4. Expand your brain

Twrivia is a daily Twitter-based trivia quiz. Follow @twrivia to receive a trivia question every day; each one is preceded by a 15-minute warning. The first five people to answer the question correctly score more points. There aren’t any prizes – it’s all about climbing the leaderboard and the fun of challenging your brain with a good trivia question.

Daily brainteasers in 140 characters or fewer. You can hit Google, but you won’t get in first if you do…

5. Change the world

As anyone who’s seen a hashtag spreading out and reaching people all across the world knows, Twitter excels at generating memes. Why not try putting that to good use by creating a Twitter-based petition? With Act.ly, you can pass around a URL and let people register their support in seconds. It won’t have the weight of a full postal campaign, but it should still work as a way of politely registering opposition to something you’re concerned about.

6. Monitor your friends

The dubious story of a best man rigging a newlywed couple’s bed with a weight monitor and tweeting their bedtime activities complete with stats on duration and frenzy may have rung every BS alarm ever created, but there’s no reason it couldn’t be done. Read the story and its claimed ending. If you’re unconvinced, why not break out a soldering iron and build something similar?

7. Become a spy/gangster/assassin

OK, not literally. MI5, Don Corleone and the Hashshashin may be on Twitter, but we don’t have their usernames. Instead, we’re talking about social games. Spymaster was the first game to make it big, with 140 Mafia and SNODS – currently offline following later. These games add a fictional layer to your existing contacts, which isn’t always popular with the people following you.

8. Give your household appliances a voice

Plants that tweet at you when they’re thirsty? Doable. Toasters that report when the toast is done? Old news. While the idea may sound silly, these ideas are a great example of Twitter moving beyond messaging. If you fancy doing something like this, you can even set up your appliance’s account to send you text messages. This means you don’t need to be at your PC to see what requires your attention, so the whole system should fit right into your daily life and existing phone systems. Handy!

Botanicalls kits let you wire your plants up to Twitter, letting you know if they want a drink, or are bored of hearing your voice.

9. Warn your loved ones

When disaster strikes, Twitter is becoming a vital communications system – as we’ve seen during the earthquakes in Haiti and the shootings in Mumbai. It’s also been used to warn friends about arrests in other countries and to get help to the top of a mountain. Might it save your life someday?

10. Kick up a fuss

Twitter has the world’s attention right now, and word spreads fast. If you’re a celebrity, it’s the perfect unfiltered platform, as film director Kevin Smith demonstrated when he complained about Southwest Air kicking him off a flight because of his weight. But the great thing about Twitter is that it doesn’t just give famous faces a chance to air their grievances to a wide audience – we all have a shot too. London blogger Robert Loch’s complaints about one club caught the attention of the tabloids, and stationery company Paperchase found itself in trouble after one artist found their work being used without permission and posted about it on the site.

11. Get things done

As easy as it is to waste time on Twitter, it can be helpful too. Sign up to a service like Remember The Milk and if you’re glued to Twitter all day long, at least you’ll be given reminders to be productive. They come as direct messages, so you’ll also get them via email, on your phone or however else you’ve opted to receive them.

12. Wash your 
mouth out

Here at PC Plus, we never ****ing swear. **** no. But if you’re having trouble minding your ****ing manners, ****ing head over to Cursebird to see how ****ing rude you really are. If the report fills you with shame, you can start ***ing your **** ***** out immediately.

13. Stream everything

For many people, Twitter is replacing the blog. You can post links to anything you like, but many services are making that process automatic. Tie Twitter in to Flickr and you’ll tweet about your favourite photos; add YouTube to post automatically about videos; and link up Xbox Live to share your latest achievements. If a service doesn’t do it automatically, there’s probably a plug-in somewhere. You’ll want to make sure it’s switched off for anything you don’t want friends to see, though…

14. See the world

Want to know what’s going on around the world? Visit and watch as tweets from every corner of the Earth pop up onto your screen. This is largely pointless, true, but it’s a great way to kill some time and see what everyone’s talking about.

15. Wear your words

Every now and again you find a tweet so perfect, so beautiful, that letting it slip into the archives would just be a crime. Why not get it on a T-shirt? At Tweetshirt come into their own – they show you your social graph in an easily sortable form. For clearing out the rubbish from your lists, try StopTweet.

17. Track packages

When you’re waiting for something exciting to arrive, there’s little worse than constantly having to log into the courier service’s website for updates. With TrackThis you can fire and forget, getting the latest news pinged straight to you. We hope every service offers something similar in the near future.

18. Interact with fictional characters

Not everyone on the internet is who they say they are, but some admit it. Hunt around and you can find Twitter accounts for every fictional character from Darth Vader and Superman to True Blood’s Sookie Stackhouse and Barney Stinson from How I Met Your Mother. These accounts aren’t usually official, and they occasionally get clamped down on – as happened with ABC when it found viewers tweeting as the characters from Mad Men – and tend to be parodies rather than actually trying to ‘be’ the Joker online. Still, they can be fun – as fans of Peep Show will have experienced when the ‘characters’ live-tweeted the newest series.

Get more involved with your favourite characters’ daily lives by following them on Twitter.

19. Build a bot

Want to create life of your own? Twitter bots are easy to create thanks to Botomatic. Using a simple rule-based system, you can build up a list of how you want the bot to behave when it receives messages and gets new followers. Then just give it a name and a description and unleash it on the world! These aren’t the kind of bots that can actually conduct a conversation with a human being, but they’re great at passing information on request or automating systems capable of posting onto websites. To see some of the bots people have made for Twitter, visit the Twitter Fan Wiki’s Bots page.

20. Thank someone

In the real world, you often thank someone by saying ‘I’ll buy you a drink’. This is another reason why Twitter is better than reality – with Foamee you can keep track of how many you still owe, and if anyone owes you a drink, you can redeem it without sounding like a grabby so-
and-so. You can offer people either a beer or a coffee and then mark the drinks as redeemed when your taste buds are satiated or your conscience is clear. If you want to receive a soft drink, though, you’ll have to stick with the old fashioned way of grabbing a free beverage – hanging around at the pub, letting whoever owes you a drink get a round in and then somehow slipping away right before your turn.

Apr 15

If you think you have the skills to match Graveyard Shift Supervisor with the Las Vegas Police Department Catherine Willows then read on.

The super-sleuth detectives in TV show CSI have some very nifty tools to help solve crimes. But the need to keep things interesting and wrap the show up in an hour means the technology used in each episode bears little resemblance to the work of real forensic experts. Or does it? When it comes to computer forensics, today’s tools are becoming more advanced, leaving fewer places to hide information. This tension between fact and fiction took on a whole new dimension when Microsoft’s police-only forensic toolkit was leaked on the internet. Reports say that it has more in common with CSI than The Bill.

We’re going to show you how to mimic Microsoft’s offering using open-source software to unlock Windows accounts, investigate suspicious activity, see any file on a Windows disk and even peruse files that others believe have been permanently deleted.

Forensic toolkit

During November 2009, it was announced that someone had leaked Microsoft’s secret crime-fighting software online. Described as a collection of programs linked by a sophisticated script, hackers and other cybercriminals had been dying to get their hands on it for some time. Now it’s reportedly available to anyone brave enough to download and install it.

The Computer Online Forensic Evidence Extractor (or COFEE for short) has been available to police forces since at least summer 2007, and is designed to gather forensic evidence at crime scenes and during raids from the still-running PCs of suspects and victims. COFEE reportedly takes the average police officer about 10 minutes to master, and comes supplied on a bootable USB pen drive. It enables trained officers to gather evidence from a running system without the need to call in cybercrime specialists, thereby speeding up investigations.

The USB drive itself is said to contain a package of about 150 forensic programs that enable an investigator to record sensitive information like internet history files and complete practical tasks like deleting Windows passwords. It also enables them to upload the recorded data for further analysis. By April 2008, it was reportedly in use by over 2,000 law enforcement officers throughout 15 countries.

At the time of the leak, Microsoft claimed that COFEE was nothing more than a collection of commercially available programs brought together in a single handy package, which it makes available free of charge (if hitherto secretly) to help combat computer crime.

If that’s true, then is it also possible to create your own version of COFEE using free, open- source software that will grant you complete access to a Windows computer? The answer is a resounding yes, but we must stress that using what you’re about to learn for malicious purposes on a computer you don’t own isn’t big and it’s certainly not clever.

Don’t use the following information to try to hack other people’s computers or networks. Without the in-depth knowledge required to cover your tracks, you’ll be caught and will probably face prosecution. If you hack computer systems in the US and get caught, you should be prepared to undergo a one-sided extradition process and go through a judicial system that will put you on a par with hardened terrorists before forcing you to serve a long prison sentence. There are plenty of commercial computer forensics systems around these days, but many of them cost serious money or are only available to the police. However, the open source community has a solution in the form of a special Linux distribution called Backtrack 4.

Introducing Backtrack 4

Backtrack 4 is based on a stripped-down version of Ubuntu Linux, which is a popular choice for home users because of its ease of installation and use. The makers of Backtrack 4 have stacked the application with special security and forensics tools. These make it extremely useful to network security specialists and police forces, as well as anyone interested in knowing exactly what’s happening on their own networks and any second-hand machines they’ve bought.

Backtrack contains a formidable array of hacking tools.

Despite being Linux-based, Backtrack will grant you complete access to data stored on computers running any version of Microsoft Windows. That’s because Windows isn’t running when Backtrack is booted from a DVD or USB pen drive. Linux can read Windows disks, but it doesn’t obey the file permissions, so the machine’s hard disk simply seems to contain a lot of files waiting to be accessed.

As well as booting and running directly from a DVD as a Live CD installation that never installs on your computer, you can also install Backtrack on a hard disk as the only operating system, or next to an existing Windows installation. If you plan to install Backtrack on a USB pen, you’ll need one with a minimum 2GB capacity. This booting option brings Backtrack closer to Microsoft’s COFEE than any other option.

First, you need to download the Backtrack 4 ISO file, which is just under 1.6GB. You can download it from the Backtrack site directly or click the ‘Torrent’ link on the same page. There are multiple sources from which you can leech parts of the file in parallel, so in practice it’s faster to download the ISO as a torrent. Click here to download the Vuze BitTorrent client, after which you can just click the ‘Torrent’ button on the BackTrack site’s download page.

Once the ISO has downloaded, use it to make a bootable DVD. We’ve listed a free and easy-to- use CD/DVD package capable of making bootable disks in the Resources section. When that’s done, test your work by ensuring your BIOS is set to boot from CD/DVD before attempting to boot from your hard disk, then insert the DVD and reboot the PC. Select the option to boot with a screen resolution of 1,024 x 768. When Backtrack has booted, you’ll see a command line. To start a desktop environment, enter the command startx and press [Enter]. After a few seconds, the standard KDE desktop will start.

Don’t be put off by the command line that appears when you first boot up.

Find your way around

Backtrack is loaded with all the obscure little utilities used by professional security consultants. Many of them are fiddly command-line programs, but a lot have graphical front ends that make them simple to use.

Hover your mouse over the icons on the menu bar at the bottom of the desktop and KDE will tell you the name of each one. We’ll use the names that appear when you do this to make thing easy to identify here.

The network interface cards are designed for network security work, and are disabled by default when you boot up Backtrack. This is because if anyone (or anything) is listening to network traffic, the last thing you want to do is announce your presence by requesting an IP address over DHCP.

To enable networking, click the black Konsole icon to open a terminal window, then enter the following command: /etc/init.d/networking start. After a moment or two, during which lots of verbiage scrolls up the screen, open Firefox (the icon is next to the terminal on the menu bar) and enter www.google.com as a URL. You should see the world’s favourite search engine appear.

Much like the Start button in Windows, the left-hand icon on the menu bar brings up the installed programs and system configuration options. This is called the K menu and is organised into subject areas. The one we’re most interested in is the first: ‘Backtrack’. Click on this and you’ll see a submenu containing categories of hacking programs, with which Backtrack has been preloaded. Clicking one of these reveals nested subcategories right down to individual programs.

Map the neighbourhood

Let’s begin by scanning the local network for hosts (another name for networked computers). Starting from the K menu, select ‘Backtrack | Network Mapping | Identify Live Hosts | Autoscan’. A wizard will appear. Click ‘Forward’ and you’ll be asked for the name of a network to scan. Leave this as ‘Local network’ and click ‘Forward’ again. The next screen asks where the network is located. We’re scanning the local network, so accept the default of it being connected to your computer by clicking ‘Forward’ once more.

Next, select the default network adaptor. This will usually be called ‘eth0’. If you don’t see any adaptors in the pulldown menu, it’s because you didn’t start networking earlier. Close Autoscan, start networking and run Autoscan again. Click ‘Forward’ one last time to confirm what you’ve asked Autoscan to do, then maximise the user interface that appears so you can see everything. Autoscan now contacts every possible IP address on the local subnet to see if there’s a machine connected to it. If there is, it adds an entry to the left-hand pane. Notice that in some cases, Autoscan can even tell you the username that’s logged in.

When you select a host, Autoscan will attempt to gain more information about it for you. A wizard will also appear, asking you to add it to the Autoscan online database. Cancel this. You can go between tabs between the interface’s right-hand panes to display a summary of the machine, detailed information or an inventory.

Autoscan works by sending a stream of specially crafted packets to each host in turn. These are designed to return information about the running system and can give away a surprising amount of information. Autoscan is a useful tool for detecting whether your neighbours are leeching your Wi-Fi, for example. If you don’t recognise a host, it’s probably an intruder – so up your security!

Wipe passwords

Logging into a Windows system is easy using Backtrack, even if you don’t know any of the usernames or passwords that have been set up. That’s because you can use a utility bundled with Backtrack to remove the password on any Windows account, including administrator accounts. This is possible because of a file called the SAM (Security Access Manager), which is normally locked by the Windows kernel so that no one else can read it. This is modifiable while Windows isn’t running.

First, we need to find out where the system’s hard disk resides in Linux. To do this, click the Konqueror icon on the desktop menu bar. This will open the Konqueror desktop browser. Click the ‘Storage media’ link. If you don’t see anything right away, press [F5] to refresh the view. Among the media that Backtrack knows about on your system, you’ll see your hard disk. Click this and you’ll see the folders in C:\, which is useful if you need to copy, add or modify files without logging into Windows directly.

Now select the Home icon on the Konqueror toolbar (the one that’s shaped like a house) and click the blue ‘up’ arrow next to it. Click the Media folder, and then the ‘Hard disk’ icon again. The location bar will change to give the name we must use to access the disk. It’ll be something like ‘/media/disk’.

Now, from the Start menu, select ‘Backtrack | Privilege Escalation | Password Attacks | Chntpw’. ‘Chntpw’ stands for ‘Change NT Passwords’ and it works on all versions of Windows. When you run the command, a terminal window opens. You can ignore the verbiage on the screen and enter the following command: chntpw -i /media/disk/Windows/System32/config/SAM. The capitalisations are very important here – ‘chntpw’ is all lowercase. If your Windows partition is called something other than ‘disk’, put its name in place of this in the command. Press [Enter] and a text-based menu will appear. Select ‘Option one’ and press [Enter] again. This gives you a list of the Windows user accounts. Type the name of the account you want to change (taking care to use the correct case for each letter) and then press [Enter].

Using the Chntpw utility to wipe a user’s password enables you to log into that account unhindered.

Chntpw displays lots of details about the account and gives you a number of options. Select ‘Option one’ and the password will be removed from the account. To exit, type ! and press [Enter], then press [Q] and hit [Enter] again. Chntpw will ask if you want to write the hive files. You do, so press [Y] followed by [Enter].

If you now reboot into Windows, you’ll be able to log into the account you’ve changed without being prompted to enter a password.

Recovering deleted files

Many people believe that when they delete a file and then empty the Recycle Bin, it’s gone for good – but this isn’t the case. Windows, like all modern domestic OSes, simply marks the sectors on the disk occupied by the deleted file as available for future reuse. It would be inefficient to overwrite the data those sectors contain until new data is ready to be stored. In the meantime, the old file is still there, available to be read by anyone with access to a file recovery utility.

Backtrack contains several such applications. Among the easier to use is PhotoRec, which is capable of scanning a hard disk and recovering a comprehensive list of all files marked as deleted. In fact, it can recover far more than just files deleted by users, including temporary files left over from when the operating system was installed. This means it’s a good idea to have a spare USB pen drive handy to store the recovered files for later perusal, because they can easily run into the thousands. To get going, insert the drive and run Konqueror. Click ‘Storage media’ and then select your USB pen drive to ensure that Backtrack is aware of it. You can leave Konqueror open and check the scan’s progress later.

Now run PhotoRec by navigating to ‘Backtrack | Digital Forensics | Forensic Analysis’ and then selecting ‘PhotoRec’.

The program itself runs on the command line, but it’s menu-driven, making it easier to use. When PhotoRec runs, it first presents you with a list of the hard disk partitions on the computer. In the case of a Windows-only machine, there’ll probably be only one large one. However, in some Windows 7 installations, there may be a second, small partition that the system uses to store recovery data. Use the up and down arrow keys to select the main partition, then press [Enter] to continue.

PhotoRec can understand a large number of partition table types and will automatically identify the one used on your disk, so accept the default on the next screen by pressing [Enter] again.

The next screen enables you to specify the file types to recover. Use the left and right arrow keys to highlight ‘File Opt’ at the bottom of the screen. Next, press [Enter]. The resultant display will give you a long list of all the recognised types. If you only want to recover one file type (JPG, for example), press [S] to deselect everything, then scroll down to the relevant type and press [Space]. You can use the [Page up] and [Page down] keys to navigate through the list more quickly.

 

Once you’re happy with your file type selections, press [Enter] and select the filesystem you want to scan. Use the left and right arrow keys to select the ‘Search’ option, then press [Enter]. This presents you with a choice of filesystem types. For a Windows filesystem, make sure you select ‘Other’, then press [Enter]. On the next screen, select ‘Free’ to ensure that the program only scans disk sectors that are marked as free space. Press [Enter] again to continue.

You’ll now be asked where to store the recovered files. The default is the directory ‘/usr/local/bin’, which is on the boot media. Press the left arrow key three times to get back to the root directory, then press the down arrow key repeatedly to navigate to the media directory. When you reach it, press [Enter] to see the media connected to the system. One of the devices you find should be the USB pen drive you inserted and navigated to in Konqueror just a moment ago. Select this and press [Enter] again. Finally, press [Y] to begin recovering deleted files.

The extraction process can take quite a while, depending on how much free space there is to scan on the disk and the number of file types you’ve specified. As the scan progresses, the number of files of each type will increase. PhotoRec creates a long list of subfolders in which it stores all the files it’s recovered. By perusing these, you may be able to locate some interesting or even incriminating pictures and other documents.