Live data from Hacker News

Security by obscurity is underrated

utkusen.com

131–140 of 530 posts

Re: Security by obscurity is underrated

#131
post #112

Earlier quoted context omitted.

> You seem to be thinking in terms of security mechanisms either perfectly blocking attacks or being useless. That's the wrong model. It's about costs. This is something that bothered me quite a bit in Bruce Schneier's various comments on airline security. He repeatedly wrote that profiling young Arab men as likely terrorists was pointless, because if it became harder for young Arab men to get through security, terro…

But it’s easier to find Arab women. Or an Irish girlfriend of an Arab man. Or two old Korean people. (All real examples)

I'm pretty sure the potential recruitment pool of young Arab men is still many times greater than the pool of Irish girlfriends of Arab men.

It's about improving the odds/reducing the exposure, not achieving some theoretical absolute perfection.

Re: Security by obscurity is underrated

#132
post #103
post #85

Earlier quoted context omitted.

I could be wrong, but if you are using public/private keys to authenticate to ssh, then even attacks that can listen in on the connection would be limited. Because the private key is never transmitted, unlike a password.

With heartbleed, a bug in the implementation of the protocol led to the server randomly leaking contents of the server’s memory, which could be anything from private keys to user or system passwords to other confidential information. No passwords or MitM was required. You can read more at heartbleed.com

And it still doesn't matter, because sshd literally never has the private key that allows access. If a server only allows access via SSH key, you could literally have a complete RAM dump of the whole system and not be able to access it.

Re: Security by obscurity is underrated

#133
post #72

Earlier quoted context omitted.

> Assume for every code obfuscator there's a deobfuscator or at least someone as clever as you out there. There is still some information lost in the process: - "let eigenvector_coefficient = 23" => "let x = 23" A de-obfuscator isn't going to be able to recover the valuable information contained in the original name. Will it stop a determined attacker? Maybe not, but it would surely slow them down as they now need to…

Let me give you an example. At a previous job as a devops, of my predecessors frequently used these "techniques, minus the encrypted database but I sure he would have done it if he knew how. So there was some buggy internal app they needed some new features added to and the person who wrote it thought he was clever and obfuscated the code. It took me a whopping 30 minutes churn through his 'clever' obfuscation scheme…

> I'm going to find whatever port your running ssh on if your running it.

Not if you have to port knock before the ssh port is open to new connections.

Re: Security by obscurity is underrated

#134

Earlier quoted context omitted.

It might make sense in some contexts, but code obfuscation is a great example of where software engineers think it provides security where it provides none. Developers often have some idealized notion that an attacker is going to need to piece their program logic back together and try to decode the purpose of each obfuscated variable in order to find a hardcoded password/value. In reality an attacker is just going to…

Exactly. If you're running crypto and think getting rid of variable names is going to stop people; it's not. Any off-the-shelf algorithm is usually easy to recognize to an accomplished reverse engineer with a basic background of what kind of things they're looking for.

Honestly, the modern JavaScript toolchain is better at giving reverse engineers a headache than 80% of binary obfuscators.

Re: Security by obscurity is underrated

#135
> In this post, I will raise my objection against the idea of “Security by obscurity is bad”.

I think this article's fundamental flaw is that it conflates the concepts of obscurity and a secret.

To start with, a definition: a system is secure if an attacker has no reasonable chance of unauthorized access over a relevant period unless they are in possession of necessary secrets.

SSH with public-key authentication is secure by this definition, since the (remote) attacker has no realistic chance of guessing the proper secret key within a human lifetime and there is no better-than-chance way to obtain the secret key. Likewise, a strong, high-entropy password is impractical to guess.

Running on nonstandard ports, however? It doesn't add practical security because guessing is so trivial. The author's twitter reach had a 50/50 split on whether they scanned all ports for pen-testing, so that implies that using a nonstandard port increases the time-to-compromise from either (lifetime of the universe) or (about an hour) to twice that, depending on whether the second (real) layer of security is vulnerable. In neither case does the obscure port provide meaningful protection.

Some activities like port-knocking can add security, but only if the practitioner thinks of the knocking as a secret from the start. That requires:

* Limiting who has knowledge of the secret (i.e.: a port knocking routine known only to you is secret; one distributed in a public client for access to a production service is not), * Having plans in place to change the secret if it is ever compromised (DeCSS) or found to be flawed, and * Ideally ensuring that the secret cannot be guessed / confirmed independently of other secrets.

Other suggestions in the article ignore this difference:

* Database encryption requires an attacker to possess two secrets for extraction (internal access to the database plus the key) rather than just one. It's not obscurity. * Randomizing variable names or obfuscating code is not a secret because an interested attacker can reverse the obfuscation with ordinary human levels of effort. The confidence here is strictly false, since it "secures" against low-effort attackers and not high-effort ones. The "secret" is distributed publicly, so it is no secret at all. * The convoy example is again a secret; the point is that a would-be attacker does not know which car contains the target and has no reasonable ability to guess with better-than-chance success.

Obscurity goes from marginally effective (or outright ineffective) to counterproductive when its implementation makes it harder for the designer to reason about their own system. Someone who rolls their totally unique cryptosystem is relying in part on algorithmic obscurity for their security, but in doing so they give up on established (and battle-tested) best practices in favour of their own limited analysis.

Ultimately, the "Swiss cheese" model of security is a poor analogy because a big number for a human is a small number for a computer. To take the convoy analogy again, a would-be attacker is only going to get one shot, but a computer can try billions.

Re: Security by obscurity is underrated

#136

Agree with the article. People have been misinterpreting "security by obscurity is bad" to mean any obscurity and obfuscation is bad. Instead it was originally meant as "if your only security is obscurity, it's bad". Many serious real-world scenarios do use obscurity as an additional layer. If only because sometimes, you know that a dedicated attacker will be able to breach, what you are looking for is to delay them…

Many serious real-world scenarios do use obscurity as an additional layer

It works for the military, for spy agencies, and governments.

If obscurity didn't have any benefit, then the military's latest weapons wouldn't be tested in the Nevada desert, or some remote island; they'd be tested in Illinois, or off the coast of Long Island.

Re: Security by obscurity is underrated

#137

Earlier quoted context omitted.

But the examples given won't help and is just bad advice in general. - Assume for every code obfuscator there's a deobfuscator or at least someone as clever as you out there. - Randomizing variable names it just a nuisance, it won't stop any competent pen tester or attacker. - Encrypting the database is an odd one. Your program will also have to decrypt the data to use it. Where do you store the encryption keys? In y…

>Randomizing variable names it just a nuisance, it won't stop any competent pen tester or attacker. Sure it will. Imagine that your old, unpatched Wordpress admin is at /random-gobbledygook instead of /wp-admin. An attacker would have to try to hit random alphanumeric directories of your webserver over and over again, hoping that he stumbles across a specific thing that they can attack. This is completely impractical…

I ran a world-writable off-the-shelf wiki for years. Trivially tweaked the edit url, visible on every page. But that was enough to break automated spam tooling defaults, so the spamming human might get to see a note, pointing out that robots.txt was blocking indexing, so there was really no reason to waste both our times. The dominant threat wasn't the spammer, but their dumb automation.

Re: Security by obscurity is underrated

#138
post #58

It seems to me that the article is missing a few of points on what "security by obscurity" means. From Wikipedia: "reliance [...] on design or implementation secrecy as _ the main method _ of providing security [...]" So, to use the model mentioned in the article, a single slice of cheese. It's not "an additional layer of defense", it's the main one (so you have other... weaker layers? ¯\_(ツ)_/¯) Second, "reliance on…

We have a few technologies in play in the world that operate on obscurity. Shared industry passwords like the DVD encryption key:

https://en.wikipedia.org/wiki/AACS_encryption_key_controvers...

Even if it was technically a password, it's really obscurity because the password was literally available in billions of devices worldwide - it's just hard to read. Then someone figured it out (specifically in WinDVD).

So, when someone says obscurity is fine, it's fun to remind them that all DVDs are cracked because someone thought so. (Not that I think that's a bad thing)

Re: Security by obscurity is underrated

#139
post #65

Agree with the article. People have been misinterpreting "security by obscurity is bad" to mean any obscurity and obfuscation is bad. Instead it was originally meant as "if your only security is obscurity, it's bad". Many serious real-world scenarios do use obscurity as an additional layer. If only because sometimes, you know that a dedicated attacker will be able to breach, what you are looking for is to delay them…

In nature, prey animals will sometimes jump when they spot a predator[1]. One of the explanations is that this is the animal communicating to the predator that it is a healthy prey animal that would be hard to catch and therefore the predator should choose to chase someone else. I think we can kind of view obscurity in the same way. It's a way to signal to a predator that we're a hard target and that they should give…

[deleted]

Re: Security by obscurity is underrated

#140

Earlier quoted context omitted.

Exactly. If you're running crypto and think getting rid of variable names is going to stop people; it's not. Any off-the-shelf algorithm is usually easy to recognize to an accomplished reverse engineer with a basic background of what kind of things they're looking for.

Honestly, the modern JavaScript toolchain is better at giving reverse engineers a headache than 80% of binary obfuscators.

As someone who is not very good at JavaScript reverse engineering, I would tend to agree that minifiers are pretty annoying.
Post reply on HN