11 ms·
The State of Software Security in 2019
- redwards510 8y ago> Throwing away the idea of using ‘engagement’ as the sole or primary metric. What are some alternatives that are not a synonym for engagement?
- inetknght 8y agoCustomer satisfaction, perhaps? I can be satisfied with products that I don't use at every moment of every day. I am usually more satisfied with my life when I am not being gamed to be addicted to something such as a "free" product.
- zokier 8y agoHow do you quantify and measure satisfaction?
- AaronFriel 8y agoWell tuned and calibrated surveys, coded free-form responses (takes care to implement), net promoter scores, heck, at scale it might make sense to hire polling agencies to do this.
- IshKebab 8y agoReview scores of it's an app is one way.
- diminoten 8y agoBut what if I want to know why you're not using my product every moment of every day, and what I'd have to change to do that? If you're satisfied with my product, but you only buy it once a year, that's bad for me. If you're not very satisfied with my product, but you buy it 30 times a year, that's better. I'd rather have 30 sales than 1 sale, even if you badmouth my product and lose me 15 more sales down the line. TBH I may not give a crap how "happy" you are if you're still engaging. Satisfaction is trailing, engagement is leading.
- sverige 8y agoIf someone badmouths the product, they aren't satisfied. And even if they're engaged with it, odds are high they're looking for something better. Besides, the only reason engagement became a thing is because the way people are paid is based on ad revenue instead of actual payment by the person using the product. Satisfaction is king when the user and the customer are the same person. Just ask any insurance company (for example).
- groby_b 8y agoAnd that's all that's wrong with engagement in a nutshell. You prioritize your needs over the user's needs. It's not about trailing or leading indicators, it's about not burning down the rest of the world just to benefit yourself. "I may not give a crap how 'happy' you are if you're still engaging" - you've really put it succinctly. That's the mentality of a drug pusher.
- diminoten 8y agoYou're missing one critical point -- lack of engagement means you can't iterate with the customer. No engagement means you can't improve, and you can't make your customer happier. Nothing happens without engagement. You can survive an unhappy customer as long as they're still around, even if they're only providing feedback and aren't likely to buy again. You can't survive nobody coming into your shop in the first place.
- inetknght 8y ago> You're missing one critical point -- lack of engagement means you can't iterate with the customer. No engagement means you can't improve, and you can't make your customer happier. You can iterate with the customer without being abusive or invasive about it. Show exactly what's being tracked and provide mechanisms for the person to decline its use. Recognize that the customer is valuable; compensate them for their time if you're tracking what they do or answering questions about their experiences. > You can't survive nobody coming into your shop in the first place. Even untracked customers can continue on to purchase goods and services. If you can't build a business site which is capable of basic business operation then perhaps you should hire competent web developers and/or a good marketing team; or perhaps your business wasn't so needed after all.
- lmkg 8y agoThat's a little bit of a Catch-22. "Engagement" is not a well-defined metric, and in practice when people try to measure it, they end up justifying the use of any number they happen to be able to measure at the moment. So almost any number can plausibly be called an "engagement score" or something similarly vague. Your goal should be for something more specific, and ideally at least a tad more concrete. Things like "product satisfaction," "positive impression of brand," and "purchase intent" could all be synonyms for "engagement" but they are not synonyms with each other because they are all more specific and narrowly-defined. And furthermore, they're better guidelines because particular features or activities could be well-suited for one and not another, so optimizing towards one of those actually provides some focus.
- inetknght 8y agoI agree with most of this dude's points, except about not starting new projects with C++. I think C++ still has good strong merit but it definitely needs some critical thinking about where it's used. Other languages are likely better candidates for most things.
- acdha 8y agoThe author works on Google Chrome so I'm pretty sure they're familiar with the pros and cons of C++. It's possible that there's a place for using C++ on a new project in 2019 but that would definitely be a decision to justify with a comprehensive process for mitigating the risks of not using e.g. Rust.
- blub 8y agoAlthough on HN it looks like there's some kind of competition happening, Rust is a rounding error compared to languages like Java, C# or even Swift which are actually chosen instead of C++ for many projects. I'm looking at job ads periodically and Rust is almost not at all present. I've talked to someone from the Rust community and they told me that "many" companies are using Rust, but not advertising it and not hiring for it on public channels. Whatever the reason, the Rust skills market seems to be non-existent, which is a bad position to be in when considering whether to start a project in Rust. Project = commercial product that makes money, not OSS or start-up dreams.
- tptacek 8y agoThe subtext of Rust in posts like this is that Rust compiles programs that are pin-compatible with C/C++ programs. Without rethinking the architecture of a kernel, for instance, you're meant to be able to write Rust drivers. I prefer other higher-level languages to Rust; I'd rather just work with garbage collection than wrangle the Rust borrow-checker. But if you need to write software that can't abide GC, Rust is basically the only memory-safe game in town.
- pjmlp 8y ago
- ademup 8y agoInteresting write up. Having seen iOS in 'The Good' section with no mention of Linux or Windows, I thought things might get interesting in "The Bad" or "The Ugly". But there was no mention at all. That was a bit jarring, though I respect the author for omitting them if it is just ignorance in those areas. I'm not sure if there is a connection or intent, but the result may be a (tacit?) endorsement of Apple.
- DyslexicAtheist 8y agoI'm an enthusiastic Linux user (called myself evangelist the first years of using it) and was always on a mission to defend it against the dark evil empire that was Microsoft. Apple was only used by graphic design types back then. Now that I've established how much I love Linux and the FOSS movement (I'll still defend it over proprietary works) , I'm also a realist. Realist because when you do a lot of security dev then reality on Linux looks different today. Sticking for sake of discussions with monolith kind of kernels (comparing oranges with oranges) I absolutely hate the security design choices of modern Linux. Linux could do a lot better in this regard and Torvalds doesn't do the industry a favor when he calls security experts a bunch of masturbating monkeys. I can see where he comes from but the attack surface on any type of Linux (whether embedded or not), I'd go as far to call it total trash when compared to its BSD cousins. A lot of this isn't just Linux's fault considering how big the system is today. To realistically secure a Linux system is almost impossible (within budget+time that is) when compared to BSD. The only reason why I still put up with Linus is because of FOSS. But if it were purely for security (on a desktop system) I'd have to say Linux is really poor. It hasn't always been that way. My theory (really just theory) is that while Microsoft got hammered for decades for having shit security (remember trustworthycomputing.com ??). And I think the message slowly but gradually sank in at Redmond. Microsoft (and I still get hick-ups when saying it) somehow got their act together. I believe all that pressure amounted to something in the end while the Linux community missed the train. Not to say that there aren't brilliant ideas coming out of that community but there is very little pressure to provide integrated security that actually protects the user in a coherent way. You get lots of little pockets of good and bad (as is the nature of FOSS) and integrating it isn't even done well by the major distributions. Again not saying Linux can't be secure but to make it good depends a lot on who integrates and sets up the system. And for the end-user who only has a semi-technical background (never heard of threat-modeling or grsec ... for them it's a dumpster fire). I'm not comparing Linux to Apple here because Apple security is brilliant and thought all the way through to the UI/UE level. Linux in that regard doesn't even stand a chance. @thegrugq has a pretty good guide for OpSec/ComSec which is still relevant to this very day that spells out the tough reality (which a Linux fan like myself doesn't always appreciate hearing): https://news.ycombinator.com/item?id=8950875 https://news.ycombinator.com/item?id=8950875
- noir_lord 8y agoWhat a beautifully written article with informative links. http://lucacardelli.name/Papers/TypefulProg.pdf http://lucacardelli.name/Papers/TypefulProg.pdf is now next on my list when I finish reading A Philosophy of Software Design (which is brilliant if you haven't seen it).
- nickpsecurity 8y agoCardelli's Modula-3, a C++ alternative, also illustrates excellent balance of simplicity, programming in large, compile time, and run time. Expanding on that carefully like with macros, a borrow checker, and LLVM integration would have made for a simpler, safer, systems language. Give it a C-like syntax with C compatibility, too, for adoption. https://en.m.wikipedia.org/wiki/Modula-3 https://en.m.wikipedia.org/wiki/Modula-3
- noir_lord 8y agoI always liked the look of modula (Turbo Pascal was my first true language, I don’t count BASIC). Same with Ada I just have no use case for it alas. At least C# (amongst others) borrowed a fair amount of the concepts.
- pjmlp 8y agoYou mean C# I guess. :) Actually with .NET Native, the GC improvements in .NET 4.6 (TryStartNoGCRegion() and other companion methods), and the C# 7.x improvements taken from Midori, it is quite close.
- nickpsecurity 8y agoC# looked a lot more complex than Modula-3 when I last looked at it. The book was thick. They definitely did nice things in C#. I just don't know it's fair to equate it with the simplicity vs get shit done vs small runtime of Modula-3. I am up for you elaborating a bit on the second sentence since it sounds interesting. Not doing .NET, I don't know what any of those are except the middle one which sounds like SYSTEM/UNSAFE sections.
- Symmetry 8y agoARM is a bit more secure than x86 in that there's one unambiguous way to read a sequence of ARM instructions but with x86 you might have two entirely different but completely valid instruction sequences if you start reading at address FOO versus address FOO+1.
- ChrisSD 8y agoWhile that is nice I'm not quite understanding how this is a security issue? Can code reuse attacks exploit it?
- tbirdz 8y agoYes, look at ROP gadgets, for example.
- Symmetry 8y agoHere's an example http://mainisusuallyafunction.blogspot.com/2012/11/attacking-hardened-linux-systems-with.html http://mainisusuallyafunction.blogspot.com/2012/11/attacking...
- inetknght 8y ago> Actually, file descriptions. The description is the kernel state pertaining to an open file. The descriptor is a small integer referring to a file description. When we send an FD into a UNIX socket, the descriptor number received on the other end might be different, but it will refer to the same description.↩ Oh man, that perfectly explains a formerly-unanswered question I had about how that mechanism worked. Thanks for linking.
- beefhash 8y agoAnd then you have Thumb instructions. If you don't know if you'll stay in Thumb or ARM mode, you can still have weird instruction mixing.
- Symmetry 8y ago
- waynecochran 8y agoELI5 : It is 2019. Why isn't everybody using pubkey crypto for email? i.e., transparent support of: * I publish a public key * Anyone can use it to send me an encrypted email * I use my private key to read * as a bonus, I sign my email with my private key * anyone can verify with my public key
- bitexploder 8y agoBecause it is a giant pain in the rear. Email is never going to be an end to end secure protocol. Period. It’s never going to be transparent. S/MIME could have gotten the world there but email has too much inertia. Ultimately you have to figure out how to trust keys, that turns out to be the hard part. Use Signal.
- waynecochran 8y agoI get that "trust" is the hard part, but for a circle of people that I directly know it shouldn't be hard. I wasn't expecting the email protocol to change, just that I (my email client) would send / received cypher text (e.g., base64 encoded). The cypher text would be transmitted just like any other message.
- Kalium 8y agoYou're right! Sending and receiving safely encoded and encrypted ciphertext is so easy and straightforward that it should be common by now. Perhaps it could be worth considering that there could be complexities from another angle? Key discovery and management are complex tasks that require a working knowledge of PKI. These are also tasks that can be very dangerous to undertake in ignorance, as even a small mistake can lead to a full compromise. Is it possible that many users find these difficulties highly challenging?
- josho 8y ago> Key discovery and management are complex tasks SMIME simply included the public key with every message. Solving initial discovery could be as simple as using a well known address, e.g.: www.emailprovider.com/.well_known/kalium.pub. As for key management Apple does a good job managing this (e.g. my understanding is that Apple Messages are E2E using keys yet I've never managed on of these keys), other software vendors would need to step up. So, it's not a user problem, but an incentives problem. Companies aren't incentivized to solve this problem. OSS could, but the network effects mean that any solution is dead unless you can get the likes of gmail on board.
- jason46 8y agoDoes anyone else think alexa/(services that record and retain) should be on the list of bad.
- nickpsecurity 8y agoI like this article. I want to correct something on C and C++ side. He hints it's barely possible to write correct C. He doesnt mention how safety-critical sector, esp regulated, cranks out reliable C on a regular basis. They use C subsets with careful coding, reviews, and every automated tool they can. Static analyzers, automated testing, you name it. There's also analyzers that, when they work, can prove absence of entire classes of errors. RV-Match, Astree Analyzer (used by Airbus), and Frama-C are examples. CompCert eliminates compiler errors afterward. Most security-critical development doesnt use tools like these even when companies can afford them. It's apathy, not technological capability. Now, C++ is special given it was designed to reduce risks of using C. Yet, almost all the verification tooling was for C and Java. C++ is just so complicated that it's hard to statically analyze or even build tools for. That means a C program done like above might have fewer errors than a C++ program. For that reason, I recommend avoiding C++ in favor of either C or safe systems languages compiling to C to take advantage of its verification tooling. They're getting hit with these vulnerabilities because they using a harder-to-analyze language possibly with coding strategy that adds difficulty. See Cleanroom Software Engineering or Praxis's Correct-by-Construction for examples of low-defect, development strategy.
- blub 8y agoI completely agree with your assertion regarding the verification tools for C, unfortunately most commercial projects (i.e. not regulated) won't pick between e.g. Frama C and C++ and instead will choose between plain old C and C++, thereby making C a very poor choice.
- snazz 8y agoNitpick: The idea of your comment is sound, but Frama-C is a C program static analysis framework, not a C subset. You still write regular old C even with Frama-C.
- nickpsecurity 8y agoYeah, but I didn't say pick between Frama-C and C++. I said pick between a subset of carefully-written C with all the tooling one could throw at it and C++. The latter comparison is an easier tradeoff to make than the former. Especially with the tools I mentioned with low, false positives. They'd be serving Google well right now. Among other users.
- cheschire 8y agoI’m happy to see npm in the ugly section. I wish the code security review pipeline got as much attention as the package deployment one.
- tcd 8y agoIt's hilarious, after the event-stream fiasco last year, NPM has changed...Nothing. NodeJS made a 'package maintenance' repo, but failed to address the actual root cause of the problem. We'll see plenty of other NPM disasters this year, and as always, nothing will change because security is an afterthought not a core mission principle. If it was, NPM wouldn't exist in its current form. It's confusing, adding extra security wouldn't even be that difficult or time consuming, they just don't. I wish it were possible to take over a project with individuals who actually care. The people in charge of NPM are incompetent at running a secure, large scale distribution system, why they're still allowed to be a part of it is beyond me... If security isn't your top goal you don't belong in charge of a very important, widely used ecosystem which many rely on.
- staticassertion 8y agoNPM announced support for 2FA and read-only tokens soon after the incident. https://blog.npmjs.org/post/166039777883/protect-your-npm-account-with-two-factor https://blog.npmjs.org/post/166039777883/protect-your-npm-ac... Can't say I'm aware of any other package manager even discussing these issues.
- saghm 8y agoObviously this is different than implementing it from scratch, but crates.io (the Rust package repository) does authentication through Github OAuth, which in practice gives you 2FA.
- ixrec720 8y agoSince you said "even discussing", might as well mention that the Rust community has discussed adding 2FA support to cargo: https://internals.rust-lang.org/t/requiring-2fa-to-publish-to-crates-io/7931 https://internals.rust-lang.org/t/requiring-2fa-to-publish-t.... But as far as I know, crates.io/cargo still has no 2FA feature of its own. On the other hand, if your crates.io account is linked to a GitHub account, you could have 2FA via GitHub. So I'm not entirely sure whether "cargo supports 2FA" would count as true or false at the moment.
- stcredzero 8y agoit is just barely possible to significantly raise the cost of exploiting memory corruption vulnerabilities for projects implemented in unsafe languages. If there is something positive walled gardens can bring to the table, it would be more of ecosystems where entire classes of exploits are completely mitigated. I think it's something that users and devs should be asking for. (We did it with USB plugs you don't have to flip over.)
- saagarjha 8y agoOff topic, but I just love this article: it's 22.8 KB, with a bit of hand-written JavaScript that the website works well without, and just enough CSS to make reading pleasant.
- wahern 8y agoThe advice to use -Weverything is very bad advice. See, e.g., https://quuxplusone.github.io/blog/2018/12/06/dont-use-weverything/ https://quuxplusone.github.io/blog/2018/12/06/dont-use-wever... Using -Weverything other than for a one-off, manual build, is a sure fire way to result in one or several of 1) hacky code that works around some compiler author's style preferences, 2) less safe code because of the workaround hacks, or 3) coworkers quickly learning to ignore or disable (e.g. using inline #pragma's) diagnostics. For both GCC and clang, -Wall comes close to the line of rejecting objectively correct and good code, but doesn't quite cross the line. -Wextra crosses that line (expect it to reject some correct and good code) but the pros often outweigh the cons. -Weverything blows past the line and wraps around the earth several times.