Apache Infrastructure Team
apache.org incident report for 04/09/2010
Apache.org services recently suffered a direct, targeted attack against our infrastructure, specifically the server hosting our issue-tracking software.
The Apache Software Foundation uses a donated instance of Atlassian JIRA as an issue tracker for our projects. Among other projects, the ASF Infrastructure Team uses it to track issues and requests. Our JIRA instance was hosted on brutus.apache.org, a machine running Ubuntu Linux 8.04 LTS.
Password Security
If you are a user of the Apache hosted JIRA, Bugzilla, or Confluence, a hashed copy of your password has been compromised.
JIRA and Confluence both use a SHA-512 hash, but without a random salt. We believe the risk to simple passwords based on dictionary words is quite high, and most users should rotate their passwords.
Bugzilla uses a SHA-256, including a random salt. The risk for most users is low to moderate, since pre-built password dictionaries are not effective, but we recommend users should still remove these passwords from use.
In addition, if you logged into the Apache JIRA instance between April 6th and April 9th, you should consider the password as compromised, because the attackers changed the login form to log them.
What Happened?
On April 5th, the attackers via a compromised Slicehost server opened a new issue, INFRA-2591. This issue contained the following text:
ive got this error while browsing some projects in jira http://tinyurl.com/XXXXXXXXX [obscured]
Tinyurl is a URL redirection and shortening tool. This specific URL redirected back to the Apache instance of JIRA, at a special URL containing a cross site scripting (XSS) attack. The attack was crafted to steal the session cookie from the user logged-in to JIRA. When this issue was opened against the Infrastructure team, several of our administators clicked on the link. This compromised their sessions, including their JIRA administrator rights.
At the same time as the XSS attack, the attackers started a brute force attack against the JIRA login.jsp, attempting hundreds of thousands of password combinations.
On April 6th, one of these methods was successful. Having gained administrator privileges on a JIRA account, the attackers used this account to disable notifications for a project, and to change the path used to upload attachments. The path they chose was configured to run JSP files, and was writable by the JIRA user. They then created several new issues and uploaded attachments to them. One of these attachments was a JSP file that was used to browse and copy the filesystem. The attackers used this access to create copies of many users' home directories and various files. They also uploaded other JSP files that gave them backdoor access to the system using the account that JIRA runs under.
By the morning of April 9th, the attackers had installed a JAR file that would collect all passwords on login and save them. They then sent password reset mails from JIRA to members of the Apache Infrastructure team. These team members, thinking that JIRA had encountered an innocent bug, logged in using the temporary password sent in the mail, then changed the passwords on their accounts back to their usual passwords.
One of these passwords happened to be the same as the password to a local user account on brutus.apache.org, and this local user account had full sudo access. The attackers were thereby able to login to brutus.apache.org, and gain full root access to the machine. This machine hosted the Apache installs of JIRA, Confluence, and Bugzilla.
Once they had root on brutus.apache.org, the attackers found that several users had cached Subversion authentication credentials, and used these passwords to log in to minotaur.apache.org (aka people.apache.org), our main shell server. On minotaur, they were unable to escalate privileges with the compromised accounts.
About 6 hours after they started resetting passwords, we noticed the attackers and began shutting down services. We notified Atlassian of the previously unreported XSS attack in JIRA and contacted SliceHost. Atlassian was responsive. Unfortunately, SliceHost did nothing and 2 days later, the very same virtual host (slice) attacked Atlassian directly.
We started moving services to a different machine, thor.apache.org. The attackers had root access on brutus.apache.org for several hours, and we could no longer trust the operating system on the original machine.
By April 10th, JIRA and Bugzilla were back online.
On April 13th, Atlassian provided a patch for JIRA to prevent the XSS attack. See JRA-20994 and JRA-20995 for details.
Our Confluence wiki remains offline at this time. We are working to restore it.
What worked?
- Limited use passwords, especially one-time passwords, were a real lifesaver. If JIRA passwords had been shared with other services/hosts, the attackers could have caused widespread damage to the ASF's infrastructure. Fortunately, in this case, the damage was limited to rooting a single host.
- Service isolation worked with mixed results. The attackers must be presumed to have copies of our Confluence and Bugzilla databases, as well as our JIRA database, at this point. These databases include hashes of all passwords used on those systems. However, other services and hosts, including LDAP, were largely unaffected.
What didn't work?
- The primary problem with our JIRA install is that the JIRA daemon runs as the user who installed JIRA. In this case, it runs as a jira role-account. There are historical reasons for this decision, but with 20/20 hindsight, and in light of the security issues at stake, we expect to revisit the decision!
- The same password should not have been used for a JIRA account as was used for sudo access on the host machine.
- Inconsistent application of one time passwords; We required them on other machines, but not on brutus. PAM was configured to allow optional use of OPIE, but not all of our sudoers had switched to it.
- SSH passwords should not have been enabled for login over the Internet. Although the Infrastructure Team had attempted to configure the sshd daemon to disable password-based logins, having
UsePAM yesset meant that password-based logins were still possible. - We use Fail2Ban for many services, but we did not have it configured to track JIRA login failures.
What are we changing?
- We have remedied the JIRA installation issues with our reinstall. JIRA is now installed by root and runs as a separate daemon with limited privileges.
- For the time being we are running JIRA in a httpd-tomcat proxy config with the following rules:
Sysadmins may find this useful to secure their JIRA installation until an upgrade is feasible.ProxyPass /jira/secure/popups/colorpicker.jsp ! ProxyPass /jira/secure/popups/grouppicker.jsp ! ProxyPass /jira/secure/popups/userpicker.jsp ! ProxyPass /jira http://127.0.0.1:18080/jira - We will be making one-time-passwords mandatory for all super-users, on all of our Linux and FreeBSD hosts.
- We have disabled caching of svn passwords, and removed all currently cached svn passwords across all hosts ast the ASF via the global config
/etc/subversion/configfile:[auth] store-passwords = no - Use Fail2Ban to protect web application login failures from brute force attacks
We hope our disclosure has been as open as possible and true to the ASF spirit. Hopefully others can learn from our mistakes.
Posted at 05:04AM Apr 13, 2010
by pgollucci in General |
Comments[84]
|

Posted by francisdb on April 13, 2010 at 06:36 AM UTC #
Posted by Noam Rathaus on April 13, 2010 at 07:14 AM UTC #
Posted by Blanca Garcia on April 13, 2010 at 09:15 AM UTC #
Posted by Frederik on April 13, 2010 at 10:48 AM UTC #
Posted by bryan hunt on April 13, 2010 at 11:06 AM UTC #
Posted by Max Kanat-Alexander on April 13, 2010 at 11:37 AM UTC #
Posted by Anton Chuvakin on April 13, 2010 at 01:52 PM UTC #
Posted by Confluence: Uutiset on April 13, 2010 at 02:32 PM UTC #
Posted by Ariel Rivera on April 13, 2010 at 02:50 PM UTC #
Posted by Archie Cobbs on April 13, 2010 at 03:11 PM UTC #
Posted by Alex on April 13, 2010 at 04:34 PM UTC #
Posted by David S on April 13, 2010 at 04:51 PM UTC #
Posted by www.meneame.net on April 13, 2010 at 04:54 PM UTC #
Posted by mw on April 13, 2010 at 04:55 PM UTC #
Posted by Pepijn on April 13, 2010 at 05:56 PM UTC #
Posted by Martin on April 13, 2010 at 05:58 PM UTC #
Posted by John on April 13, 2010 at 06:07 PM UTC #
Posted by free on April 13, 2010 at 06:24 PM UTC #
Posted by nobody on April 13, 2010 at 07:12 PM UTC #
Posted by Sebastian on April 13, 2010 at 07:14 PM UTC #
Posted by Alasdair on April 13, 2010 at 07:17 PM UTC #
Posted by Jan Schaumann on April 13, 2010 at 07:35 PM UTC #
Posted by Federico on April 13, 2010 at 08:21 PM UTC #
Posted by Kevin on April 13, 2010 at 08:51 PM UTC #
Posted by Ryan Brown on April 13, 2010 at 09:24 PM UTC #
Posted by abadidea on April 13, 2010 at 09:36 PM UTC #
Posted by James Woods on April 13, 2010 at 10:22 PM UTC #
Posted by Mark on April 13, 2010 at 11:13 PM UTC #
Posted by Frustrated Linux User on April 13, 2010 at 11:38 PM UTC #
Posted by Anonymous on April 14, 2010 at 12:07 AM UTC #
Posted by Anonymous on April 14, 2010 at 12:07 AM UTC #
Posted by James on April 14, 2010 at 12:09 AM UTC #
Posted by Steve Holden on April 14, 2010 at 12:53 AM UTC #
Posted by Michael on April 14, 2010 at 01:08 AM UTC #
Posted by Joe Schaefer on April 14, 2010 at 01:12 AM UTC #
Posted by Jacob Appelbaum on April 14, 2010 at 01:32 AM UTC #
Posted by Andrei Railean on April 14, 2010 at 01:39 AM UTC #
Posted by smartgeek on April 14, 2010 at 04:10 AM UTC #
Posted by remin on April 14, 2010 at 04:10 AM UTC #
Posted by Jay on April 14, 2010 at 04:47 AM UTC #
Posted by Sergey Shepelev on April 14, 2010 at 05:56 AM UTC #
Posted by Zeke Weeks on April 14, 2010 at 06:07 AM UTC #
Posted by fakhrime on April 14, 2010 at 06:50 AM UTC #
Posted by Wilson on April 14, 2010 at 07:00 AM UTC #
Posted by Jens on April 14, 2010 at 07:26 AM UTC #
Posted by Jeff on April 14, 2010 at 08:29 AM UTC #
Posted by Fernando on April 14, 2010 at 10:12 AM UTC #
Posted by Fernando on April 14, 2010 at 10:17 AM UTC #
Posted by genehack.org on April 14, 2010 at 10:37 AM UTC #
Posted by haley on April 14, 2010 at 11:39 AM UTC #
Posted by FM on April 14, 2010 at 12:17 PM UTC #
Posted by PaPPy on April 14, 2010 at 12:33 PM UTC #
Posted by JIRA: Kafahali on April 14, 2010 at 12:41 PM UTC #
Posted by Fred Schlip on April 14, 2010 at 01:26 PM UTC #
Posted by JIRA: IT Systems on April 14, 2010 at 01:29 PM UTC #
Posted by JD on April 14, 2010 at 02:53 PM UTC #
Posted by IcE on April 14, 2010 at 03:12 PM UTC #
Posted by Peter Odding on April 14, 2010 at 04:48 PM UTC #
Posted by msj on April 14, 2010 at 05:03 PM UTC #
Posted by Confluence: Jonathan Stern on April 14, 2010 at 05:17 PM UTC #
Posted by Lance R on April 14, 2010 at 05:20 PM UTC #
Posted by lou martin on April 14, 2010 at 05:31 PM UTC #
Posted by SteveL on April 14, 2010 at 07:07 PM UTC #
Posted by 127.0.0.1 on April 14, 2010 at 08:01 PM UTC #
Posted by nabice on April 15, 2010 at 04:54 AM UTC #
Posted by Bjorn on April 15, 2010 at 06:55 AM UTC #
Posted by Richard on April 15, 2010 at 07:14 AM UTC #
Posted by Tomas Mraz on April 15, 2010 at 09:26 AM UTC #
Posted by Just Another Hacker on April 15, 2010 at 11:20 AM UTC #
Posted by Ben on April 15, 2010 at 11:50 AM UTC #
Posted by Nathan on April 15, 2010 at 02:52 PM UTC #
Posted by Confluence: Mo Barger on April 15, 2010 at 05:14 PM UTC #
Posted by Confluence: Mo Barger on April 15, 2010 at 05:28 PM UTC #
Posted by Steve on April 15, 2010 at 05:28 PM UTC #
Posted by Confluence: Mo Barger on April 15, 2010 at 06:37 PM UTC #
Posted by Adrian Colomitchi on April 15, 2010 at 09:39 PM UTC #
Posted by Skyphire on April 16, 2010 at 03:40 AM UTC #
Posted by Confluence: Jonathan Stern on April 16, 2010 at 04:40 PM UTC #
Posted by phil on April 16, 2010 at 07:08 PM UTC #
Posted by Jonathon on April 16, 2010 at 08:18 PM UTC #
Posted by Confluence: Atlassian?????? on April 16, 2010 at 10:38 PM UTC #
Posted by Confluence: Atlassian?????? on April 16, 2010 at 10:38 PM UTC #
Posted by Confluence: Atlassian?????? on April 18, 2010 at 02:00 AM UTC #
Posted by Michael Starks on April 19, 2010 at 12:00 AM UTC #