Live data from Hacker News

How to gain code execution on hundreds of millions of people and popular apps

kibty.town

261–270 of 350 posts

Re: How to gain code execution on hundreds of millions of people and popular apps

#261
In top down orgs, no product manager care would blink a the at wasting time on security.

This is why we need to remove incompetent product managers that have no clue and somehow are in the position to control what developers can work on.

Re: How to gain code execution on hundreds of millions of people and popular apps

#262

Earlier quoted context omitted.

You can define a CSP header to only exec 3rd Party scripts with known hashes

But that doesn't make it easy to integrate a new script from an author who doesn't provide the hash already.

Vendor your dependencies. It’s better for you as a maintainer anyway, since caching only works[0] with first party domains with any reliability.

And once you vendor your dependencies you can calculate the hash yourself

[0]: there are caveats to this

Re: How to gain code execution on hundreds of millions of people and popular apps

#264

Earlier quoted context omitted.

And I don't necessarily disagree either; good callout that it _was_ about improperly configured ACL's, I meant more that it wasn't related to keeping test rules alive. For 150k+ salaries, frontend dev salaries are generally a lot less than their backend counterparts. And scrappy startups might not have cash for competitive salaries or senior engineers. I think these are a few of the reasons why Firebase becomes dange…

150k is more than a fire fighter in San Francisco. https://sf-fire.org/employment-opportunities/h2-firefighter I don't think it's out of the question to expect professionalism at 150k. These are VC funded companies, not a couple of college kids scraping together a prototype. Then again, if I was a CTO seeing stories like this I'd be inclined to NOT use Firebase. I'm actually using Supabase right now since I don't lik…

> I don't think it's out of the question to expect professionalism at 150k. These are VC funded companies, not a couple of college kids scraping together a prototype.

You can expect whatever you want, just prepare to be disappointed. We have absolutely learned by now that unless there very real consequences for doing or not doing something, you will regularly see the worst possible thing happen. This is why licenses exist and legal 'sign-offs' exist. There needs to be a licensing organization that can revoke people's ability to get certificates or to even be employed working on certain aspects of software if we ever want to solve this problem. I mean, you even need a license to cut hair in many states.

Re: How to gain code execution on hundreds of millions of people and popular apps

#265
post #164

Earlier quoted context omitted.

I think that's throwing the baby out with the bathwater; sane defaults are still an important thing to think about when developing a product. And for something as important as a database, which usually requires authentication or storing personal information, let your tutorials focus on these pain points instead of the promise of a database-driven app with only clientside code. It's awesome, but I think it deserves th…

Any purported expert who uses software without considering its security is simply negligent. I'm not sure why people are trying to spin this to avoid placing the blame on the negligent programmer(s).

And if it is the programmer's fault, what can we do about it? People are trying to avoid finding a solution that isn't throwing their hands up in the air. We either need to solve the problem in a place that is effective with the situation as it is (the tools) or we need to solve the situation such that it has consequences for doing the wrong thing on the part of the developer. Which shall it be?

Re: How to gain code execution on hundreds of millions of people and popular apps

#266

As an Electron maintainer, I'll re-iterate a warning I've told many people before: Your auto-updater and the underlying code-signing and notarization mechanisms are sacred . The recovery mechanisms for the entire system are extremely painful and often require embarrassing emails to customers. A compromised code-sign certificate is close to the top of my personal nightmares. Dave and toDesktop have build a product tha…

How about we don't build an auto-updater? Maybe some apps require an extremely tight coupling with a server, but we should try our best to release complete software to users that will work as close to forever as possible. Touching files on a user's system should be treated as a rare special occurrence. If a server is involved with the app, build a stable interface and think long and hard about every change. Meticulou…

I have clients who have been running for more than 10 years in old versions for diverse reasons. I design a layer of backward compatibility in our apis to keep updating optional. it works well

Re: How to gain code execution on hundreds of millions of people and popular apps

#267

Earlier quoted context omitted.

Based on which claim? That 12 months from now they might accidentally discover a new bug just as serious?

If you think someone is obviously wrong, it might be worth pausing for a second and considering where you might just be referring to different things. Here, you seem to understand “this” to mean “a serious bug.” Since it’s obvious that a serious bug could happen, it seems likely that the author meant “this” to mean “the kind of bug that led to the breach we’re presently discussing.”

I do not assume anyone is obviously wrong and prefer to ask questions. Most bugs exist in classes, and variants are something you typically consider when a bug results in a production incident.

I'm not sure I read anything that makes me confident this class of bugs could never recur. I could be reasonably confident this _exact_ bug in this _exact_ scenario may not happen again, but that only makes me more concerned about variants that may have equal or more serious implications.

So I'm wondering which claim did it for you? I only really saw pen test as a concrete action.

Re: How to gain code execution on hundreds of millions of people and popular apps

#268

Earlier quoted context omitted.

This one is right. Have a shoe-box key, a key which is copied 2*N (redundancy) times and N copies are stored in 2 shoe-boxes. It can be on tape, or optical, or silicon, or paper. This key always stays offline. This is your rootiest of root keys in your products, and almost nothing is signed by it. The next key down which the shoe-box key signs (ideally, the only thing) is for all intents and purposes your acting "roo…

> It can be on tape, or optical, or silicon, or paper. You can pick up a hardware security module for a few thousand bucks. No excuse not to.

Yubico will sell you one for $650

https://www.yubico.com/store/

Re: How to gain code execution on hundreds of millions of people and popular apps

#269
post #19

> i wanted to get on the machine where the application gets built and the easiest way to do this would be a postinstall script in package.json, so i did that with a simple reverse shell payload From ToDesktop incident report, > This leak occurred because the build container had broader permissions than necessary, allowing a postinstall script in an application's package.json to retrieve Firebase credentials. We have…

I would start by dumping the enviornment variables and directory structure.

Re: How to gain code execution on hundreds of millions of people and popular apps

#270

Earlier quoted context omitted.

You can define a CSP header to only exec 3rd Party scripts with known hashes

But that doesn't make it easy to integrate a new script from an author who doesn't provide the hash already.

But you can .. get the hash yourself?

wget url; sha256 file

Post reply on HN