Weekly security week wrapup 23 and 24

It’s been two weeks since the weekly security wrapup, which makes ‘weekly’ a rather week term. Lots of excuses I could utter, but they’re all saying: “been busy”, which is another way of saying “I decided that other things were more important to do”. However, here we go again.

Cheap GPUs are breaking passwords faster

Obviously, they’re good at doing stupid things fast(er), and cracking passwords is about the stupidest task possible for a computer. However, for some of the strong stuff out there, like truecrypt, it does not really matter.  Truecrypt, for instance, has a rather slow initialization routine, which takes about 10ms on an average processor, which means you can check 100 passwords/sec. If a CUDA implementation were to increase that 1 million times (10^6), you can check 10^8 passwords per second. But if you have a 10 char password (upper/lower/digits), there are roughly 10^17 possibilities. Checking 10^8 passes/s means it takes 10^17/10^8/2 ~= 10^8 seconds. Which is another way of saying 76 years. That’s longer than the average time it takes for a disk to disintegrate by itself, last time I checked. Still, using CUDA to speed things up is quite cool.


Mac Reversing: Starter’s guide

I’ve found this article on (OSX) malware analysis for beginners. It talks you through the beginning of using IDAPro and how to start analysing it. It’s excellent, but you need to keep paying attention, or you loose track quite easily.


Electric car trouble

And we’re not talking about the trouble you have driving your new electric Nissan Leaf and looking for a place to have lunch, dinner and a nap before your car is charged up. No, we’re talking about the car’s builtin firmware’s RSS reader telling all servers your current location, speed and whether you have the aircon on. That’s not funny.


Weekly security week wrapup 22

Intercepting skype

Intercepting skype in transit is quite complicated. The ‘oracle’ needed to decode the signalling traffic is quite well known and understood, resulting into legible signalling information. The primitives used in the user-to-user voice traffic are also well known, but this knowledge does not gain you any understanding of the contained traffic. Knowing you’re looking at AES and RSA doesn’t make it any more fun to start cracking.

This week we also heard some news that a Russian reverse engineer, Efim Bushmanov, has been able to reverse engineer skype to the point where it should become possible to write your own (open source perhaps) skype client. Skype (being aquired by Microsoft, conspiracy theorists unite, but that’s a different topic) does not like this one bit and brought in the big lawyers to tell Efim that he was violating the EULA.

But there are other ways to gain access to the traffic: intercept at the end-point, where the traffic has been decrypted for you. This article in the wall street journal describes quite detailed how the Egyptian government has been using this method to intercept traffic of young dissidents.

Lockheed Martin breach

All over the news: Lockheed Martin has been breached because it used the RSA tokens that had been compromised a couple of weeks before that. LM has the resources to actually detect a compromise like that, but there are way more small companies that use RSA tokens. How are they going to handle it? This is not the last breach we’ve seen that’s caused by the broken RSA tokens.

Lowcost USB Bluetooth sniffer

This is so nice, and it’s NFH (Nice for Hometinkering)-appeal is big. A small usb bluetooth sniffer, ehm, bluetooth monitor. Ordinary bluetooth devices are very difficult to get in a monitoring mode and other commercial bluetooth monitoring tools cost you an arm and a leg and your soul. This one is selling for under 100 GBP, and you can make it more cheaply if you can solder, which I cannot.

Pentester’s cheat sheet

If you’ve been doing pentesting, one of the goals is to get a shell on the machine. This article lists a number of methods to (ab)use common tools to get the shell working. It’s a nice cheat sheet.

Building Boost-Graph-Library with Python

Today I finally found why bgl-python wasn’t building, there was a three-line buglet in boost/graph/astar_search.hpp found by Andy Tompkins. By applying his patch to astar_search.hpp (and including it in the bgl-python codebase, it builds without errors (only some strict-aliasing rule warnings remain).

Best is: it also compiles on Mac OS X 10.6.3 with XCode 3.2.1

But, so far I must say I really hate bjam as a building tool. I’m seriously considering going with cmake as build system. Any opinions whether or not that’s a good idea?

OpenWRT 8.09.2 and ipv6

After spending quite some time with the firewall rules inside the openwrt kamikaze 8.09.2 installed on my Linksys WRT54GL, I thought that posting the end result might be handy for others.

  • step 1, install the following packages: ip6tables, kmod-ipv6, radvd, 6scripts.
  • step 2, change the following line in /etc/init.d/6tunnel
    ip tunnel add $tnlifname mode sit remote $remoteip4 local $localip4 ttl $ttl

    ip tunnel add $tnlifname mode sit remote any local $localip4 ttl $ttl

    because if you don’t the outgoing packets are to remoteip4 (, but the incoming packets are from That’s not handled properly somewhere inside the kernel/firewall/ip6tunnel config. You can see this is happening by the “ICMP protocol 41 unreachable” messages back to

So, what goes into /etc/config/6tunnel:

config 6tunnel
option tnlifname ‘6tunnel’
option remoteip4        ''
option localip4                <insert your ipv4 address>
# convert your external ipv4 address into 8 4-nibble hex digits
option prefix                ‘2002:<hex variant of ipv4>:1::1/64’
option localip6                “2002:<hex variant of ipv4>::1/16”
option ttl                64

And the last step is adding a rule admitting ipv6 packets in (/etc/config/firewall)

config rule
option '_name'                ‘6tunnel’
option src                wan
option proto                41                # ipv6
option target                ACCEPT

And just to have everything documented, this is a sample firewall script for protection of your ipv6 stuff:

# Copyright (C) 2006 OpenWrt.org
ip6tables        -F
ip6tables        -X
ip6tables        -t mangle -F
ip6tables        -t mangle -X
# Allow everything on loopback.
ip6tables        -A INPUT -i lo -j ACCEPT
ip6tables        -A OUTPUT -o lo -j ACCEPT
ip6tables        -P INPUT DROP
ip6tables        -P OUTPUT DROP
ip6tables        -P FORWARD ACCEPT
# Accept only stuff incoming if there's a SYN in there.
# We really want ESTABLISHED, RELATED, but unfortunately that's not supported (yet) in ip6tables
ip6tables        -A INPUT -i $PUBIF -p tcp ! --syn -j ACCEPT
ip6tables        -A INPUT -i $PUBIF -p ipv6-icmp -j ACCEPT
ip6tables        -A OUTPUT -o $PUBIF -p ipv6-icmp -j ACCEPT
ip6tables         -A INPUT -i $PUBIF -p tcp --dport 80 -j ACCEPT # accept HTTP
ip6tables         -A INPUT -i $PUBIF -p tcp --dport 22 -j ACCEPT # accept SSH
ip6tables         -A INPUT -i $PUBIF -p tcp --dport 25 -j ACCEPT # accept SMTP
ip6tables        -A INPUT -i br-lan -j ACCEPT
ip6tables        -A OUTPUT -o br-lan -j ACCEPT
ip6tables        -A INPUT -i $PUBIF -j LOG
ip6tables        -A INPUT -i $PUBIF -j DROP

Capturing without being root

It is sometimes necessary to capture the content of network traffic. Most people use a tool like wireshark or tcpdump to do that. Since these tools have the need to listen in promiscuous mode to the network interface, most people run them as root. Wireshark has had a lot of vulnerabilities in the code, which is unavoidable with the enormous amount of protocols being supported by reverse engineering. They have taken steps in the past to mitigate the impact of vulnerabilities by using a separate tool, dumpcap, which has a much smaller and simpler codebase.

Still, most people run wireshark as root, ‘because then it works’. Right, Gerald Combs has written an article on how to configure your system with capabilities so you don’t have to run wireshark as root any more. It works by granting users you want to be able to capture, the capability of being able to capture. That simple.

Building Boost/Python/Graph library

There’s a nice library called bgl-python which can be used to handle graph related problems in python using the, in my opinion, good quality code of the boost graph library. However, bgl-python does not seem to be maintained anymore, which is quite a pity.

Following one of the comments on this blog, I tried to get bgl-python to compile and I got everything compiling with boost-1.42.0, except for one file, astar_search.cpp, which fails with an error message of roughly 50k. Yes. One error: 50k of tekst, it’s got to be C++. The offending line, property_map.hpp:325 looks fine to me:

static_cast(pa)[k] = v;

The problem appears to be in the [k], which, for some case, is a void* instead of unsigned int. I can understand that’s a problem, but I’m currently at a loss why this is happening.

To be continued…


Nothing so far has worked, astar_search keeps getting the compile error. Any ideas are welcome!

Building boost on Mac OS X 10.6

Today I finally had the time to verify that the problems building boost on Mac OS X 10.6 aka Snow Leopard using the compiler enclosed in XCode-3.2 were over. And indeed, building boost 1.42.0 is a nobrainer: just unpack and build.

I’ve built it with these options:

bjam --build-dir=../boost_build --layout=versioned toolset=darwin architecture=combined address-model=32_64 link=shared,static stage