Author Archives: norbert

Spoofing W3C Geolocation from a Different Angle

4
Filed under Firefox, Hacking, Internet
Tagged as , , ,

The other day I watched an episode of Hak5 – Spoofing the W3C Geolocation API were Darren was introducing us to the W3C geolocation API. (Btw. Hak5 is so awesome, you definitely have to check them out right now if your don’t know them already). This API uses certain informations like IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs to determine the exact location of a users computer. It’s implemented by browsers like Firefox and Chrome.

One can test the geolocation API by going to Google Maps and clicking on the “Show MyLocation” icon. The geolocation API is actually pretty simple. Browsers make it available through a JavaScript object, which can be queried by the web application for the location. For privacy reasons, the browser will ask you if it is allowed to detect your location, since it has to transfer WiFi addresses and the likes over the net.

    <script type="text/javascript">
    // locate position
    navigator.geolocation.getCurrentPosition(displayPosition);

    // callback function
    function displayPosition(pos) {
        var mylat = pos.coords.latitude;
        var mylong = pos.coords.longitude;
        alert('Your longitude is :' + mylong + ' and your latitude is ' + mylat);
    }
    </script>

Read More »

Building Firefox on BackTrack 5

0
Filed under Firefox, Linux
Tagged as , , ,

Building Firefox on Linux is actually pretty easy. It used to be a bit harder with earlier versions of Firefox, but since Gecko 5.0 it’s not hard at all.

Since we are building on BackTrack 5, which is a Debian offspring, we more or less need to follow the instructions on building Firefox on Ubuntu. Some details about that can be found at Simple Firefox build. As you will see later, the only tricky part is to get all the required packages for the build process.

Read More »

Resizing a Linux Partition (Running in VirtualBox)

18
Filed under IT, Linux, VirtualBox
Tagged as , , , , ,

I was recently setting up a new test environment (BackTrack 5) inside a VirtualBox VM. Half way down the road of my project I realized that I was way to stingily with the amount of space I assigned to the virtual drive. Well, I thought no problem – I am going to enlarge the virtual drive. The steps would be easy:

  1. Enlarging the virtual drive
  2. Enlarging the partition holding the root file system with parted
  3. Enlarging the file system with resize2fs

Easy in theory. In reality it was still a little bit tricky.

Note, that everything that I describe in steps 2 and 3 also applies to a real linux machine. Step 1 is only necessary, because I happened to work inside a VM. On a real machine, step 1 would be something like copying the data of the old physical  drive onto a newer bigger drive with dd or the likes.

I also realize that there may be more professional programs like partition magic, which would have saved me some trouble. But I wanted to make it work right here and there with the things I had at hand. Which was parted. Or even the plain old fdisk would have done I guess.

It also goes without saying, that before you do things like this, that you need to make a backup if the data is of any value to you at all.

Read More »