News for hackers. Stuff that matters.
Re:Reddit 1.0 source code by notthemessiah on Thursday March 29, 2018 @11:25PM (#16713462)
It's unfortunate that Reddit silently went closed-source before being forced to admit it. Certainly a betrayal of trust with their long-standing userbase.
Re:Reddit 1.0 source code by confounded on Thursday March 29, 2018 @11:52PM (#16713554)
Yup. I understand the scale and micro services thing, but they could at least keep the mobile clients open (even if with a lagged release for feature launches, or just periodic tarballs).
Re:Reddit 1.0 source code by jahlove on Friday March 30, 2018 @02:26PM (#16718581)
Like the abandonware that is AlienBlue.
Re:Reddit 1.0 source code by jschmitz28 on Thursday March 29, 2018 @11:55PM (#16713565)
Maybe having it be open source would represent a security risk? https://github.com/reddit-archive/reddit1.0/blob/master/data...
Re:Reddit 1.0 source code by Sylos on Friday March 30, 2018 @04:37AM (#16714645)
I mean, it shouldn't. Humanity is perfectly capable of building secure web services without having to keep the way it works a secret. You don't publish your encryption keys with your source code, which is what your security should be depending on.

And what's more, Reddit themselves did not even use that excuse in their official statement for it, even though to me their excuse felt even less logical.

Basically, they don't want to leak the crazy features that they're developing and have such piss-poor source code management that they cannot provide tarballs of clean states of their source code.

I mean, how do they deploy new versions, if they cannot cleanly separate feature development from stable code?

https://www.reddit.com/r/changelog/comments/6xfyfg/an_update...

Re:Reddit 1.0 source code by ajacksified on Friday March 30, 2018 @12:58PM (#16717778)
When I worked there, it mostly came down two two things that leaked into every product: anti-abuse (spam mostly), and ads/tracking.

Anti-abuse is useful to keep secret because it includes tools that make spammers think they're successful. I think it's a little more nuanced than the "open source code is more secure argument", which I totally agree with - but the anti-abuse includes active mitigation measures that constantly evolve; and in this case, obscurity to how this all works is actually valuable.

A reddit-specific ad or metrics implementation isn't useful to anyone else, and it was a tough sell that the codebase should be made more complex only to accommodate configuration for a small handful of users. I know, because I made the argument that we should when I created the open-source reddit-mobile repo, which was originally broken up into plugins like the reddit python codebase. Eventually it just wasn't feasible to maintain as a 2-5 engineer team rebuilding a 10-year-old website in a couple of months. That's a story for another time.

Personally - I find it sad, and I think it got rid of one more thing that made Reddit special. Unfortunately, the only metric you can attach to this is "how much longer does it take us to ship shit", and thus, it died.

Re:Reddit 1.0 source code by amelius on Friday March 30, 2018 @07:03AM (#16715140)
> Humanity is perfectly capable of building secure web services without having to keep the way it works a secret.

That's the same as saying that humanity is capable of building a large system without bugs, in an economically viable way.

Re:Reddit 1.0 source code by theon144 on Friday March 30, 2018 @09:18AM (#16715792)
No, it's just the most basic argument against security trough obscurity - how is this still a contentious point?
Re:Reddit 1.0 source code by throwaway3233 on Friday March 30, 2018 @09:33AM (#16715876)
The origin of that statement (Kerckhoff's principle) refers to cryptography, not to application security.

If you take a quantitative, cost-based approach to modeling security through adversarial capability, obscurity becomes a perfectly valid security measure if it's not used in isolation. We don't use it for cryptography because the tradeoffs aren't worth it. It's better to design cryptography with provable security based on mathematically rigorous computational hardness assumptions than it is to make secret algorithms.

In the context of application security, if the decision to obscure some or all of your system incurs a non-trivial cost to an adversary, it makes sense. We can't rigorously and mathematically prove the security of applications in the same way we can prove e.g. an algorithm is sub-exponential instead of polynomial time.

You often see "security through obscurity" mentioned in the same way that people cite "appeal to authority" or "ad hominem" fallacies in internet debates. The reality is more complex than that. Fundamentally, anything that increases the effort required by an adversary to successfully compromise your system is worth considering. You just shouldn't depend on it in its entirety. Closed-source software is a good example of robust security through obscurity, as basically any security engineer will tell you (I'd rather look at source code line by line to find vulnerabilities than try to find them through trial and error in a penetration test).

Re:Reddit 1.0 source code by zeth___ on Friday March 30, 2018 @07:22AM (#16715227)
Just look at Linux. The only way to keep bugs out of the kernel is to keep the source closed.
Re:Reddit 1.0 source code by GTP on Friday March 30, 2018 @01:37PM (#16718131)
No, having an open source kernel means a lot more developers looking at the code and working on a fix if some bug is found, rising the probabilities to find a bug and shortening the time required to fix it. How would keeping the source closed decrease the number of bugs?
Re:Reddit 1.0 source code by maruhan2 on Friday March 30, 2018 @06:45AM (#16715068)
In theory it shouldn't, but in practice people don't make perfect code that doesn't have vulnerabilities. But a lot of people would argue that by having many reviewers, you're reducing vulnerabilities. Thus, my stance is that "it depends on the situation"
Re:Reddit 1.0 source code by laburn on Friday March 30, 2018 @12:06AM (#16713604)
Making something closed source does not make your product more secure, it only makes it harder to look at. Determined people will still try to understand how your software works in order to accomplish their goals.
Re:Reddit 1.0 source code by wvenable on Friday March 30, 2018 @12:14AM (#16713627)
Security through obscurity is a valid and effective tactic -- it's simply ineffective on it's own.
Re:Reddit 1.0 source code by Skunkleton on Friday March 30, 2018 @12:56AM (#16713784)
To reinforce your point, see all pre-modern crypto techniques. It cannot be argued that they worked, and they were all certainly security through obscurity.
Re:Reddit 1.0 source code by onion2k on Friday March 30, 2018 @02:06AM (#16714052)
Aren't most examples things where it didn't work? The most famous case is the German "Engima" device from WWII (hardware- and 'software'-based, but cracked and readable for years before the Germans knew because they believed it was both obscure and effective) but it's wholly possible that most schemes were broken eventually. Keeping an obscure system secret is really hard, especially against a motivated attacker.
Re:Reddit 1.0 source code by azag0 on Friday March 30, 2018 @02:31AM (#16714155)
Enigma wasn't hard through obscurity. The Allies had the Enigma machine long before they were able to crack it. It was hard because with the equipment of the day, it was pretty much unbreakable in the same way that prime-number based cryptography is today. It was only A. Turing developing a completely novel kind of machine (https://en.wikipedia.org/wiki/Bombe) that enabled the decryption. In the same way that quantum computers could break the current cryptography easily. It's not obscurity, it's assuming that some (mathematical) task is hard.
Re:Reddit 1.0 source code by JetSpiegel on Friday March 30, 2018 @03:22AM (#16714354)
Don't forget about the Polish. They too broke the encryption before, but then they were invaded, and no precision machinery was available to increase the number of rotors to 10. https://en.m.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma Turing did it too, independently.
Re:Reddit 1.0 source code by azag0 on Friday March 30, 2018 @04:13AM (#16714565)
Didn't know about that! But it seems they were able to break the system only while the Germans where sending the settings of the plugboard in the header of each message. Once that was changed in the early 1940, their decrypting techniques wouldn't work anymore.

Btw, from the wikipedia article: "lazy cipher clerks often chose starting positions such as "AAA", "BBB", or "CCC"" Weak passwords were an issue already back then.

Re:Reddit 1.0 source code by Moodles on Friday March 30, 2018 @09:28AM (#16715848)
I went to Bletchley Park a couple of years ago. It's a very fascinating place. I remember hearing stories of code breakers who could infer that a piece of plaintext was all JJJJJJJJJJJ simply because, upon looking at the ciophertext, it contained no J (relying on the fact that no letter would ever encrypt to itself in Engima, because of the reflector). Indeed the Poles don't get enough credit for their contributions. And yeah, virtually all encryption was similar to Engima back then: the Allies too had a similar machine. I believe traitors sold secrets or Engimas were captures on U-boats and so on, so security through obscurity wasn't really a thing back then either.
Re:Reddit 1.0 source code by GTP on Friday March 30, 2018 @01:44PM (#16718191)
From what I know Turing didn't do it independently: the Polish sent their work to England about two months before being invaded, what Turing did is improve on their work so it could scale (the Germans added more rotors so the Polish decrypting machine wasn't helpful anymore).
Re:Reddit 1.0 source code by e12e on Friday March 30, 2018 @07:49AM (#16715335)
Re:Reddit 1.0 source code by nils-m-holm on Friday March 30, 2018 @02:38AM (#16714185)
I would consider the Enigma to be a very good counterexample to security by obscurity. Even after capturing a few of the apparatuses, it took a lot of mathematicians and engineers a lot of time and effort to build something that could decipher messages before the key became obsolete.
Re:Reddit 1.0 source code by kakwa_ on Friday March 30, 2018 @08:36PM (#16720955)
Enigma security didn't rely on security through obscurity. Having the machine didn't enable the allies to decrypt the messages. It relied on the secret of the... secret keys and the monthly key books.

It's also quite interesting to see that the Polish cryptanalists were able to reproduce the enigma machine used by the german army without even having seen one. They were able to deduce the number of rotors, the wiring, etc.

What in the end doomed the Enigma was the fact it was more a kitchen recipe than cryptography based on solid principles. It was a smart recipe for the time, but it had flaws (like the fact a letter could not be the same letter once encrypted). In some regards, most of our symetric encryption algorithms today feel a bit that way (with a lot more external scrutiny from experts however).

Even in WWII, I don't think that security through obscurity was considered as an absolute barrier. It's more in line with a "defense in depth" pattern. It gives a little more work to your adversary as he now has to figure out how your encryption works before breaking it, but it's not expected to last for long.

Re:Reddit 1.0 source code by Skunkleton on Friday March 30, 2018 @05:07PM (#16719801)
The Enigma was sort of on the cusp of a modern crypto technique IMO, not to say I know that much about it. I was more referring to other techniques like wrapping a message around a dowel or the Code Talkers from WW2.
Re:Reddit 1.0 source code by zeth___ on Friday March 30, 2018 @07:25AM (#16715235)
Yes, the Zimmermann Telegram is a perfect example of security through obscurity.
Re:Reddit 1.0 source code by ubernostrum on Friday March 30, 2018 @02:18AM (#16714101)
This is not really a useful response.

The trivial counterexample is that all modern crypto techniques rely on keeping a key, or part of a key, secret. That's security through obscurity, and you've just stated bluntly that obscurity never works under any circumstances, right?

What you want to do instead is talk about tradeoffs. Talk about how much information you need to keep secret in exchange for a given window of effectiveness, and state a preference for systems which provide longer windows of effectiveness while requiring less information (such as only a key, or part of a key, instead of a key and an algorithm) to be kept secret.

Also, take care with your argument about "pre-modern crypto techniques". Some of them remained effective for centuries after being invented, which is a far cry from your "cannot be argued that they worked", and not necessarily a favorable comparison with many modern techniques, which are lucky if they make it a couple decades before being broken.

(also, of course, all cryptographic systems eventually get broken, which is why every so often we switch to new algorithms, longer keys, etc., and you seem to be arguing that any system which eventually gets broken is a system which never worked, and that's also wrong)

Re:Reddit 1.0 source code by kyberias on Friday March 30, 2018 @03:51AM (#16714478)
We don't allow you to change the definition of "security through obscurity" just like that!

Using a public algorithm with secret key is BY DEFINITION _not_ security through obscurity. On the contrary.

Re:Reddit 1.0 source code by ubernostrum on Friday March 30, 2018 @05:21AM (#16714791)
In context it was fair because I was responding to a situation that was already playing with the definition, and once you allow that you have to allow taking it all the way.

Unfortunately, I started my reply to the wrong comment and didn't notice until after I'd posted it and it was too late to edit/delete.

tl;dr too many people have a knee-jerk "security through obscurity!" reflex action to things they don't like, and I have a reflex action of yelling at them about it, which sometimes misfires when I don't take care to reply at the right point in the thread.

Re:Reddit 1.0 source code by bitexploder on Friday March 30, 2018 @04:07AM (#16714535)
Agreed. Kerchoff's principle isn't really up for debate.
Re:Reddit 1.0 source code by stevekemp on Friday March 30, 2018 @02:48PM (#16718757)
Which reminds me of how this site was hacked:

https://news.ycombinator.com/item?id=639976

Re:Reddit 1.0 source code by AFNobody on Friday March 30, 2018 @01:03AM (#16713806)
Hashing passwords is security through obscurity by that reasoning. That does not make them less of a security function.

Just something to keep in mind.

Re:Reddit 1.0 source code by Sylos on Friday March 30, 2018 @03:53AM (#16714485)
"Security by obscurity" tries to keep the way that your encryption method works obscure, it does not try to keep a specific key obscure.

For example, if your way to encrypt works like this:

1) Shift all letters along by 5.

2) Cut out every second word and put them behind the message in order.

3) Whenever there's an f, s or y in a word, double up that word and shift the second word's letters by 7.

Then if your enemy figures out how your method works, you have to come up with a completely different method.

The opposite to security by obscurity would instead once come up with a method that entirely depends on a key. You can then publicize that method (or not), and if your enemy finds out your key, you just choose a new key and you're fine again.

Re:Reddit 1.0 source code by keyle on Friday March 30, 2018 @12:03AM (#16713588)
It goes both ways, being open-source can also make your product more secure, as it's out in the open and a lot more eyeballs look at the code.
Re:Reddit 1.0 source code by colejohnson66 on Friday March 30, 2018 @05:14AM (#16714764)
Tell that to OpenSSL
Re:Reddit 1.0 source code by krapp on Friday March 30, 2018 @09:48AM (#16715999)
Open source allows for the possibility of 'many eyes making all bugs shallow', but I think the open source community assumed that was a guarantee, at least in the case of mission critical software - it's important so obviously it's being scrutinized, right?

On the other hand, with closed source, people are presumably being paid to study the code, potentially fewer but a still fixed number of eyes on the code, as it were. But then, since it's closed source, no one really knows what's going on outside the company.

Moral arguments aside, neither system is perfect.

Re:Reddit 1.0 source code by __s on Friday March 30, 2018 @07:08AM (#16715165)
Where's your flawless closed source SSL implementation?
Re:Reddit 1.0 source code by colejohnson66 on Friday March 30, 2018 @09:19AM (#16715801)
Wow. Offended much? Did I say (or even imply) I had one? All I did was provide a counter to the claim that open source means more eyes which could make your software more secure.
Re:Reddit 1.0 source code by serf on Friday March 30, 2018 @05:50PM (#16720075)
>All I did was provide a counter to the claim that open source means more eyes which could make your software more secure.

You really didn't say much about open source and it's ability find bugs; you just cited a particularly nasty set of bugs on an open source project as a way to condemn all of open source work to being as bug-ridden as other methods.

It was more snark than it was providing a clean example as a counter-point. Someone could easily point out the millions of bugs in closed source projects as a counter to your point of equal caliber; but I think that it's clear to most of us that NO methods that we yet understand will result in bug-free code.

Re:Reddit 1.0 source code by PascLeRasc on Friday March 30, 2018 @12:36AM (#16713711)
They could certainly upload a version of that file with dummy variables (unless that's what this is).
Re:Reddit 1.0 source code by justinator on Friday March 30, 2018 @01:07AM (#16713828)
Me thinks they didn't allow access to the db from just anywhere, regardless.
Re:Reddit 1.0 source code by Qub3d on Saturday March 31, 2018 @09:05PM (#16726099)
That violates Kerckoff's principle[0],a cornerstone of modern information security. I would run far, far away from anyone coughtelegramcough who claims "its secure, don't worry about it" and otherwise refuses to expose their codebase to scrutiny.

[0]:https://simple.wikipedia.org/wiki/Kerckhoffs%27s_principle

Re:Reddit 1.0 source code by ebbv on Friday March 30, 2018 @07:07AM (#16715161)
A lot of bad developers like to use this excuse but it doesn’t hold water. Open source has a history of producing better security results.
Re:Reddit 1.0 source code by drosan on Friday March 30, 2018 @09:32AM (#16715867)
That's just shitty hardcode, sane human beings build only prototypes like that, not production code. Going opensource would have that code reviewed and fixed -> means positive impact on security.
Re:Reddit 1.0 source code by Mononokay on Thursday March 29, 2018 @11:38PM (#16713495)
The majority of their code is still open-source.

https://github.com/reddit

Re:Reddit 1.0 source code by andrewguenther on Friday March 30, 2018 @12:26AM (#16713668)
It is definitely not the majority and doesn't match what they're running on the back-end anymore at all.
Re:Reddit 1.0 source code by Sylos on Friday March 30, 2018 @02:10AM (#16714066)
That's like someone telling you the majority of ingredients that they put into something you're supposed to eat, but not that one ingredient.

It's either their secret super sauce or it's poison.

And I can tell you for free that whatever Reddit has built technologically, does not contain any secret super sauce whatsoever.

Re:Reddit 1.0 source code by chme on Friday March 30, 2018 @04:09AM (#16714545)
I sort of get reddits reason to hold the post ranking algorithm secret. So that it is hard to game it.

Until there is a way to easy 're-key' such an algorithm if someone found a way to abuse it, holding it secret is the best solution for them.

I currently can't think of a better solution to avoid gaming of ranking algorithms than holding it secret and changing/adapting it often. Maybe some machine learning algorithm?