Thursday, 18 October 2007

Turning your N800 into a webcam with motion

Here's an excellent application for the rubbish camera in the N800. It's called motion, and some equally excellent chappie called konfoo announced on Internet Tablet Talk that he has compiled it for the N800. Nice work, konfoo fellah!

Once it's running, point your N800 at anything you want to monitor, and you can check out what the N800 is seeing, updated every few seconds, from Firefox or a Mozilla based browser over the Internet. That's because it has a built in web server on port 8081
It works like this "out of the box", and by the looks of things you can configure it to save photos when there's motion detected, take video and so on.

If you want to give it a go, download it here onto your computer. Then here's the method I used to get it going.

1. Open the zip file, and copy motion and motion.conf on to your external card using a USB connection.

2. Start Xterm, become root, then create a directory called motion in your home user folder:

# cd /home/user
# mkdir motion

then copy the two files you put on your external card into this new directory:

cp /media/mmc1/motio* /home/user/motion

(the * is a wildcard, and will copy both motion and motion.conf (and anything else you have in that location which starts with motio))

3. To start motion, go to the motion folder and type motion:

# cd /home/user/motion
# ./motion

4. Now open firefox or mozilla and type in the local lan address of your N800. Check out the pictures!

5. If you want to access the images over the Internet, make sure your N800 always gets the same local IP address, and make sure your router has a fixed IP address or that you have signed up with dyndns (check out the VNC post from a while back in this blog if you need to find out what all this means). Then simply forward traffic on port 8081 to your N800's LAN address.

Now leave your N800 in the living room and spy on your little brother/the babysitter/your roommates/ your wife / whatever... In fact, don't do that. Point it at yourself and let the world see you. If you're lucky you'll catch me writing this blog for a few days at mfresh.plus.com:8081 Guess I am asking for my n800 to be hacked, but there we go.

Thursday, 13 September 2007

Sex up your N800 with ... Plankton.

Alright, so there's a limit to how sexy your Nokia N800 can be, and anyway, plankton is some type of fish isn't it?

Whatever.

Plankton is also one of the freshest, most attractive young themes available for your Internet tablet. And before your eyes glaze over at the shallowness of talking about themes, I'll just say that looks are important. When you pick up your N800 and look at the screen with one of Nokia's hideous themes, you see something functional but ugly.

Stick Plankton on it and your Nokia becomes an object of desire - something beautiful in its own right. It's the difference between an iPod and a Zune, or waking up next to Claudia Schiffer instead of some old boiler you met in the pub after six and half pints of 8 Ace. It's just better.

So, do yourself a favour, and download and install

hildon theme cacher

and then the

Plankton theme

itself.

Once you've done that, head over to the control panel (usually the third item in your Tools folder) and click on Themes. Then choose Plankton, and bask in the reflected glory of your gorgeous new baby. Now you just gotta hope no big hunk's going to steal it away from you.




Tuesday, 4 September 2007

Using your N800 and VNC to connect to your computer remotely

When you're away from your computer at home or work, it's great to be able to connect to it and operate it remotely. If it's a PC you can do this from another Linux, Windows or Mac computer using GoToMyPC or LogMeIn, but what about if you want to use your Nokia N800 to drive your machine remotely?

It's actually very simple, using an app called VNC Viewer running on your N800. You can download it by clicking here. Once you've downloaded it, open application manager and choose Application Install from file from the menu, and select the .deb file you just downloaded.

The next thing to do is get the VNC server software running on the machine you want to access. I recommend:
UltraVNC from ultravnc.sf.net for Windows (download it here)
Vine Server from Redstone software for OSX (you can download it here)
On Linux, check out one of the many VNC Server apps in your repos.

Once you've downloaded and installed the server software, you'll probably have to put in a password which you'll need to type in everytime you access the machine running the server software.

By default, VNC operates over port 5900, so you'll need to go to your router and set up port forwarding so that traffic arriving on port 5900 is forwarded to the machine running the VNC server software. For example, if the computer you want to be able to access remotely (and is therefore running the server software) has a local address of 192.168.1.4 then you need to tell your router to forward traffic on port 5900 to the machine at 192.168.1.4

Of course, this is no bleeding good if the local IP address of your machine changes everytime it starts up, so you are going to have to ensure that it is always 192.168.1.4. You can do that by giving it a fixed IP address, or going back to your router and adjusting the DHCP settings so that the machine in question always gets assigned the same IP address when it is switched on. This is sometimes called a reserved IP address.

Now, how do you access your machine remotely?

First of all, you need to make sure your N800 is connected to the Internet. Then, fire up VNC Viewer, and type in the name or IP address of your router.

The problem is that while if you are lucky your router will have been given a fixed IP address by your ISP, if you are unlucky it will have a dynamic IP address which changes each time it connects to the Internet. How do you know which you have? One way is to use your browser on the computer you want to access and go to whatsmyip.org/ This will tell you what your IP address is. Then disconnect your router, connect up again, and check again to see if your IP address has changed. If it has then tough luck - you've got a dynamic IP address.

Don't cry though - if you haven't got a fixed IP address you can get round this by going to dyndns.org and picking up a free host name which will always be updated to connect to whatever IP address your router happens to have been assigned by your ISP at any point in time.

So, now you are in a position to type in your router's IP address or host name (if you have a fixed IP address) or its dyndns name (like acaciaave.dyndns.org) to connect to your computer.

You'll then be asked for the password you filled in earlier on the server, and with any luck in a few short seconds you'll see your computer desktop on your N800.

It's a bit bizarre the first time you see XP or OSX running on your N800, but don't worry - you'll soon get used to it.

Then fiddle around with it - you'll soon get the hang of using the viewer. If you click once on something and press the + key at the top of your N800 you'll perform a right click - the rest is fairly obvious.

Now how secure is this? Answer - I don't know for sure, but there's a very easy way to beef up the security, and that's to use VNC Viewer in conjunction with OpenVPN. If you establish an OpenVPN connection to your home machine first, you can then tell VNC Viewer to connect straight to that machine by putting in its OpenVPN network address. If you use the setup outlined in an earlier blog posting here you can connect by entering 10.8.0.1. That way all your VNC traffic between your N800 and remote computer will be encrypted and as secure as a secure thing.

Can you access more than one computer on your network? Of course you can! Each has to be running its own copy of VNC Server, and each has to have a different port number or display number which you assign in the server software. So (assuming you are not using OpenVPN for a moment) one server is on port 5900, and the next is on 5901. By setting up port forwarding for these ports to different machines on your router, you can connect to your second machine by connecting to acaciard.dyndns.org:5901, for example.

Goodnight

Saturday, 25 August 2007

SIP on this - easy VoIP on your N800

In case it passed you by, there's an easy way to make standard SIP calls on your Nokia N800.

All you need to do is head for
http://rtcomm.garage.maemo.org/
to download Nokia's Internet Communications Software update and follow the instructions.

Once it's up and running you can load details of your existing SIP VoIP provider, and make calls to the PSTN using your N800. This is great for those people who's ISP give them free SIP minutes every month included in their Internet package, or those who already pay for a SIP based VoIP service and want to use it on their N800 as well.

OK, so it's been possible to make SIP calls from the N800 for a while now using Gizmo Project software, but lets face it, the Gizmo implementation on the N800 is rubbish. The first 10 seconds or so of every call are lost, and it all goes through Gizmo so if you are trying to do fancy stuff with SIP and Asterisk it didn't work anyway. And that interface! Oh, please!

Come to think of it, I haven't tried anything fancy yet using Nokia's SIP software, but it certainly works well for simple voice calls to the PSTN, which is good enough for me, and not bad for beta software. Now I can use my free SIP minutes on my N800, and then switch to Skype when they run out.

It's a shame that the Nokia address book is so feeble, but what the heck - free phone calls that work using the N800 can't be bad!

Friday, 3 August 2007

Using the aircrack-ng suite on the Nokia N800

Aircrack-ng is a suite of applications that together can crack most WEP keys. (In fact it can be used as part of a WPA attack too, but that's another matter.)

The main problem with the aircrack-ng suite on the N800 is that you can't do packet injection. This means that to crack a WEP key you have to wait around until enough traffic passes over the WEP protected link to crack the WEP key. If injection did work, you could effectively create the traffic you need yourself in a few minutes.

But you can use the suite on the N800 to crack WEP. Try this after installing aircrack-ng and wirelesstools. You can also get both (and possibly more up to date versions) from Collin Mulliner's repository, which you can get details of at http://www.mulliner.org/nokia770/

1. Start Xterm, and become root.

Then enter:
airodump-ng wlan0

This will show you what networks are around, and the MAC addresses of the access points and computers which are connected, and what channels they are operating on. Make a note of the channel of the access point you want to test (ie your own one)

(Note: A fault somewhere in the N800 - perhaps the wifi driver? - means that you'll also see some phantom access points that don't exist, and you may see access points mis-described as having WPA2 when in fact they are using WEP. Nothing you can do about that though. I think this is less of a problem or does not happen at all on the N770 but I have never tried it so I don't know for sure. )

2. Now quit airodump-ng by doing a control c , then restart it by typing

airodump-ng -c X -w mycapture --ivs wlan0

but change the X for the channel number of your access point. This will start capturing data which you will use to crack the WEP key, in a file called mycapture-01.ivs in your home directory

3. Now you have to wait for a while, till you have captured enough data to crack the WEP key. If the access point is busy then you might not have to wait too long.

Anyway, after an hour or so, you can try cracking it.

Type:

aircrack-ng mycapture-01.ivs

and hope for the best. Aircrack will try to crack the key, and if you have enough data captured it should crack the key eventually. If not, it will keep trying, as you gather more and more data, until you are successful (or never if you are unlucky, or if there is not enough traffic on the network)

The latest version of aircrack-ng (0.9.1) has been compiled for the N770 / N800 and this includes the new PTW wep attack. The PTW attack, which you activate by using the -z option when you use aircrack-ng, can crack keys with far far less captured traffic than the default attacks that aircrack-ng uses without the -z option, but sadly it only works on traffic captured as a result of a certain method of packet injection, and as the Nokias don't support packet injection you can't use it.

(If you want to test it on the N800, use a capture file generated by traffic injection using aireplay-ng, part of the aircrack-ng suite, from another computer. If you have such a capture file, say injection.cap, you can transfer it to the Nokia tablet and test it by typing:

aircrack-ng -z injection.cap

and you should get the key very swiftly indeed. The easiest way to do traffic injection is to get a laptop with a suitable wifi card, and then download the BackTrack2 iso, which you can burn onto a CD and run as a LiveCD. It has drivers patched for packet injection so it should work with supported cards "out of the box")

One more thing: think very hard before cracking someone else's access point as this probably illegal and could get you in trouble in many countries. Best stick to your own AP. You don't want to end up in chokey now do you?

Thursday, 2 August 2007

Aliases - using .profile to improve your life

Sick of typing

cd /home/user/MyDocs/.documents

every time you want to navigate to the documents folder on your Nokia N800 using xterm? Sick of typing any long commands?

The good news is you don't have to if you don't want to. You can easily create your own commands, or aliases, which carry out long command line operations like the one above.

All you need to do is create a text file called .profile, which you store in the home directory, /home/user/

In this file, you list your aliases, like this:

alias docs='cd /home/user/MyDocs/.documents/
alias home='cd /home/user/
alias cls='clear'
alias msfc='/home/user/framework-3.0/msfconsole'

and any other commands you want to make aliases for.

Once you restart xterm, (make sure it's the latest version), you'll have these commands at your disposal. In other words,

typing

docs

will execute the command

cd /home/user/MyDocs/.documents/

leaving you with more time to play golf, swim, search for the ultimate grits, or whatever else takes your fancy.

Which is nice.

How do you make a text file? There's lots of ways to do this, but one easy way is to download MaemoPad using the application manager.

So:

1. Download MaemoPad and start it up

2. Go to File New to create a new file

3. Type in your aliases, as described above.

4. Save the file in your documents folder, giving it any name you like, such as aliases. You can't save a file in MaemoPad with a dot at the beginning of the name, so don't bother trying to name it .profile - it won't let you

5. Now we are going to move the file you just made into the /home/user directory, which is where it has to go, and rename it. Start up xterm, and type

mv /home/user/MyDocs/.documents/aliases /home/user/.profile

6. Pause to reflect that that was the last time you will ever have to go through the tedious process of typing "/home/user/MyDocs/.documents/" thanks to your new .profile file, restart your xterm, and go and have some healthy outdoor fun.

Friday, 27 July 2007

AutoScan 1.01 on the Nokia N800

The N800 makes a great portable network security device. Here's a nice easy to use tool to add to its toolbox.

It's called AutoScan (follow the link to download and get the Nokia 770 arm binary) and, not surprisingly, it's a scanner. What's cool about it is it sports a well classy GUI, so once it's taken a good look at your network it gives you a nice graphic view of what's connected, what OSes are running, and what ports are open.

Those familiar with AutoScan on an x86 system will know that AutoScan has plenty more features up its sleeve such as the ability to run Python and Perl scripts from within the app, but many of these advanced functions tend to freeze or are inaccessible on the N800.

Still, the basic functions work well and if you have a few idle moments and are sitting around with your N800 you can do a lot worse than run a quick AutoScan for a rough and ready guide to what's connected and, perhaps, vulnerable.

It's not a complete alternative to Nmap and it has its bugs in the N800, but it's still worth taking a look at if you're interested in network security...
 
© Copyright 2007-2008