Closed
Bug 1453790
Opened 8 years ago
Closed 8 years ago
Developer Github Credential Leak
Categories
(Enterprise Information Security Graveyard :: Incident, task)
Enterprise Information Security Graveyard
Incident
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: will, Assigned: claudijd)
Details
(Keywords: reporter-external, Whiteboard: [reporter-external] [web-bounty-form] [verif?])
Attachments
(1 file)
|
90.50 KB,
image/png
|
Details |
Sending a curl request to https://broker-stage.thunderbird.net/.git/config includes a username and password token stored in the Git configuration file. Specifically, the user Sancus (https://github.com/Sancus):
$ curl https://broker-stage.thunderbird.net/.git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://Sancus:cea257e5370a3f2067be3c57e19948758c80f1d7@github.com/mozilla/broker.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "prod"]
remote = origin
merge = refs/heads/prod
[submodule "lib/pygeoip"]
url = git://github.com/appliedsec/pygeoip.git
This account is valid and can pull down the private Mozilla broker repo (mozilla/broker):
$ git clone https://Sancus:cea257e5370a3f2067be3c57e19948758c80f1d7@github.com/mozilla/broker.git
...
Similarly making an attempt for this repo without creds:
$ git clone https://github.com/mozilla/broker.git
Cloning into 'b1'...
Username for 'https://github.com':
...
Also modifying the password token will yield an auth failure:
$ git clone https://Sancus:FAKETOKEN@github.com/mozilla/broker.git
Cloning into 'broker'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://Sancus:FAKETOKEN@github.com/mozilla/broker.git/'
The attached screenshot shows the curl request and cloning the repo.
Flags: sec-bounty?
| Assignee | ||
Comment 1•8 years ago
|
||
Willis: thanks for this report, I'll dig in right now.
| Assignee | ||
Comment 2•8 years ago
|
||
This 404's for me without the auth:
https://github.com/mozilla/broker
This clones when I use the password (as described):
$ git clone https://Sancus:cea257e5370a3f2067be3c57e19948758c80f1d7@github.com/mozilla/broker.git
Cloning into 'broker'...
remote: Counting objects: 143, done.
remote: Total 143 (delta 0), reused 0 (delta 0), pack-reused 143
Receiving objects: 100% (143/143), 761.58 KiB | 1.53 MiB/s, done.
Resolving deltas: 100% (77/77), done.
$ cd broker/
(develop) $ ls
GeoIP.dat README broker.wsgi gandi.py json lib settings.py six.py
It also fails when an alternate password is provided (as described):
git clone https://Sancus:FAKETOKEN@github.com/mozilla/broker.git
Cloning into 'broker'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://Sancus:FAKETOKEN@github.com/mozilla/broker.git/'
$ git clone https://Sancus:cea257e5370a3f2067be3c57e19948758c80f1d8@github.com/mozilla/broker.git
Cloning into 'broker'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://Sancus:cea257e5370a3f2067be3c57e19948758c80f1d8@github.com/mozilla/broker.git/'
So, yeah, this looks confirmed to me.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•8 years ago
|
||
Here's who has access to the one private repo you call out here and may need to be notified :
James Burke, left Mozilla April 2016
Bryan Clark, left Mozilla August 2017
Philippe Chiasson <pchiasson@mozilla.com>, Shane Caraveo <scaraveo@mozilla.com>, Andrei Hajdukewycz <sancus@off.net>, Blake Winton <bwinton@mozilla.com>, Dan Mosedale <dmosedale@mozilla.com>, Mark Banner <mbanner@mozilla.com>
https://github.com/thundernest-bot
| Reporter | ||
Comment 4•8 years ago
|
||
Thanks Jonathan.
Also, just a heads up (invalid) creds are stored on broker.thunderbird.net.
$ curl https://broker.thunderbird.net/.git/config
...
url = https://Sancus:cc9d7fa510f0fc3998367dd2050e808567ded393@github.com/mozilla/broker.git
Comment 5•8 years ago
|
||
The user with the leaked credentials is
Andrei Hajdukewycz <sancus@off.net>
Comment 6•8 years ago
|
||
I've removed the GitHub user Sancus from the following teams
https://github.com/orgs/mozilla/teams/tb/members
https://github.com/orgs/mozilla/teams/momo-ops/members
Which has revoked his access to github.com/mozilla org repositories
Comment 7•8 years ago
|
||
These are the repos that these leaked credentials granted access to and the type of access
Private Write
mozilla/broker
Public Write
mozilla/getanaccount
mozilla/opensearch
Public Admin
mozilla/ace
mozilla/domtemplate
mozilla/labs-acm
mozilla/labs-vcap
mozilla/labs-vcap-java
mozilla/labs-vcap-services
mozilla/labs-vcap-tests
mozilla/labs-vcap-uaa
mozilla/mozilla-demo-social-service
mozilla/pilot
mozilla/playdoh-lib
mozilla/reflecto
mozilla/remoteobjects
mozilla/webrtc-w3c
| Assignee | ||
Updated•8 years ago
|
Group: mozilla-employee-confidential
Component: Other → Incident
Product: Websites → Enterprise Information Security
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → jclaudius
Status: NEW → ASSIGNED
| Assignee | ||
Comment 13•8 years ago
|
||
This issue has been fully resolved. Here's a summary of what actions were taken to fix...
- Compromised oauth token rotated
- Initial leak vectors closed
- Broker project was made public (it was only private to protect an API key that is no longer relevant)
- Reviewed all GitHub audit logs (verified no suspicious activity)
- Confirmed the affected user didn't add any other users to affected repos where they were admin
- Confirmed the user had not reduced their repo access as to skew scope of reviewed repo
- Contacted all teams of affected repos and commit audits were performed by admins of those repos
A more detailed and internal working log is available here: https://docs.google.com/document/d/1TE_K3gn0KhJ00R5IM8sruUWKpLIoRDg_HdNS7j-V5ns/edit
Will: thank you again for reporting this. We are looking forward to seeing more bugs from you!
Gene/hwine/Sancus/g-k/INSERT_AFFECTED_REPO_OWNERS: thanks for all your help and quick action to address this!
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•8 years ago
|
Group: websites-security, mozilla-employee-confidential
| Assignee | ||
Updated•8 years ago
|
Flags: sec-bounty? → sec-bounty+
Comment 14•8 years ago
|
||
Reporter, how would you like to be credited on our hall of fame? If you have a site you'd like us to link to, we can do that as well.
| Reporter | ||
Comment 15•8 years ago
|
||
"Will Vandevanter" is great, thank you.
Updated•5 years ago
|
Product: Security Assurance → Enterprise Information Security Graveyard
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•