Home > admin-stuff > Do-it-yourself WiFi Catcher

Do-it-yourself WiFi Catcher

Sun Aug 01 2010 02:00:00 GMT+0200 (Central European Summer Time)

Ever had to track down a client devices in an area covered by many (unmanaged) WiFi Access Points?

If tools like kismet/kismac are not working for you to track computers (e.g. because of unsupported hardware, crashes, bad wifi antenna on your laptop, then just build it yourself.

All you need is a flashable consumer-level wifi access point (like a Linksys WRT54) and flash it with dd-wrt. This can put the router in monitor mode and together with the addon wi-viz you get an overview over all wireless activity.

And in case you want it mobile, simply put a bunch of batteries, e.g. 8 AA batteries with 1.5V each in a row and connect it to the router. Finally connect your laptop with an Ethernet cable, stuff everything in a little bag and walk around. If you know the MAC address of the devices your are looking for (laptop, handheld,...) just see very you have the strongest signal and walk in that direction. And voilà, you are able to geographically localize every WiFi device. Regardless of it's connection to a specific access point. Welcome wiFi Catcher. Welcome Jack Bauer.

Mehr Höhenmeter gehen nicht

Wed Dec 30 2009 01:00:00 GMT+0100 (Central European Standard Time)

Zumindest nicht für mich. In einem Tag von Meereshöhe auf den El Teide (mit 3718m) zu laufen, ist nicht besonders zur Nachahmung empfohlen. Aber auch irgendwie cool und wahrscheinlich auf lange Zeit mein persönlicher Guinessbuch-Eintrag.

SSH tunnel Quickie

Tue Oct 13 2009 02:00:00 GMT+0200 (Central European Summer Time)

Sometimes I prefer to have a private (read secure and non-observable) web connection - being a developer and admin makes you a bit more paranoid...

So how can you establish a connection that besides from being non-observable may also bypass potential content filters or firewall rules? Of course with a simple SSH tunnel: ssh -D 8080 -C -q -N user@server   (-f to put it in background?)

Now simply configure your browser to use the SOCKS proxy running on your localhost at port 8080 and off you go.

The drawback is, that you need a Unix server outside to connect to. But who has not such a system somewhere? And even if not by now, maybe just go in the clouds.

And for those unlucky guys running Windows and PuTTY: even you could do that.

Update: It seems like SSH can even be misused to tunnel Remote Desktop connections. This might do the trick:

sudo ssh -D 8180 -p 8999 @  -L

Amerikanisches MacBook mit deutschen Umlauten

Sun Sep 13 2009 02:00:00 GMT+0200 (Central European Summer Time)

Wie bringe ich einem amerikanischen Mac mit englischer Tastatur unsere heiß-geliebten deutschen Umlaute bei?

Darüber ist schon (zu?) viel geschrieben worden, also darf ich jetzt auch mal ran. Ich erspare mir hier eine ausführliche Auflistung möglicher Gründe, warum man als Kraut ein solches Gerät überhaupt hat (Software-Entwickler, Firmenangestellter, @, Ausnutzung von Währungsvorteilen).

Universell kann die Tastenkombinationen ⌥-u (option-u) gefolgt von dem jeweiligen Umlautbuchstaben benutzt werden, um landes-spezifische Umlaute einzugeben. Ein ⌥-u U erzeugt also ein Ü. Ferner bringt ein ⌥-s das ß hervor.

Mir ist das aber noch zuviel Getippe. Mit Ukulele habe ich mir die Tasten a, o, u, A, O, U in Verbindung mit der option Taste so umbelegt, dass Umlaute ohne Umweg über option-u direkt mittels ⌥-a, -o, -u, -A, -O, -U eingeben werden können.

Und weil so schön einfach ist, kommt das gleich noch auf ⌥-e.

Stop a long running shell/bash process after timeout

Thu Sep 10 2009 02:00:00 GMT+0200 (Central European Summer Time)

Sometimes a process should just run for a maximum amount of time. A nightly long network transfer, a backup, or a statistical report shouldn't accidentally run until next business hours. A watchdog timer which kills a process once a certain time has passed by is needed. As usual in Shell programming multiple ways are possible, all of them have certain drawbacks. The simplest one would be just to call the long running process in the background and capture its PID. But then it is not that easy to capture the return value of it. Here is my shot with an additional at job:

TIMEOUT=1 # in minutes

# Install at job as watchdog to remove long running process
WATCHDOG_CMDFILE=/tmp/`basename $0`-$MY_PID
echo "# watchdogfile script" > $WATCHDOG_CMDFILE
echo "kill -0 `echo $MY_PID` 2>/dev/null" >> $WATCHDOG_CMDFILE
echo "if [ $? -eq 0 ]; then" >> $WATCHDOG_CMDFILE
echo "  ps -o pid= --ppid `echo $MY_PID` | xargs kill" >> $WATCHDOG_CMDFILE
echo "  echo "long running process aborted because it ran too long"" >> $WATCHDOG_CMDFILE
echo "fi" >> $WATCHDOG_CMDFILE

# Start my very sophisticated long running task
sleep 3600 # 1 hour

# do whatever you normally do after the long running process finishes
echo $RET

(Note that at sends out emails with the stdout/stderr. If you have another notification method to indicate an aborted job, ensure that nothing is printed to std & stderr.)

Summit-Sammlung: Mt. Humphreys

Sun Aug 23 2009 02:00:00 GMT+0200 (Central European Summer Time)

Okok, anspruchsvoll ist er ja nicht, der Mt. Humphreys von den San Francisco Peaks in Arizona. Die 1000-irgendwas Hm lassen sich mit etwas Muehe in knapp 2 Stunden bewaeltigen. Aber dann hat man auf 3850 m einen ganz gewaltigen Rundumblick; Grand Canyon eingeschlossen...

Warmduscher koennten auch ein wenig abkuerzen, indem die lokale Sesselbahn den Weg auf den hoechten Gipfel von Arizona vereinfacht.

Enough birthday stuff

Sun Jun 28 2009 02:00:00 GMT+0200 (Central European Summer Time)

Finally I solved all my struggles with my birthdays calendar at once. I just changed my OS... No more homegrown VBA macros to get what I want from Outlook.

Although I have to admin that even iCal and Addressbook from MacOS are not capable to manage more than 1 birthday per contact out of the box. But Birthday Scanner X comes to the rescue. And it's free.

If you're still interested in my Outlook macros and have problems, let me know. I will be mercy...

ERb’in "ActionMailer fixtures" Up

Tue Jun 16 2009 02:00:00 GMT+0200 (Central European Summer Time)

I don't know if my slightly outdated Rails 2.2.2 is the problem. But unlike in the fixtures for normal unit tests, I can't use ERb for my ActionMailers templates.

Add this method to your ActionMailer::TestCase to let ERb pre-process your fixtures:

def read_fixture(action) 
	a = super 
	template = ERB.new(a.join) 

Outlook-iPhone birthday synchronisation

Sat May 30 2009 02:00:00 GMT+0200 (Central European Summer Time)
  • Not satisfied with the way Outlook (2003) handles birthdays and anniversaries?
  • Want to have multiple birthdays just for one contact entry (maybe because you have one contact for a family, but want to track the birthdays of the countless kids)?
  • Do you need to control the reminders for the birthdays?
  • Wish you had the classical Palm solution (Feiertage) for your iPhone or iPod touch?

Yippee! Macro time - (again)!


Add multiple birthdays to the notes of your contact and create proper recurrent events. Basically enter for every birthday you want to track for this contact in a new line with the format GEB Name: 24.12.2000 (Note the European style date format day.month.year and the prefix GEB (german abbreviation for Geburtstag = birthday)). Simply add all of your birthdays or anniversaries to your contacts, run the macro, and of you go. For more details see the linked docu.


Remove all (automatically) created recurrent events (e.g. for cleanup purpose)

And if your Outlook asks you for every single modification for allowance, use Advanced Security for Outlook to suppress those questions.

If you are interested: This is all my knowledge about the way Outlook 2003 handles it's standard birthday field:

  1. While saving the current contact Outlook automatically creates a new yearly recurrent event for birthdays and anniversaries.
  2. Sometimes this series is created, even if an existing entry is simply modified. E.g. if you change parts of name, then Outlook seems to consider this a new entry and creates a new recurrent event. Of course without removing the old event...
  3. Even just change an existing birthday or anniversary and Outlook doubles the event as the old one is not removed.
  4. You can see the list of all associated events of a contact in the tab activities. (Therefore somehow the calendar entries are linked with the contact.
  5. There is (sometimes?) a dedicated and predefined calendar view for yearly events.
  6. Besides those small caveats the major drawback is that there is no easy and reliable way to have more birthday entries per contact (not taken into account that you could misuse the concept and iterativly overwrite the birthdays and rename the contact to create multiple recurrent events).


May 30th, 2009 at 21:04 | #1Reply | Quote

BTW: Sometimes my birthday entries in the calendar are going from 23:00 one day before the birthday up to 23:00 at the birthday (instead of occupying just the whole day). Why is it like that?

  • Timezone?
  • Daylight saving time?
  • 42?


May 30th, 2009 at 21:56 | #2Reply | Quote

And just another hint. Maybe you want to use Outlook for your calendar stuff, but not really as your mail program.

Not a really good thing to do as Windows allows only to set one mail program system-wide via the MAPI interface. So one for all users and all purposes.

Give DefaultMail (http://windowsxp.mvps.org/defaultmail.htm) a try as this at least has a convenient way to change the MAPI default and introduces a per-user default MAPI policy.

No remote root logins (even with SSH)

Tue May 19 2009 02:00:00 GMT+0200 (Central European Summer Time)

OK. Not really "Programming stuff" anymore. But still important:

Don't allow remote root logins at all, even with SSH

Why not? Because:

  • User name of root is known, therefore the account is vulnerable for brute-force attacks
  • Working as root should be an explicit switch and not the default policy. Just like being aware of switching hats.
  • Bad for auditing, if multiple users have root access.

But now you say: "I don't care as I use SSH for logins".

  • Depending on the auth method, password is still transfered over the wire.

  • But using public key auth instead of passwords might be even worse. Still you have to trust all(!) clients that the private key is stored safely. Read:

  • "Good enough" passphrase.

  • There is no way to tell from the public key (which is the only thing known by the server), if the private key has a passphrase at all.

  • Trust the client system (that it is not compromised)

  • Auto lock of the client system must be enabled after a few minutes of inactivity.

  • Sensible use of background daemons like ssh-agent or Pageant(Putty for Windows) on client systems necessary. What if the users start the keyring app, enters his passphrase and never shuts down his system. And now imagine a laptop running out-in-the-wild without any local password protection having an open private key in its memory!

What to do? Dunno. Maybe:

  • Use "ordinary" user accounts
  • SSH with either public key or passwd auth (depending on your decisions reg the previous points)
  • Enforce sudo (better) or su (less better) to gain temporarily root privileges

Anything else???

Comments are closed.