<!doctypehtml PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns=http://www.w3.org/1999/xhtml><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>
   Compromise2010
  </title><link href=../style.css rel=stylesheet><link href=../local.css rel=stylesheet><body><div class=page><div class=pageheader><div class=header><span> <span class=parentlinks> <a href=../> Savannah documentation </a> / </span> <span class=title> Compromise2010 </span> </span></div></div><div id=pagebody><div id=content><p>We (GNU Savannah and the FSF) value transparency, so here are the details on this page.<h2>Recap</h2><p>There's been a SQL SELECT injection leading to a leak of unsalted MD5 account passwords, some of them discovered through online passwords recovery services, leading in turn to project membership and admin access, used for vandalism on the 'www' project that backs www.gnu.org.<p>www.gnu.org normally serves static pages, but PHP was found enabled, so crackers installed a reverse shell there as well.<p>Root access is separately maintained and no evidence of root access was found.<p>No other exploitable SQL injection has been found in Savane so far, thanks to the SQL parametrization work done back in 2007.<p>To be safe, we've reinstalled the system and restored the data from a trusted backup, November 23th circa 12:00 GMT.<h2>Counter-measures</h2><ul><li>Crack analysis before re-enabling any service<li>SQL injection fix and code audit before re-enabling the web front-end<li>Removed all passwords (users and system) and sessions<li>Use crypt's SHA-512 for passwords, and phpass's entropy code for salt<li>Enforced password strength (through passwdqc)<li>Added logs analysis reporting tool that keeps us informed of SQL injection attacks<li>Disabled PHP entirely at www.gnu.org<li>Upgraded friend website gna.org to our version of Savane</ul><p>In progress:<ul><li>Auditing changes between the 23th and the 27th to see what was committed (no code commits found so far)</ul><p>Thanks to FSF sysadmins Bernie Innocenti and Ward Vandewege, Savannah Hackers Sylvain Beucler, Brian Gough, Michael J. Flickinger, Jim Meyering; Openwall hacker Solar Designer; Savannah users for their support.<h2>Timeline</h2><ul><li>2010/11/24 21:30 UTC: SQL SELECT injection attack originated from Tbilisi, Georgia, access to user encrypted passwords<li>2010/11/24 21:27 UTC: one Savannah admin password cracked, account compromised<li>2010/11/26 16:02 UTC: cracker gained membership to the www project<li>2010/11/26 23:51 UTC: cracker tested commit to the www CVS repository<li>2010/11/27 00:51 UTC: cracker defaced www.gnu.org<li>2010/11/27 01:35 UTC: cracker committed a reverse shell using unexpectedly enabled PHP support<li>2010/11/27 01:36 UTC: notification of the intrusion<li>2010/11/27 01:37 UTC: website restored<li>2010/11/27 04:42 UTC: emergency fix to Savane code (unknowing that an admin account was still compromised)<li>2010/11/27 19:05 UTC: new cracker activity on www.gnu.org - we shutdown the machines<li>2010/11/27 21:35 UTC: reinstalled www.gnu.org<li>2010/11/29 15:23 UTC: reinstalled Savannah machines to be safe<li>2010/11/29 21:30 UTC: access to the base host restored, extracting incremental backup from the 23th<li>2010/11/29 23:30 UTC: finished diagnosing original attack<li>2010/11/30 12:30 UTC: data transfers in progress<li>2010/11/30 13:30 UTC: read-only access to source repositories<li>2010/11/30 14:30 UTC: write access to source repositories<li>2010/11/30 16:30 UTC: data transfers finished<li>2010/11/30 18:00 UTC: access to downloads and GNU Arch<li>2010/11/30 21:00 UTC: audited code and found no other SQL injection<li>2010/11/30 22:30 UTC: found trace of earlier attack on Nov 23th 04:00<li>2010/11/30 22:45 UTC: stopped write access<li>2010/11/30 23:45 UTC: found trace of earlier read-only SQL injections as back as January, but none with actual account cracking<li>2010/12/01 00:55 UTC: after fishing through logs, it appears that there was no other account cracking<li>2010/12/01 11:00 UTC: restored write access<li>2010/12/02 08:02 UTC: web front-end improved and re-enabled</ul><h2>Old</h2><p>This is how Sylvain restored Savannah after the crack.<ul><li>[X] Put services online using backup, except for password-based ones (e.g. the web interface)<li>[X] Bring back web interface</ul><blockquote><ul><li>[X] Reset passwords<li>[X] Fix SQL injection and look for potential others<li>[X] Implement crypt support (like /etc/shadow, strong and LDAP-compatible) hashes, with SHA-512<li>[X] Implement salt generation with good entropy<li>[X] Implement password strength enforcement<li>[/] Implement Solar's suggestions ( <a href=http://lists.gnu.org/mailman/private/savannah-hackers-private/2010-December/001984.html> TODO </a> )<li>[/] Implement logs-checking reporting tool (TODO: better init.d support)<li>[/] Implement on-login password rehash for MD5 and improperly salted SHA-512</ul><blockquote><ul><li>Implemented rehashing for improperly salted hashes.</ul></blockquote><ul><li>[X] Implement banner to warn people about changing password (on login pages or all pages?)<li>[X] Change TLS/https keys</ul></blockquote><ul><li>[/] Audit changes between the 23th and the 27th to see what was compromised - in progress <a href=http://lists.gnu.org/mailman/private/savannah-hackers-private/2010-December/002009.html> http://lists.gnu.org/mailman/private/savannah-hackers-private/2010-December/002009.html </a><li>[/] Colonialone:</ul><blockquote><ul><li>[X] move back dot files on colonialone.fsf.org<li>[/] restore @savannah.gnu.org aliases replication from colo (restored user syncaliases, now check if it works)<li>[X] restore user svadmin -> not restoring it since it can access nothing in the new xen setup<li>[ ] Drop users ward/peobo/bernie?<li>[X] Change 2 failed disks</ul></blockquote><ul><li>[/] savannah-backup:</ul><blockquote><ul><li>[X] enable backup cron<li>[ ] add rsnapshot to keep history locally (rdiff seems to be too long to extract backups); coordinate with <a href=mailto:sysadmin@gnu.org> sysadmin@gnu.org </a> so they backup the latest backup online</ul></blockquote><ul><li>[X] write post-mortem at <span class=selflink> Compromise2010 </span><li>[X] restore GAP CVS repositories from latest backup<li>[X] restore avr-libc from latest backup <a href=http://savannah.gnu.org/support/?107537> http://savannah.gnu.org/support/?107537 </a><li>[X] fix sv.gnu.org DNSes - in progress <a href=http://lists.gnu.org/mailman/private/savannah-hackers-private/2010-December/002007.html> http://lists.gnu.org/mailman/private/savannah-hackers-private/2010-December/002007.html </a> -- "magically works for now"</ul></div></div><div class=pagefooter id=footer><div id=pageinfo><div id=backlinks>Links: <a href=../FrontPage/> FrontPage </a></div><div class=pagedate>Last edited <span class=date> Mon 03 Oct 2016 09:26:01 PM EDT </span></div></div></div></div>