News for hackers. Stuff that matters.
Re:Many packages suddenly disappeared by maxander on Saturday January 06, 2018 @04:02PM (#16087438)
And all this is happening just as after the public release of a serious exploit which allows malicious code to do all sorts of nefarious things when it is somehow installed on the target machine. Hmm.

Given that there's hints, at least, that the problems were caused by some particular developer's actions, I wonder about the security model for package-managed platforms altogether now. If I were a big cybercrime ring, the first thing I'd do would be, get a bunch of thugs together and knock on the front door of a developer of a widely-used package; "help us launch [the sort of attack we're seeing here] or we'll [be very upset with you] with this wrench." Is there a valid defense for a platform whose security relies on the unanimous cooperation of a widely-scattered developer base?

Re:Many packages suddenly disappeared by ytpete on Saturday January 06, 2018 @07:21PM (#16088286)
With cases like the current one, or the leftpad incident in 2016, I'm surprised package registries still allow recycling old package names after a package was deleted. Really seems like deleted packages should be frozen forever - if the original author never recreates it or transfers ownership, then people would have to explicitly choose to move to some new fork with a new id.

But your point about pressuring or bribing package authors still stands as a scary issue. Similar things have already happened: for example, Kite quietly buying code-editor plugins from their original authors and then adding code some consider spyware (see https://news.ycombinator.com/item?id=14902630). I believe there were cases where a similar thing happened with some Chrome extensions too...

Re:Many packages suddenly disappeared by mst on Sunday January 07, 2018 @03:29AM (#16089904)
> With cases like the current one, or the leftpad incident in 2016, I'm surprised package registries still allow recycling old package names after a package was deleted.

CPAN requires the old author to explicitly transfer or mark it abandoned-and-available-to-new-owner.

For all the things wrong with perl5 (and I love it dearly but have spent enough time I can probably list more things wrong with it than the people who hate it ;) it's always a trifle depressing to watch other ecosystems failing to steal the things we got right.

Re:Many packages suddenly disappeared by Moru on Sunday January 07, 2018 @06:53AM (#16090501)
This happens all the time. The new generation creates something cool because what our parents created isnt cool any more, only to fail exactly on the same spot as our parents. Only, it was already solved in the parents last version. This goes for cloth design, cars, houses, kitchen wares and so on, as well as software. Just look at the microwave oven earlier...
Re:Many packages suddenly disappeared by ragesh on Sunday January 07, 2018 @07:05AM (#16090532)
Genuine question... What happened with the microwave oven?
Re:Many packages suddenly disappeared by Momquist on Sunday January 07, 2018 @03:12PM (#16092410)
I think the GP is refering to this: https://news.ycombinator.com/item?id=16089865

Modern microwave ovens have all adopted impractical and quirky new UIs, when the old concept of knobs was simple and worked fairly well in the first place.

Re:Many packages suddenly disappeared by Moru on Sunday January 07, 2018 @05:58PM (#16093252)
My oldest one was just two dials, the second one, 15 years old had loads of buttons and stuff, really stupidly spread out, you had to press watt, minutes, seconds, start and start was not in a corner, not in top/bottom row or any other logical place so you had to search it every time. I glued a rubber piece to it so I could find it again without having to bend down and search.

Since then I have made sure the microwave has two dials, one for time, one for effect.

Re:Many packages suddenly disappeared by YouKnowBetter on Monday January 08, 2018 @03:12AM (#16095355)
Remember the watercooker that had just an on & off switch?

Then came one with an option button for 80 or 100 degrees (176 or 212, in freedoms). Never knew I needed that, but that just changed my live and I can not do without it. Reason: 80 degrees water is hot enough for my needs and saves time.

Our latest has 3 buttons, with different possiblities, beebs like a maniac when ready (an option which is not unset-able) and can do things I never knew anyone would need (like keeping it at x degrees for y minutes).

I guess it is like evolution: you experiment, keep what works and get rid of all things unfit.

Re:Many packages suddenly disappeared by minxomat on Saturday January 06, 2018 @07:35PM (#16088345)
Packages / projects being frozen. AFAIR that's how SourceForge works/worked. I remember a few years back being baffled that I couldn't delete my own project.

But it makes sense, other projects might depend on it, so it's archived.

Re:Many packages suddenly disappeared by 59nadir on Sunday January 07, 2018 @05:55AM (#16090341)
It's just npm that's broken. I've never used a package manager for any other language that had these kinds of issues. It's exacerbated by the massive over-reliance on external packages in JS too. `left-pad` really shone a light on how dependencies in JS land really are brought in without too much thought.
Re:Many packages suddenly disappeared by ioquatix on Saturday January 06, 2018 @05:20PM (#16087790)
You could sign packages and record their signatures along with the version. Which, coincidentally, is basically what https://teapot.nz does, e.g.: https://github.com/kurocha/geometry/blob/master/development-...

Although, I've never considered this in the case of an actual attack. It would make sense to actually fingerprint the entire source tree and record this too somewhere, so when you build it you know you are getting the right thing. Teapot basically defers this to git.

Re:Many packages suddenly disappeared by tetha on Saturday January 06, 2018 @04:14PM (#16087493)
> Is there a valid defense for a platform whose security relies on the unanimous cooperation of a widely-scattered developer base?

The defense is staged deployment and active users. This obviously depends on the blutness of the malicious code.

If I may assume easily noticed effects of the malicious code: A dev at our place - using java with maven - would update the library, his workstation would get owned. This could have impacts, but if we notice, we'd wipe that workstation, re-image from backup and get in contact with sonatype to kill that version. This version would never touch staging, the last step before prod.

If we don't notice on the workstation, there's a good chance we or our IDS would notice trouble either on our testing servers or our staging servers, since especially staging is similar to prod and subject to load tests similar to prod load. Once we're there, it's back to bug reports with the library and contact with sonatype to handle that version.

If we can't notice the malicious code at all until due to really really smart activation mechanisms... well then we're in NSA conspiracy land again.

Re:Many packages suddenly disappeared by maxander on Saturday January 06, 2018 @04:42PM (#16087627)
> If we can't notice the malicious code at all until due to really really smart activation mechanisms... well then we're in NSA conspiracy land again.

What about really dumb activation methods? I.e., a condition that only triggers malicious behavior several months after the date the package was subverted. You don’t have to be the NSA to write that.

What’s scary here is that there are simpleminded attacks that, AFAIK, we don’t know how to defend against.

Re:Many packages suddenly disappeared by tetha on Saturday January 06, 2018 @04:58PM (#16087705)
Mh, I have a rather aggressive stance on these kind of incidents, no matter if they are availability or security related. You can fish for them, you can test for them, and there are entire classes of malicious code you cannot find. For everything you do, turing complete code can circumvent it. There's a lot of interesting reading material going on in the space of malware analysis regarding sandbox detection, for example.

So stop worrying. Try to catch as much as feasible before prod. Then focus on detecting, alerting and ending the actual incident. If code causes an incident, it't probably measurable and detectable. And even then you won't be able to catch everything. As long as a server has behavior observable from the internet, it could be exfiltrating data.

Re:Many packages suddenly disappeared by didibus on Saturday January 06, 2018 @09:26PM (#16088739)
What if it encrypts user data?
Re:Many packages suddenly disappeared by eropple on Sunday January 07, 2018 @12:36AM (#16089423)
You have your tested backups, yeah?
Re:Many packages suddenly disappeared by tetha on Monday January 08, 2018 @04:22PM (#16100720)
Tested restores with at most 59 minutes of data loss for prod clusters within 90 minutes after order. 30ish minutes of downtime. We could even inspect binlogs for a full restore afterwards on a per-request basis for our big customers.

Cryptolocker on prod is not my primary issue.

Re:Many packages suddenly disappeared by paulryanrogers on Saturday January 06, 2018 @04:35PM (#16087592)
Sounds like good hygiene, though it seems burdensome if everyone must do it or seriously risk infection. Ideally there would be at least minimal sanity checks and a formal process before a package can be claimed by someone else.
Re:Many packages suddenly disappeared by dmitriid on Saturday January 06, 2018 @04:36PM (#16087597)
On top of that, they way countless packages are used everywhere is potentially exploitable: https://medium.com/@david.gilbertson/im-harvesting-credit-ca...
Re:Many packages suddenly disappeared by razorunreal on Saturday January 06, 2018 @08:16PM (#16088496)
In case anyone was considering sending him $10, no, his hypothetical code would not be running on the Google login page. Google does not pull in external dependencies willy nilly like that.
Re:Many packages suddenly disappeared by didibus on Saturday January 06, 2018 @09:28PM (#16088745)
I'd be surprised if they ran a thorough security audit on all code they import, but I'd rather believe they do.
Re:Many packages suddenly disappeared by jpalomaki on Sunday January 07, 2018 @10:04AM (#16091055)
On Google scale you quite certainly want to do that. Not just for security, but for legal reasons. You really don't want to end up using for example AGPL licensed stuff in wrong places and if you just blindly pull stuff with dependencies from package manager, this could easily happen.
Re:Many packages suddenly disappeared by thanatropism on Sunday January 07, 2018 @08:30PM (#16094000)
One of the recent True Geordie podcasts features the "YouPorn Guy" who talks about finding it near impossible to get lawyers not on a retainer from Google to fight them.
Re:Many packages suddenly disappeared by BeeOnRope on Sunday January 07, 2018 @03:45PM (#16092589)
Sure a legal audit is standard and usually much simpler than a full source audit for security, which has a complexity proportional to the project size.
Re:Many packages suddenly disappeared by kcolford on Saturday January 06, 2018 @06:00PM (#16087981)
That's actually even more scary than what's going on now... At least most of us are noticing and can check what's going on...
Re:Many packages suddenly disappeared by MagicWishMonkey on Saturday January 06, 2018 @06:50PM (#16088174)
Wouldn't you need to install those packages as root for the code to have privileges to take advantage of that exploit?
Re:Many packages suddenly disappeared by jbg_ on Sunday January 07, 2018 @02:48AM (#16089808)
I've known plenty of developers whose automatic response to `packagemanager install packagename` failing is `sudo packagemanager install packagename`.
Re:Many packages suddenly disappeared by semi-extrinsic on Sunday January 07, 2018 @03:25AM (#16089886)
I sincerely hope all modern package managers, when invoked with sudo, immediately spawn a very-low-privilege process that does most of the work sandboxed to /tmp/whatnot, and the root process just copies files to the right place and runs some system calls to update databases etc.
Re:Many packages suddenly disappeared by bennofs on Sunday January 07, 2018 @06:39AM (#16090458)
Most package managers I know support Turing complete install hooks. How would a package manager detect what parts of those require/are safe to run with root?
Re:Many packages suddenly disappeared by zbentley on Saturday January 06, 2018 @07:41PM (#16088374)
No. Packages would not need to be installed as root. Additionally, many possible ways to use the exploit in GP could run as unprivileged users.
Re:Many packages suddenly disappeared by MagicWishMonkey on Saturday January 06, 2018 @08:03PM (#16088438)
Wouldn't the package need to be executed as root, though? Or does spectre/meltdown not require privileged access?
Re:Many packages suddenly disappeared by Natanael_L on Saturday January 06, 2018 @09:19PM (#16088711)
No, that's the entire point. They need almost nothing at all but the ability to run code fast in a loop with memory calls. The entire point is that they bypass privilege checks.
Re:Many packages suddenly disappeared by wybiral on Saturday January 06, 2018 @05:55PM (#16087957)
An ipfs model would help. People would use a strong hash if the package or something.
Re:Many packages suddenly disappeared by zbentley on Saturday January 06, 2018 @07:44PM (#16088382)
I'm not sure if it would help much. That means you either have to have users be able to recognize and eyeball-validate hashes ("sure, this is left-pad-5ffc991e; that's what I want! Wait, shit, it's actually left-pad-5ffd991e, never mind; wrong package), or you need pre-existing databases of trusted hashes (which either puts you right back at a registry a la NPM, or leaves you reliant on a package.lock file or similar, which doesn't cover many common use cases for secure package signing).
Re:Many packages suddenly disappeared by wybiral on Saturday January 06, 2018 @08:46PM (#16088607)
I just meant as a solution to the fact that people can typosquat or jack a name when a package is deleted.

If the developers can't get the hash right then there's not much that can be done.

Re:Many packages suddenly disappeared by jannotti on Saturday January 06, 2018 @04:16PM (#16087503)
That's a scary scenario, and all too possible.