Problems with automatic SpamAssassin rule update (sa-update)

After updateing my Gentoo box after a long time with no updates, everything was running fine until the next morning, when my SpamAsassin rule update cronjob was executed. This job essentially executes sa-update && /etc/init.d/spamd reload .

The message was something like this:

http: GET http://spamassassin.apache.org/updates/MIRRORED.BY request failed: 501 Attempt to reload LWP/Protocol/http.pm aborted.
Compilation failed in require: 501 Attempt to reload LWP/Protocol/http.pm aborted. Compilation failed in require
error: no mirror data available for channel updates.spamassassin.org 
channel: MIRRORED.BY contents were missing, channel failed

At first glance this looks like a problem with the given URL, but wget was able to download the file just fine. So I took a closer look at the message and noticed, that the problem came from http.pm, a Perl module.

Perl was probably updated during during my last emerge world, so I expected a broken package. I took a list at the installed perl packages (eix -I perl  is very helpful) and reemerged the one I thought was interesting (dev-perl/libwww-perl). But that did not help as well.

I then stumbled across the tool perl-cleaner, that can be used to rebuild packages for old versions of perl, that are broken. After calling perl-cleaner modules sa-update was running fine again.

Courier-imap not working because of broken symlinks in /etc/ssl/certs

Yesterday I updated a gentoo box and after that no more SSL and TLS connections with courier-imap were possible.

The log had some entries of the type
imapd-ssl: couriertls: /etc/ssl/certs/e1213163.0: No such file or directory

The file mentioned linked to
21 Apr 15 14:47 e1213163.0 -> signet_rootca_pem.pem

The CA cert of signet was removed for some reason, but the symlink wasn't. This is a hard error for courier for whatever reason. It stopped working without a good error message.

To fix this just run
find /etc/ssl/certs -type l ! -xtype f ! -xtype d -ok rm -f {} \;

This will remove all dead symlinks in /etc/ssl/certs

USBF iCTF

Am 22. März habe ich am USBF iCTF, einem Capture the Flag Hackercontest teilgenommen. Den Teams wurden identische virtuelle Server gestellt, auf denen bestimmte Dienste liefen. Für drei Bereiche gab es Punkte:

  • Angriff: Es ging darum in den Diensten Schwachstellen zu finden und Exploits zu schreiben, die diese Schwachstellen ausnutzen. Diese Exploits mussten eingereicht werden und wurden dann von der Wettbewerbsleitung gegen die Server der anderen Teams ausgeführt. Die Exploits konnten entweder ein Flag (was nicht weiter definiert war, aber meistens ein leicht zu erkennendes Datum war) zu klauen oder den Dienst komplett lahmzulegen.
  • Verteidigung: Die in den Diensten gefundenen Schwachstellen sollten gepatched werden, damit die von den anderen Teams entwickelten Exploits nicht mehr funktionierten. Dabei darf sich das Verhalten der Dienste nach außen nicht verändern.
  • Erkennung: Angriffe von anderen Teams auf dem eigenen Server sollten erkannt werden.

Ich habe während des Wettbewerbs einen Dienst analysiert. Dieser hieß "Nuclearboom" und stellte ein Interface zur Verwaltung von Kernkraftwerken dar. Ich werde meine Arbeit an diesem Dienst in diesem Blogbeitrag beschreiben Continue reading