Latest / Decrypted: The UK Cyber Briefing / A leaver's forgotten login and a poisoned npm package cost CrowdSec 170 repositories
Transcript
- 0:03This is Decrypted. Sunday, the twentieth of September.
- 0:06A leaver's forgotten login and a poisoned npm package cost CrowdSec 170 repositories.
- 0:14Security company CrowdSec said this week that about 170 of its private code repositories were copied in May.
- 0:22It only found out when the code appeared on a cybercrime forum on 16 September.
- 0:28The way in wasn't a clever attack on CrowdSec.
- 0:32It was a poisoned open source package on a former employee's laptop, plus a login that had been left switched
- 0:40on out of politeness.
- 0:43What happened.
- 0:52Installing one ran code that stole credentials from the machine.
- 0:57That included GitHub tokens, S S H keys and cloud credentials.
- 1:02CrowdSec says the laptop of a developer who had just left the company was hit.
- 1:08On 22 May, someone used that developer's GitHub OAuth token to clone roughly 170 private repositories.
- 1:18CrowdSec revoked the access on 25 May.
- 1:21That's three days later.
- 1:28Quote: "We kept them alive because we parted on good terms with our developer, and he wanted to finalize some
- 1:35work."
- 1:39Its infrastructure and databases weren't accessed.
- 1:42And more than 130 of the copied repositories were already public.
- 1:47The personal data involved is limited: 83 email addresses out of about 150,000 users, and the names of 51 pot
- 1:57ential investors from 2020.
- 1:59An A W S credential in the leaked code was tested on 17 August, but CrowdSec says the role was limited to a s
- 2:07ingle notification service.
- 2:09And also. Why two-factor didn't help.
- 2:12Think of a building pass. Two-factor authentication is the guard checking your face on the day the pass is i
- 2:19ssued. After that, the pass does the talking.
- 2:23Malware that lifts the pass from a coat pocket never needs your face.
- 2:27That's why a token already authorised on a developer's machine walks straight past the second factor.
- 2:33And finally. The Secure by Design lesson.
- 2:37This is a design problem, not a discipline problem.
- 2:41A system that relies on someone remembering to remove access, or on every developer never installing a bad pa
- 2:48ckage, will eventually fail.
- 2:50So what do better defaults look like?
- 2:52First, leavers lose access on their last day.
- 2:56Finishing work happens through a time-limited account that expires by itself.
- 3:01Second, tokens are short-lived, so a stolen copy is worth hours, not months.
- 3:08Third, developer laptops are treated as production, because that's where the keys live.
- 3:14CrowdSec says it's now rolling out endpoint detection on them, tightening offboarding and monitoring the age
- 3:20of npm packages. And fourth, new package versions aren't installed the minute they appear.
- 3:26Almost four months passed between the theft and the leak.
- 3:30Any UK business with software developers could ask its engineering lead three questions.
- 3:36How fast do leavers lose access?
- 3:38How long do tokens live? And what happens on our machines when a package updates?
- 3:43That's opinion, not advice.
- 3:45That was Decrypted. The written version and every source are linked in the show notes.
- 3:51Thanks for listening.