Bürger- und Freiheitsrechte in Europa sichern!

Support EDRi.orgMOGiS

Interesse an einem netzpolitischen Treffen in Rostock?
Webseite & Infos: http://npbhro.de  | auf Twitter folgen: #npbhro

You are here

Exim

Getting hit by a spammer with Exim

Yesterday I was warned by Nagios that something is going on with my server. The number of processes has been gone beyond the limit. The reason for this were a bunch of Exim processes trying to deliver a lot of mails. Apparently a spammer made it happen to send spams via my server. How could this happen?

I was seeing a lot of those log entries: 

2010-06-28 16:29:25 1OTFKt-0004cZ-1R <= vsvc@euhu.com H=(qknlvj.com) [58.212.194.230] P=esmtpa A=cram_md5:inna S=1455 id=0ec5ff00b06c43369e2582fc4269839e@e12c17c51ec546bf9e7a23e6f9875941
2010-06-28 16:29:27 1OTFKw-0004cZ-KZ <= ebms@ylmdbm.com H=(qknlvj.com) [58.212.194.230] P=esmtpa A=cram_md5:inna S=1520 id=58913c34bde64e908310db7e1280eff5@2dc8ed5998b64e8485c472cae5ef98c3
2010-06-28 16:29:28 1OTFKy-0004cZ-1p <= wiyscy@hegyogz.com H=(qknlvj.com) [58.212.194.230] P=esmtpa A=cram_md5:inna S=1436 id=814a7bdcbe85447a9283d4a0a074830b@0ada3cde4a4c41c38c65bc912639afb6

Apparently the spammer has successfully found a way to bypass the authenticators in Exim. By default only authenticated users can send mails via my mailserver, of course. But this spammer found a way around that problem. A user "inna" is not known, so the spammer shouldn't be able to send mails at all. But he can. Something is broken apparently.

The spammer sent an empty password ('') and the database didn't find an user by this name and returned an empty resultset (''). Both sides of the comparison matches and the mail is allowed in. Let's have a look at my Exim config: 

cram_md5:
  server_debug_print = "running smtp auth $1 $2"
  driver = cram_md5
  public_name = CRAM-MD5
  server_secret = ${lookup pgsql{select clear from passwd where passwd.usr='$1' limit 1}{$value}}
  server_set_id = $1

On #exim@freenode there was just another user with the very same problem with exactly the same spammer. Apparently the lookup is true for empty passwords or users. The solution is to add a "fail" in the lookup statement: 

server_secret = ${lookup pgsql{select clear from passwd where passwd.usr='$1' limit 1}{$value}fail}

That's pretty all to do to prevent the spamming. But how could this happen at all? Back then when I was configuring my mailserver (around 2003 or so) I can remember that I tried a "fail" statement in the server_secret as it is described in the Exim documentation, but it didn't work as expected. So I ended up with no "fail". This worked fairly well over the years and I remember that I tested this lookup by trying to send with user/password combinations of all different sorts. So it went into "production".

Apparently it doesn't work anymore today. The other guy on the #exim channel said that he found no database lookup example with "fail" at all. Even the example in one of his books was without "fail". So I believe that something changed either in Exim or in PostgreSQL to make submitting an empty password string a positive match for bypassing authentication nowadays.

For the records: the spammer send approx. >10.000 mails. Another bunch of 8000 mails were rejected, but this is just slightly over the daily average.

Kategorie: 
 

Spamassassins spamds memory usage

Da ich ja durchaus schon früher über meine tollen Erlebnisse mit Alice-DSL berichtet habe, möchte ich das nun fortführen. Der Grund für das neuerliche Alice-DSL ist übrigens die Zweitwohnung in Berlin aufgrund des neuen Jobs in Berlin.

Naja, wie auch immer. Nach der Online-Bestellung gestern, bekam ich nun heute eine Email von Alice, daß noch die Daten des Vormieters fehlen würde, also Name und Telefonnummer und daß ich die fehlenden Daten im Kundenbereich im Web nachtragen könnte:

Das lustige dabei ist, daß oben steht, Name und Telefonnummer solle man nur eintragen, wenn man sie sicher kennt. Ansonsten solle nichts eintragen. Da ich weder Namen noch Telefonnummer vom Vormieter kenne, hab ich also brav nichts eingetragen und auf Weiter geklickt. Daraufhin kam dann der Hinweis hinzu, daß Name und Telefonnummer Pflichtfelder seien, also ausgefüllt werden müssen.

Testet Alice ihr Webinterface auch irgendwie mal?

Kategorie: 
 

Exim4 & Entropy

Nachdem ich ja schon letztens mein Unmut über die unsäglichen TetraPak-Verschlüsse geäußert hatte, ereilte mich das Schicksal erneut und ich wurde mit deren Unzulänglichkeiten belästigt...

Hier wie sich die Packung in etwa vor meinem Versuch des Öffnens präsentiert hat:

TetraPak vor dem Versuch des Öffnens

Nachdem ich aber den Verschluß nur gaaaanz leicht berührt hatte, war schon klar, daß das nichts mehr werden würde. Letztendlich sah es dann so aus:

TetraPak nach dem Versuch

So blieb mir mal wieder nichts anderes übrig, als die Verpackung an der hochgeklappten Lasche aufzuschneiden. Immer noch die beste, einfachste und sauberste Variante, eine TetraPak-Verpackung zu öffnen! :-)

Kategorie: 
 

Pages

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer