Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread James Troup
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

To any press/general public type folks who might be reading this: this
mail is mostly aimed at developers - you might want to read Joey's
post[1] on debian-news instead.



Status Update
-

gluck.debian.org is back up and most services have been restored[2].
It has a new SSH key, which is attached at the end of this email[3].

Short version: A developer's debian.org account was compromised some
time ago.  This account was then used to exploit the recent prctl
vulnerability (CVE-2006-2451)[4] on gluck and gain root privileges.

Longer version follows...

  Detection
  -

Beginning at 02:43 UTC on 2006-07-12, 3 mails were sent as the result
of cron jobs running as root on gluck.debian.org.  These mails
were... obviously wrong and Matt Taggart contacted Ryan Murray and
myself at about 03:30.

What happened
-

We started investigating and discovered the following:

 o The cron emails referenced a specific user account and based on the
   (geographic) location of logins to this account it was clear that
   the account was compromised and had been for some time.

 o The attackers had then apparently obtained root via the recent
   prctl vulnerability (CVE-2006-2451)[4]; specifically via the
   exploit (or something very close to it) that had very recently been
   published on the full-disclosure mailing list[5].

 o The compromised account did not have access to any restricted
   Debian hosts (i.e. mailing lists, archive, security, etc.) and
   these machines had not been compromised.

We contacted the developer whose account had been compromised and he
responded.  It's not yet clear how that developer's account was
compromised.

We also notified the contact people for other machines that we
suspected/knew were involved where possible.

As far as we can tell, due to the short window between the attacker
gaining root and us noticing it, they hadn't had time/inclination to
do a great deal.  The only obviously compromised binary we found was
'ping', which we're passing off to a forensics expert to look at.

   Response
   

We took gluck offline at 04:30 to boot it off of trusted media and
continue investigating.  We also started upgrading our other
i386/amd64 boxes and confirming that they hadn't been compromised.

In order to get services back online, we reinstalled gluck from
scratch, keeping only /home and /org intact.

   What's been done
   

 o Any obvious secret keys (GPG or SSH) have been purged from gluck.

 o Anyone who kept their (Debian) GPG secret key on gluck has had
   their account locked and key removed from the keyring.
 
 o Accounts with weak passwords have been locked.

We'll be contacting the developers involved in the latter two points
shortly.

 How did this happen?
 

gluck was running Linux 2.6.16.18.  Unfortunately it had not yet been
updated to 2.6.16.24 or 2.6.17.4 both of which were released on
2006-07-06.

   How do I make sure my machines are safe?
   

If you're running sarge's kernel, you are not vulnerable to this
exploit as the first vulnerable kernel version was 2.6.13 and sarge is
only at 2.6.8.

If you're running a more modern kernel, make sure you're running
at least 2.6.16.24 or 2.6.17.4.

 Lock down of other machines
 ---

We will be unlocking machines as and when they've been:

 (1) Updated to run a non-vulnerable kernel and...
 (2) Verified that they haven't been compromised.

You can see the status of this at:

 http://db.debian.org/machines.cgi

Bear in mind though that this may take some time and that for a lot of
the !x86 machines, we rely on the local admin or a friendly porter to
provide us with a suitable kernel for that architecture so the work
may be blocked on them in some cases.

Thanks
--

The following people deserve thanks for their efforts in managing this
incident:

  Matt Taggart, Dann Frazier, Ryan Murray, Anthony Towns, Paul Bame,
  Martin 'Joey' Schulze

- -- 
James

[1] http://lists.debian.org/debian-news/debian-news-2006/msg00030.html

[2] Except for CVS pserver, which needs a patched CVS package that
we're still in the process of updating/restoring.

[3] 

ssh-rsa 

Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Martin Zobel-Helas
Hi James and all the others,

thanks for your great work and taking care of all our debian.org
machines. You do an excelent job.

Greetings
Martin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Frans Pop
On Thursday 13 July 2006 20:08, James Troup wrote:
  o Anyone who kept their (Debian) GPG secret key on gluck has had
their account locked and key removed from the keyring.

Should a check/review be done of recent (staring from the date that first 
account was compromised I would guess) uploads where those keys were used 
(even if only by the involved DDs themselves)?


pgpqxvYbQ58V1.pgp
Description: PGP signature


Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Holger Levsen
Hi,

On Thursday 13 July 2006 20:24, Martin Zobel-Helas wrote:
 Hi James and all the others,

 thanks for your great work and taking care of all our debian.org
 machines. You do an excelent job.

Full ack. Also I'm pretty much impressed about the timely and quite verbose 
information on -news and here. And those being different for the different 
audiences! Many thanks for this as well!


regards,
Holger


pgpEtOkZRfyTX.pgp
Description: PGP signature


Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Henning Makholm
Scripsit Frans Pop [EMAIL PROTECTED]

 Should a check/review be done of recent (staring from the date that first 
 account was compromised I would guess) uploads where those keys were used 
 (even if only by the involved DDs themselves)?

Do we have any easy way of locating all recent uploads signed by a
particular key?

-- 
Henning Makholm  The compile-time type checker for this
   language has proved to be a valuable filter which
  traps a significant proportion of programming errors.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Gustavo Franco

On 7/13/06, Henning Makholm [EMAIL PROTECTED] wrote:

Scripsit Frans Pop [EMAIL PROTECTED]

 Should a check/review be done of recent (staring from the date that first
 account was compromised I would guess) uploads where those keys were used
 (even if only by the involved DDs themselves)?

Do we have any easy way of locating all recent uploads signed by a
particular key?



Used to be at[0], but you can still do by name.

[0] = http://qa.debian.org/developer.php

regards,
-- stratus


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Update on compromise of gluck.debian.org, lock down of other debian.org machines

2006-07-13 Thread Martin Zobel-Helas
Hi Henning,

On Thu, Jul 13, 2006 at 09:50:49PM +0200, Henning Makholm [EMAIL PROTECTED] 
wrote:

 Do we have any easy way of locating all recent uploads signed by a
 particular key?

IIRC dak stores GPG fingerprint for each upload in projectb.

Greetings
Martin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]