Artikel-Schlagworte: „Apache“

Today, nagios issued a security notice about CSRF and XSS Exploits regarding their product. You can read the original notice below:

The Nagios Team was notified last week about security exploits in Nagios XI that could potentially compromise a Nagios XI deployment.  This message contains information about the exploits, as well as information related to mitigating these problems.  We recommend that all Nagios XI users upgrade to the latest release to resolve these issues.

Security Exploit Details

The security vendor that notified us indicated that Nagios XI 2009R1.2B and earlier were vulnerable to Cross Site Scripting (XSS) and Cross Site Request Forgery (CSRF) exploits.


In order to help prevent current Nagios XI users from malicious attacks, we will not be releasing the details of exploits.  However, the exploits allowed the vendor to craft requests to Nagios XI that ultimately created a PHP-based shell program that ran as the Apache user.  This would allow an attacker to run arbitrary commands as the Apache user and potentially expose sensitive information.

What We Are Doing

Upon receiving the notice from the security vendor, we made changes to the Nagios XI code and released a new 2009R1.2C version that we believe fixes the problems that were reported.  We have asked the vendor the re-verify the security test using the 2009R1.2C release.  If the vendor reports additional problems with the latest release, we will work quickly to solve the problem and notify you of additional fixes and updates.

What Should You Do?

We recommend that Nagios XI users immediately upgrade to the latest 2009R1.2C release of Nagios XI.  This release contains changes that we believe resolve the security risks reported to us.

2009R1.2C is a free upgrade for all Nagios XI users – including customers and users currently evaluating Nagios XI.

Instructions on how to upgrade your Nagios XI instance can be found in the following document:

Nagios XI Upgrade Instructions

Additional Assistance

If you encounter problems with the upgrade to 2009R1.2C, please contact our technical support team by posted to our online support forum at:

http://support.nagios.com/forum

If you have any questions about the information provided in this email please contact us.

Phone: 1-888-624-4671

So, let’s get your installation updated.

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/

Im Rahmen eines Projektes lautete die Kundenanforderung, ein Reverseproxysystem zur Verfügung zu stellen, welches dahinterliegende Webanwendungen mit einer eigenen autonomen Benutzerverwaltung schützt. Im ersten Augenblick eigentlich ein Fall für die diversen Autorisierungsmodule des Apachen. Jedoch sollte zum einen der Login nicht dieses übliche “Unauthorized” Kästchen des jeweilgen Browsers sein, sondern eine hübsche Anmeldeseite. Außerdem sollte es nicht möglich sein über einen direkten Link auf die Seite ohne Anmeldung zuzugreifen.

Da mir keine Möglichkeit bekannt ist, dies mit den Standardmodulen zu realisieren, hab ich mich auf der Suche nach einer Lösung gemacht, und bin fündig geworden. Das entsprechende Apache2-Modul nennt sich ‘mod_auth_form’ und liegt leider nicht bei den Standardmodulen des Apachen dabei.

‘ mod_auth_form’ basiert auf mod_auth_mysql und mod_auth_sim. Ein Auszug der Funktionsweise in Englisch von der Projekthomepage:

The mechanics of the module works in the following way. A web client (user) requests for a restricted page/directory. The module sends back a ‘Page Has Moved’ error, pointing the client to the page containing a login form. Through server-side scripting, a session is created in the MySQL database and the client (i.e. cookies or query string). The session itself consists of a unique, random, and temporary ID that is associated with a user. The client then makes the same request along with the session ID (SID) and the user ID (UID). The module compares and validates the two IDs against the IDs stored in the MySQL database. If successful, the module sends back the requested page; otherwise, the module once again sends back the ‘Page Has Moved’ error page. In addition (if specified), the module will also validate the user’s group membership and act accordingly.

Bei Gelegenheit poste ich eventuell demnächst mal ein Tutorial zum Einsatz. Da es das Modul nicht als RPM gibt, habe ich mal eins für Fedora 8 erstellt, welches nachstehend zum Download bereit steht.
mod_auth_form-2.05-1.NWE.fc8.i386.rpm