Apache

In letzter Zeit häufen sich mal wieder die Angriffe auf Webseiten, bevorzugt Shops. Die Masche der Erpresser läuft meist so, den DDoS Angriff per Email anzukündigen um vorab ein “Schutzgeld” zu erpressen. Näheres wusste bereits der Spiegel unter http://www.spiegel.de/netzwelt/web/0,1518,701879,00.html zu berichten.

Im Gegensatz zum Spiegel Artikel, welcher meist von Säberasseln ausgeht, und eher auf die Trittbrettfahrer abzielt, ist die Bedrohung durchaus real, da sich bereits mit einem Server und ein wenig Perl entsprechend ungeschützte Webserver aus dem Rennen nehmen lassen. Einer der Vertreter dieser Angriffsschnecken, wie ich sie nenne, ist Slowloris, aber es gibt auch andere die ähnlich arbeiten.

Da Slowloris ohne Probleme frei verfügbar ist unter http://ha.ckers.org/slowloris/ , kann jeder halbwegs versierte ITler so einen Angriff starten, sei es zu Kontrollzwecken ob die eigene Infrastruktur vor solchen Angriffen geschützt ist, oder auch zu kriminellen Zwecken, wie der oben genannten Erpressungsweise. Anfällig für solche Angriffe sind zum Beispiel die meisten Apache Server, alte Nginx Versionen und auch diverse andere Webserverplattformen.


In größeren lastverteilten Systemen welche Hardware Balancer nutzen und die korrekt konfiguriert sind, tritt das Problem eher weniger auf, da diese meist von Haus auf ein sogenanntes Late Binding vornehmen, und gegen die meisten dieser Angriffe schützen. Anders sieht es bei alleine im Netz stehenden Servern aus, oder lastverteilten Systemen welche eine Direktverbindung zum Webserver auf dem zum Beispiel ein Apache Server läuft zulassen (IPVS als Beispiel).

Für die letzteren Varianten gibt es aber dennoch diverse Schutzmöglichkeiten. In einem kompletten Setup mit Balancing kann man zum Beispiel als Eintrittstor einen aktuellen NGINX Server nehmen, der auch gleich das SSL Offloading übernehmen kann, aufgrund seiner sehr guten Performance. Dieser greift auf einen HAPROXY zu welcher das Balancing übernimmt. Die eigentlichen Webserver sind am Ende Apache Webserver, welche jedoch mit mod_qos laufen, welches zum Beispiel SLOWLORIS sehr gut abfangen kann.

Die einzelnen Elemente dieser Setups und genauerer Beschreibungen findet man unter den folgenden Links:

Mit diesen Komponenten kann man seine Infrastruktur relativ gut gegen diese Form von Angriffen schützen. Natürlich sollten bei Linuxsystemen von Haus auf zusätzlich TCP_SYNCOOKIES aktiviert sein, um eine andere Angriffsform abzudecken. Distributionen wie aktuelle Fedora oder CentOS haben diesen Parameter bereits als Standardeinstellung aktiviert.

Dann mal erfolgreiches Schützen!

Hi everybody,


tonite I thought I write about a nice project I was involved in. It’s about bringing the virtual platform for the Developer Kick-Off Meeting 2008 to life. Target of the project is/was to let users around the world participate in a large online event, and even if their where some caveats, we managed to get all the problems solved in time. Users were able to visit the virtual conference center, which was basically a flash application, and join live keynotes, recorded sessions, post comments, communicate via chat, etc.

To manage the expected load, parts of the platform like the videos etc. where distributed via a CDN. The rest of the platform used a mysql master, scale out master, many slaves setup, which performed very well, and of course a horde of apache servers.

Final load tests where done using Funkload. Funkload is a load testing tool I would clearly recommend, and is less bloated like The Grinder or the like.

All in all, our technical project manager Darren Hague of SAP did an exceptional job in this project, keeping track of the timelines and adressing the important issues first. Thanks a lot for this Darren, I really enjoy working with you. Of course, the rest of the team also played their parts very well to get the job done successfully. Thanks alot to you guys too, and hopefully we bring some more visions like this one to life in the future.

Okay, that’s it for tonite, I really need some sleep now ;)

During a project, we came across the problem to proxy the services of a Citrix Secure Gateway for security purposes. No deal I thought, because of the TCP over HTTP tunneling thing I had back in my mind. We’ve tried proxyiing via Squid, as well as Apache and stunnel to no avail. The problem is in the nature of how the SSL Connection is beiing used, and that it’s not a real HTTP connection at all. With the proxying enabled, the session terminates at the proxy system. The secure gateway itself thinks about this like it is a kind of “man-in-the-middle” attack., and denies the connection with an misleading SSL Error 4.


I can understand, that this kind of protection is useful in many ways, but with the usage of http proxy servers and restricted firewall policies it’s more a problem than a feature. You have to either pinpoint you’re firewall with DNATs and the like, or use a commercial feature like the Citrix Secure Gateway Proxy to get rid of the problem.

The final solution to this was, to use socat a multipurpose Relay. From the about page of socat:

socat is a relay for bidirectional data transfer between two independent data
channels. Each of these data channels may be a file, pipe, device (serial line
etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an
SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU
line editor (readline), a program, or a combination of two of these.
These modes include generation of "listening" sockets, named pipes, and pseudo
terminals.

So, whenever you’re facing a problem like this, were regular reverse proxy solutions won’t work, give socat a try, for me it saved my day.

You can get socat at http://www.dest-unreach.org/socat/

Heute bin ich auf eine interessante Seite gestoßen. Müssen Sie regelmässige Tasks auf einer Seite ausführen (Datenbankwartung, Logrotation, etc.), haben aber keinen Zugang zu Cron auf dem Server? Webcron ist für Sie. Nach der kostenlosen Registrierung auf http://www.webcron.org haben Sie die Möglichkeit über ein Webinterface den zeitgesteuerten Abruf von Webseiten einzustellen. Wenn Sie zum Beispiel eine Datenbank in regelmässigen Abständen sichern möchten, so programmieren Sie einfach eine entsprechende Seite, und rufen diese via Webcron täglich auf. Weitere deutsche Infos hierzu unter http://www.webcron.org/?lang=de

Today I stumbled upon an interesting webpage. Do you have to schedule regular tasks on your website like database maintenance, log rotation, etc., but don’t have access to cron? Webcron is your tip of the day. After the free signup at http://www.webcron.org, you can add a scheduled request to webpages. For example, you have to regulary dump your database to a file, then you code a php page which is doing this job and request it via webcron on a regular basis. More informations in english at http://www.webcron.org/?lang=en

Aus Sicherheitsgründen wurde eine neue WordPress Version veröffentlicht. Es gab Lücken in der XML-RPC Implementierung. Dieses Blog wurde bereits auf die neue Version upgedatet. Näheres dazu in English unter http://wordpress.org/development/2008/02/wordpress-233/
For security reasons a new WordPress Release is available. There were flaws in the XML-RPC implementation. This Blog has already been updated to the new version. More about this at http://wordpress.org/development/2008/02/wordpress-233/