This article (along with subsequent articles) will cover the journey I’ve taken in learning about the XMPP (eXtensible Messaging and Presence Protocol) standard and how I used that knowledge to fuzz various servers, starting with the eJabberd server available from the ejabberd community. The ejabberd server is also supported by a for profit company.
When installing the chat server on a public facing interface you want to make sure that it is secure. And one way to verify that is to perform black box fuzzing. Fuzzing for those who are unaware is the process of submitting invalid or random data to a server application using an automated tool. This process will allow the security researcher to identify various defects in how the application handles each of those inputs. Crashing the application as a result of the problematic data usually indicates that there is a defect within the program, which could possibly be exploited by a bad actor.
The first step of this long and arduous path begins with a single installation of the eJabberd chat server. eJabberd is written in erLang, which is an unusual choice for a chat server since most tend to be written in java and sometimes in C\C++. The latest version of the server is available from the eJabberd web site located here and it was a matter of downloading the installer and then running it. A few minutes later I had a functioning XMPP server up and running.
The next step was to verify that my chat software could connect to it. This would ensure that I had correctly installed the server and that it was functioning normally. I used two clients, iChat from Apple and Adium from the Adium Team. I ran both clients simultaneously and could send messages between them. So far everything seemed on the “up and up.”
Now to the good stuff, I hoped. I downloaded the tools xmpp-fuzzer and gizmo from Google Code. Three years ago, Ava LaTrope first released the gizmo tool at DEF CON 17, you can see her presentation on YouTube, and the xml-fuzzer was found through a google search. However, right off the bat I ran into problems with the xmpp-fuzzer, it seems it was not compatible with my 64 bit OS X installation. So I had to download and rebuild it from source, which included getting the appropriate Java bits, like the SWT library. What a pain in the neck it was to get this to build. But after struggling with various configuration issues, I was able to get it to finally build and run.
At this time I pointed the fuzzer towards my local version of eJabberd and hoped for the best. I waited and waited, and nothing. Seems that the xmp-fuzzer wasn’t as robust as the “Prototype 0.1” label led me to believe. So I decided to re-evaluate my decision to go with the prototypical xmpp fuzzing tool. I was aware that there are several other tools out there, including Peach and Sulley that will support fuzzing the XMPP server once the proper configuration (magic) incantations are made. So I put the xmpp-fuzzer test on hold and began downloading Peach.
In part 2 of this series I will cover the installation and configuration of the Peach fuzzing platform and how I use it in my search for successful XMPP fuzzing. Part 3 will cover the installation and configuration of the Sulley platform and a comparison with the Peach platform. Part 4 will focus on other XMPP servers as well as a final attempt to get the original xmpp-fuzzer tool to successfully fuzz a XMPP server. I also plan on using the gizmo tool to log and monitor my fuzzing efforts.
You may be wondering why I am spending all of this time on a single topic that has limited applicability to a large audience. The answer is that the XMPP standard has become so successful in its adoption that it has also started to go unnoticed in its ubiquity. For example, Google and Facebook support it as well as AOL, Apache, Apple, Cisco, Oracle, Siemens, and Yahoo along with hundreds of smaller companies. Even Skype is beginning to support the standard.