Older blog entries for argp (starting at number 20)

19 Nov 2008 (updated 12 Dec 2008 at 09:53 UTC) »

kernel stack-smashing protection in freebsd-8.0-current-200811

Stack-smashing detection and protection for the kernel has been enabled by default in the latest snapshot of FreeBSD 8.0-CURRENT (200811). This was accomplished by utilizing the incorporation of SSP (also known as ProPolice) in gcc version 4.1 and later (the 200811 snapshot uses gcc 4.2.1).

Specifically, src/sys/kern/stack_protector.c, which is compiled with gcc's -fstack-protector option, registers an event handler that generates a random canary value (the ``guard'' variable in SSP terminology) placed between the local variables and the saved frame pointer of a kernel process's stack during a function's prologue. When the function exits, the canary is checked against its original value. If it has been altered the kernel calls panic(9) bringing down the whole system, but also stopping any execution flow redirection caused by manipulation of the function's saved frame pointer or saved return address.

In contrast to StackGuard and StackShield (or even Microsoft's /GS), SSP has been effective against attacks aiming to directly bypass it. This relates to research I have done in the near past on the subject of kernel stack-smashing attacks. However, SSP can be indirectly bypassed by several methods, for example heap overflows, integer and/or signedness vulnerabilities, and stack overflows on buffers smaller than 8 bytes, among others.

privilege vs. permission

The majority of published papers and articles on the area of information security use the terms privilege and permission interchangeably. Even Wikipedia's entry on privilege seems to follow this practice. However, one of the foundations of dynamic trust management is the clear distinction between an entity's privileges and its permissions.

A privilege is an authority given to an entity that approves a specific operation on a specific resource. For example, an entry in an Access Control List (ACL) specifies a privilege, not a permission. A permission, on the other hand, is a value reached when an entity's privileges, as well as other of its attributes, are evaluated. Therefore, the fact that an entity has been granted a privilege does not necessarily mean that it is able at a given time to perform the specified operation on the specified resource.

The dynamic trust management system æther I have designed and implemented as part of my Ph.D. provides an example of using this distinction between privilege and permission in practice.

20 Oct 2008 (updated 7 Nov 2008 at 10:23 UTC) »

linksys wrt54gl resurrection

Last week I was experimenting with various changes to OpenWrt Kamikaze version 7.09 on my Linksys WRT54GL wireless router. The objective was to modify the Kamikaze firmware for WRT54GL in order to implement a rogue access point for use in various penetration testing contracts. I decided to start the whole endeavor since the Airsnarf Rogue Squadron firmware only supports the WRT54G model. After a lot of successful firmware flashings during testing, I eventually (and perhaps unavoidably) flashed my router with a corrupted firmware. The result was a dead WRT54GL that was not replying to pings, not even after a hard reset.

To resurrect it I followed void main's WRT54G revival guide. Although the guide was written for the WRT54G model, it is mostly applicable to WRT54GL as well. One of the main differences is that I had to short pins 16 and 17, not 15 and 16 (see the photograph):


A rather important tip is that right after a successful flashing you should always enable the boot_wait NVRAM option in order to be able to use the TFTP bootloader. This will save you a lot of time if you are in the edit-compile-upload firmware-debug cycle.

Final note: I was triumphant and there was much rejoicing indeed.

11 Sep 2008 (updated 25 Mar 2009 at 18:48 UTC) »

ελληνικός ιστός εμπιστοσύνης (ενημέρωση)

26 Aug 2008 (updated 25 Mar 2009 at 18:49 UTC) »

διαγραμματική παράσταση του ελληνικού ιστού εμπιστοσύνης (ενημέρωση)

11 May 2008 (updated 25 Mar 2009 at 18:50 UTC) »

διαγραμματική παράσταση του ελληνικού ιστού εμπιστοσύνης

Μετά τη συνάντηση της 23 Απριλίου στη Θεσσαλονίκη αποφάσισα να δημιουργήσω (και να συντηρώ) τη διαγραμματική παράσταση του ελληνικού ιστού εμπιστοσύνης. Προφανώς το εγχείρημα αυτό απαιτεί μεγάλο όγκο αρχικών δεδομένων και αυτοματοποίηση της διαδικασίας δημιουργίας του γράφου. Τη δεύτερη απαίτηση την ικανοποίησα με ένα απλό Perl πρόγραμμα μεγέθους μερικών δεκάδων γραμμών το οποίο κάνει χρήση του προγράμματος sig2dot.pl ως βιβλιοθήκη.

Για την ικανοποίηση της πρώτης απαίτησης μπορείτε να συνεισφέρετε στέλνοντάς μου στη διεύθυνση argp at domain cs.tcd.ie το αποτέλεσμα της εντολής gpg --list-sigs > $USER.txt.

Κάποια πρώτα αποτελέσματα υπάρχουν παρακάτω. Η πρόσφατη συνάντηση στη Θεσσαλονίκη είναι εμφανής στο πάνω δεξιά μέρος του γράφου.

συνάντηση για συλλογή/ανταλλαγή υπογραφών σε pgp/gpg κλειδιά

Την Τετάρτη 23 Απριλίου του 2008 στη Θεσσαλονίκη θα διεξαχθεί συνάντηση για συλλογή/ανταλλαγή υπογραφών σε pgp/gpg κλειδιά. Για τη συμμετοχή σας θα χρειαστείτε κάποιο επίσημο έγγραφο που να πιστοποιεί την ταυτότητα που αντιστοιχεί στο κλειδί σας, και αρκετά αντίγραφα από το ψηφιακό δακτυλικό αποτύπωμα του κλειδιού σας και του ονόματός σας γραμμένα σε χαρτί.

Περισσότερες πληροφορίες για τη διαδικασία που θα ακολουθηθεί υπάρχουν εδώ.

Το ακριβές μέρος και η ώρα θα ανακοινωθούν μέσα τις επόμενες μέρες.

ελληνικός ορθογράφος για το vim

Δυστυχώς η τελευταία έκδοση του vim δεν συμπεριλαμβάνει ελληνικό λεξικό για τον ενσωματωμένο ορθογράφο του. Ευτυχώς μπορούμε πολύ εύκολα να δημιουργήσουμε ένα χρησιμοποιώντας το ελληνικό λεξικό που παρέχει το OpenOffice:

$ cd ~/
$ wget http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries/el_GR.zip
$ unzip el_GR.zip

Στη συνέχεια κάνουμε εκκίνηση του vim, και δίνουμε την παρακάτω εντολή:

:mkspell el ~/el_GR

Αφού έχουμε κλείσει το vim βλέπουμε ότι έχει δημιουργηθεί το αρχείο ~/el.utf-8.spl, το οποίο πρέπει να μεταφερθεί στον κατάλληλο κατάλογο:

$ mkdir -p ~/.vim/spell
$ mv ~/el.utf-8.spl ~/.vim/spell
$ rm -f el_GR.aff el_GR.dic el_GR.zip README_el_GR.txt

Από εδώ και πέρα τα πράγματα είναι απλά. Ο τρόπος με τον οποίο θα χρησιμοποιηθεί ο ελληνικός ορθογράφος κατά τη χρήση του vim είναι θέμα προσωπικής προτίμησης. Για λόγους πληρότητας παραθέτω παρακάτω τις συναφείς σειρές του ~/.vimrc αρχείου μου (τα λεξικά en_us και en_gb συμπεριλαμβάνονται στο vim):

map <F8> <Esc>:setlocal spell! spelllang=el<CR>
map <F7> <Esc>:setlocal spell! spelllang=en_us<CR>
map <F6> <Esc>:setlocal spell! spelllang=en_gb<CR>
13 Mar 2008 (updated 25 May 2008 at 08:12 UTC) »

usenix proceedings

All USENIX-sponsored conference proceedings were in the past freely available, except those of conferences held in the last twelve months. Those were only available to USENIX members. Today, USENIX announced that they are making all their conference proceedings freely available to everyone.

This is going to be very helpful for all researchers, although I don't think that there are many people interested in any area of systems research that are not USENIX members already. In any case, I hope that ACM, IEEE and Springer/LNCS proceedings become freely available as well (but somehow I doubt it).


Huskarl is the product of a final year B.Sc. project that I have co-supervised. Dragomir Penev has investigated the past and present attacks against Bluetooth's authentication and key exchange mechanisms, and has developed an alternative solution based on public key cryptography.

The new protocol utilizes symmetric and asymmetric cryptography to authenticate two Bluetooth devices, in a way similar to the very popular Secure Shell (SSH) protocol. There is no dependency on any kind of shared secrets (e.g. PINs), or other data exchanged between the devices in plaintext. Symmetric encryption is used to reduce the load that a purely asymmetric protocol would have.

The detailed message exchanges and a performance analysis of Huskarl can be found in the published paper. In this post I will discuss the choice behind Huskarl's underlying security model, as this was my major contribution to the project.

As in the case of the SSH security model, Huskarl avoids reliance on any kind of infrastructure in order to introduce previously unknown Bluetooth entities by weakening the traditional threat model that assumes a universal omnipresent adversary. In Huskarl the bindings between digital identities and public keys are established by

  • assuming that the first time a connection happens no attacker substitutes a legitimate participant's key with his own, or
  • via an out of band channel.

The first approach makes the protocol vulnerable to man-in-the-middle attacks on the first channel establishment between two communicating Bluetooth entities. Although initial exchanges constitute a very small percentage of a network's total traffic, there are no guarantees that they will not be compromised. However, in the case that an attacker manages to perform a man-in-the-middle attack in an initial exchange between a pair of Bluetooth devices, he then needs to be present in every subsequent channel establishment between the specific pair. Otherwise, the devices will notice that the public key of the other party has changed and therefore know that either the initial or the current exchange has been compromised. The devices can then abort the communication and remove the offending public key from their key database, or act according to some other locally defined policy.

The second approach, i.e. the existence of an out of band channel, may not be as far fetched as it initially appears. Near Field Communication (NFC) is a new very short range wireless connectivity protocol that evolved from a combination of existing contactless identification technologies. There are mobile phones currently available on the market that have NFC capabilities, for example see the Nokia 6131 NFC. As this, and other similar technologies, become widely adopted, security protocols operating along the design choices of Huskarl will be the preferred choice to other costly and centralized approaches.

Huskarl's prototype implementation was developed on Linux using the BlueZ Bluetooth protocol stack and OpenSSL. It is published under GPLv2 and is hosted on SourceForge.

11 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!