r/programming • • Jun 15 '14

Project Euler hacked - "we have reason to suspect that all or parts of the database may have compromised"

[deleted] — view deleted post

1.1k Upvotes

352 comments sorted by

83

u/mistigi Jun 15 '14

I hope they will be back up soon :-(. I am wondering what that really means:

Passwords at Project Euler are strongly encrypted using a one-way hash, but if you use the same password at other websites then it is strongly advised that you change it

Either encrypted or hashed. If hashed, was the password salted ? No that it matters much to me, just curious.

76

u/blank-username Jun 15 '14 edited Jun 16 '14

I'd imagine (hope) it's a salted hash... But I suppose if people don't know what that means, encrypted is a good word to get the idea across to lay users?

51

u/[deleted] Jun 16 '14

It would certainly be nice if compromised sites would mention the password hashing scheme they were using instead of just claiming it's strong encryption. There's an enormous gap between PBKDF2/bcrypt/scrypt and a poor implementation with a single round of a fast hash function not designed for password hashing like md5 or sha1.

12

u/Enzor Jun 16 '14

They may hope that whoever compromised the site is unable to identify the encryption algorithm used, making it harder to determine the users' passwords.

25

u/polarbeargarden Jun 16 '14

If they got the database, there's a pretty solid chance they got the scripts that do the hashing. Even if not, if they have a known password in the database it won't take long to figure it out.

9

u/willvarfar Jun 16 '14

Using a strong scheme e.g. bcrypt or scrypt means you are not relying on the obscurity of the attacker not being able to guess the hashing mechanism.

1

u/[deleted] Jun 16 '14

At the same time, telling the attacker what it is does marginally help them. They can work it out either by looking at your software or trying a known password but at the same time you don't want to narrow down the space too far straight away.

5

u/[deleted] Jun 16 '14

No, the attacker can figure it out fairly trivially. Telling us what they're using doesn't give the attacker anything they couldn't figure out trivially.

4

u/dkong1026 Jun 16 '14

Probably this. And I'm wishfully thinking that by strong encryption they meant not MD5 or SHA-1.

1

u/greenwizard88 Jun 16 '14

Sounds like a good Project Euler puzzle: Given a dataset of a significant size, determine the hashing function used to protect a column of arbitrary strings of an indeterminate length.

1

u/pl213 Jun 18 '14

They may hope that whoever compromised the site is unable to identify the encryption algorithm used

Hopefully hashed, but it's pretty easy to identify the type of hash. There are automated tools that do that.

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

2

u/[deleted] Jun 16 '14

A KDF isn't a suicide pact. Upgrading is very possible and well-advised.

1

u/[deleted] Jun 17 '14

That's a sensible reason to be using a weak key derivation function for anyone who hasn't logged in for ages, but it's still maintained so it should begin using a strong hash as soon as an account with the old scheme logs in. Since bcrypt has been around for more than 14 years, I don't think there's any excuse beyond ignorance and laziness.

154

u/Segfault_Inside Jun 16 '14

Lay users who do puzzles on project euler.

79

u/pruwyben Jun 16 '14

We do exist.

24

u/Mikemagss Jun 16 '14

Do you know what a salted hash means?

10

u/alosec_ Jun 16 '14

I don't know. I also don't use Project Euler. I'm not even subscribed to /r/programming.

What the hell am I even doing here?

2

u/oniony Jun 16 '14

You don't belong here.

3

u/pruwyben Jun 16 '14

I didn't before reading the responses to zim1985's comment.

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

3

u/xxNIRVANAxx Jun 16 '14

A salt is a random string added to passwords to increase security. Usually after salting, you hash the password using a 1 way function (so you can't retrieve the original password). Ex: my password is "password", Reddit adds the salt "potato" so my password becomes "potatopassword" before hashing

2

u/[deleted] Jun 16 '14 edited Jun 16 '14

Passwords are stored as hashes, which is derivied from the password with an one way algorithim. Every time you log in, the system will hash your password and compare it to the hash in the database. However, if you have the hash and you know what algorithim was used to hash it, you can sometimes "break" the hash, either by brute forcing it or using rainbow tables. Brute forcing involves passing random strings to the hashing algorithim until you get the hash you're after. I don't fully understand rainbow tables, but basically they are a huge flowchart that you use to find the original password. Rainbow tables take up a lot of space, but they are a lot faster than brute force. Oftentimes, the passwords aren't immediatly hashes. A piece of data, called a salt, is added to the password. By salting the hash, it is much harder to break, and thus more secure.

Edit: as banane9 pointed out below, rainbow tables are not flow charts, they are just big tables with passwords and their hash

9

u/Banane9 Jun 16 '14

Rainbow tables are literally giant tables containing strings and their respective hashes.

1

u/[deleted] Jun 16 '14

Oops, the explanation I read said they were flow charts. I'll edit my post

4

u/PrimerThanYou Jun 16 '14

Actually you both are sort of right. Rainbow tables are made up of long "chains" of hashes where you repeatedly apply the hash function (plus "reduction" functions which reduce the hash back into the space of passwords) but they just store the start point and end point of each chain (so it's not just strings and their hashes.)

Then when you want to break a hash you just apply the function (sort of like a flowchart) until the output is one of the endpoints in your table. Then you go back to the corresponding start point and follow the chain until you get one "link" before the hash you have, which will be the password.

1

u/healydorf Jun 17 '14

Probably posted a dozen times, but Computerphile did a neat little video on the topic

https://www.youtube.com/watch?v=b4b8ktEV4Bg

→ More replies (90)

5

u/fibbidd Jun 16 '14

Cryptography laymen, yes, probably a lot of users.

1

u/awj Jun 16 '14

Most programmers at best only think they understand cryptography.

1

u/[deleted] Jun 17 '14

Finally... "What is project Euler" has been answered sort of.

53

u/peterquest Jun 15 '14

mmmmm, salted hash.

10

u/[deleted] Jun 16 '14 edited Mar 12 '15

6

u/too_many_secrets Jun 16 '14

turns on the fryer

8

u/Randosity42 Jun 16 '14

But I suppose if people don't know what that means

no, people that solve programming problems for fun wouldn't have any idea.

2

u/CheshireSwift Jun 16 '14

It's standard practice in these kinds of PR statements to refer to passwords being encrypted when they are actually hashed. Maybe not helpful, but pretty common.

0

u/yesman_85 Jun 16 '14

If they just go the passwords without the source, I hope they are peppered too. But that's a small chance (both having a pepper and them not having the source).

4

u/[deleted] Jun 16 '14

Pepper == salt?

4

u/shillbert Jun 16 '14 edited Jun 16 '14

A pepper is like a salt, except that it's one string added to every password and it's stored in the code of the application, not the database.

http://barkingiguana.com/2009/08/03/securing-passwords-with-salt-pepper-and-rainbows/
http://blog.ircmaxell.com/2012/04/properly-salting-passwords-case-against.html

3

u/yesman_85 Jun 16 '14

Which is challenged to be secure by many, but it doesn't hurt in my opinion. When they steal a complete DB (from a backup or something), they will have a much greater task to get your password.

2

u/ircmaxell Jun 16 '14

but it doesn't hurt in my opinion

Considering that there are better, standard ways, yes it does hurt.

http://stackoverflow.com/a/16896216/338665

If you want some "secret", then use authenticated encryption to store the hash. That still uses algorithms the way they were designed, and has the added benefit of defense in depth.

Using a pepper relies on the assumption that it doesn't change the fundamental underlying security of the algorithm (which may or may not be true).

1

u/yesman_85 Jun 16 '14

Honestly that post only indicates the maintainability, so they say, better not to use it than to use it, I still don't agree with that. Yes the key is worthless after a breach, but so what? You can invalidate the key after a breach.

7

u/d4rch0n Jun 16 '14

They mean hashed, but it's sort of encryption, at least very related anyway.

It should matter a lot if it's salted, for most of us, and it also matters what damn algorithm they used.

I really hate it when a site says "Your passwords are encrypted don't worry", because that can mean a lot of bad things. MD5 without salt?

1

u/KovaaK Jun 16 '14

Hash functions are considered part of cryptography, so I don't think it's incorrect to call it encryption. Granted, when people think encryption, they assume decryption is also possible (thus implying either a symmetric key or asmmetric key algorithm).

http://en.wikipedia.org/wiki/Cryptographic_hash_function (note the title)

2

u/frymaster Jun 16 '14

They are using "encrypted" because the ordinary web user doesn't know what "hashed" means.

They are using "hashed" because there's a lot of technical users of the site who will understand what it means

3

u/estomagordo Jun 16 '14

I'd venture to say that Project Euler users are atypical web users.

2

u/[deleted] Jun 16 '14

And, at the very least, unusually willing to look stuff up.

1

u/Nanobot Jun 16 '14

Merely salting the hashes isn't really enough these days. You should be using an algorithm that securely applies multiple rounds (like either PBKDF2+SHA2 or bcrypt), use a large enough number of rounds to meet modern computational power (probably around 50,000 rounds for PBKDF2+SHA2), and you should probably encrypt the result using AES-256 with a key that isn't stored in the database. That's the minimum standard I apply for all of the sites I build.

1

u/estomagordo Jun 16 '14

If it was salted, then why should we be alarmed if we have the same password elsewhere? But then again, why wouldn't they salt the hashes?

0

u/thatfool Jun 16 '14 edited Jun 16 '14

Maybe they can't rule out that it wasn't only the database that was compromised. Salts and hashes don't mean a thing if it's the code that verifies the passwords that's compromised.

Edit: Guys, the statement reads they had a security issue they don't know the extent of, not that someone only accessed the database. If the intruder had more access than just to the database he may have intercepted passwords of people logging in. How passwords are encrypted means nothing if that's the case. Stop focusing on salts and hashes.

1

u/[deleted] Jun 16 '14

What? No it doesn't. You verify a password by pretending the salt and using whatever hash you like. The salt is stored in plaintext with the hashed password. The idea is that knowledge of the salt and hash doesn't really get the attacker anywhere, and that it's twice as expensive to break 2 hashes as 1.

1

u/thatfool Jun 16 '14

But if the code that does this is compromised, it might do whatever with your input.

→ More replies (1)

0

u/erosPhoenix Jun 16 '14

It really sounds like they didn't salt the hash. I guess they just assumed this would never happen to them.

3

u/adrianmonk Jun 16 '14

What makes it sound like that? Just because they didn't go into details and specifically mention that they used a salt doesn't mean they didn't use a salt.

1

u/ThisIsADogHello Jun 16 '14

In my (admittedly limited experience), if it's a well-done hash that's designed for password storage, they generally let you know the specifics. But when it's something like unsalted md5, they'll just fall back on "don't worry it's encrypted, trust us." and you only find out the specific hashing scheme from the leaked password lists.

-3

u/RenaKunisaki Jun 16 '14
hash = sha1(bcrypt(pass)) //encrypted and hashed

(well you get the point.)

10

u/[deleted] Jun 16 '14

That would be completely useless, because bcrypt adds a random salt that it needs to read back in order to compare the password.

Also, bcrypt is also a hash :p

2

u/[deleted] Jun 16 '14

Yeah, that's hashed and hashed and completely unusable.

→ More replies (1)
→ More replies (17)

664

u/PoopChuteMcGoo Jun 15 '14

Sounds like someone misunderstood the challenge...

116

u/joshdick Jun 16 '14

The reason they added CAPTCHAs to answer submissions was that someone wrote a program to submit every number, looking for the answer.

243

u/naclC6H6 Jun 16 '14

I don't know the answer which is solvable with programming so I'm going to use programming to answer the question.

-some smartass

57

u/AdamLovelace Jun 16 '14

A local college did a monthly math challenge for high schoolers when I was in high school. I was responsible for a rule update when I submitted a solution and, for the "show your work" field, I just pasted a C++ function that brute forced the solution.

11

u/trojan2748 Jun 16 '14

What a badass.

8

u/AdamLovelace Jun 17 '14

It amused me to do it, though I'll admit I'd much rather have been able to solve it properly.

3

u/milkmymachine Jun 17 '14

Oh captain, my captain

4

u/rouzh Jun 18 '14

I don't know the answer which is solvable with programming and mathematical constructs with which I am unfamiliar, so I'm going to use the programming part to answer the question.

FTFY

2

u/minno Jun 16 '14

Which, since the answers are always under 231, would still take a really, really long time.

28

u/JiminP Jun 16 '14

What? That's definitely not true.

For example, the answer of problem 321 is in order of 251.

8

u/[deleted] Jun 16 '14

i don't even know how to do the case for 3

19

u/JiminP Jun 16 '14

10

u/[deleted] Jun 16 '14

colour me impressed

0

u/minno Jun 16 '14

Huh, I thought they specifically designed the problems so you could always calculate it with 32-bit numbers.

1

u/JiminP Jun 16 '14

Another counter-example would be problem 66. The answer itself is (obviously) small, but to solve this problem one must know x accurately, and x is roughly 1.6e+37.

By the way, though using floating point is enough, problem 380 probably has the largest answer I solved in ProjectEuler. (~6e25000)

→ More replies (5)

1

u/elasticpython Jul 11 '14

As long as you get it in less than a minute, it counts.

1

u/[deleted] Jun 16 '14

Technically this still solves the problem!

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

48

u/notreddingit Jun 16 '14

And someone learning programing learns a valuable lesson when they hear this anecdote.

24

u/Tynach Jun 16 '14

Some manager learned scripting.

8

u/[deleted] Jun 16 '14

Given that many of the solutions have at least 8 digits, I'm not so sure of that.

2

u/raznog Jun 16 '14

Might have taken too long to complete thougg

3

u/[deleted] Jun 16 '14

I'm sure it also put a huge strain on their servers, which is probably why they put a stop to it.

2

u/BobHogan Jun 20 '14

Yea, thats a more efficient way to solve a problem where the answer is a number known by the server. But it is a terrible way to learn to program, there are few to none real world applications that can be solved by just seeing if the next number is the answer the server was looking for

3

u/PoopChuteMcGoo Jun 16 '14

This a lesson skyne... er, Watson should learn.

10

u/hyperforce Jun 16 '14

Not on my watch!

xkcd: Genetic Algorithms

9

u/xkcd_transcriber Jun 16 '14

Image

Title: Genetic Algorithms

Title-text: Just make sure you don't have it maximize instead of minimize.

Comic Explanation

Stats: This comic has been referenced 9 time(s), representing 0.0380% of referenced xkcds.


xkcd.com | xkcd sub/kerfuffle | Problems/Bugs? | Statistics | Stop Replying

239

u/Warfinder Jun 16 '14

"The number is right, damn it! I'll show you!"

13

u/PT2JSQGHVaHWd24aCdCF Jun 16 '14

No, it was just some high school student who wanted to see all the solutions.

5

u/[deleted] Jun 17 '14

Typical high school hacker: Doesn't know how use Google, hacks site instead.

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

1

u/rouzh Jun 18 '14

You've been wangernumbed!

29

u/[deleted] Jun 16 '14

Sorry, I got it confused with hackthissite

16

u/jeffwong Jun 16 '14

How compromised? Do we lose our scores? Was the answer database tampered with?

15

u/Keui Jun 16 '14 edited Jun 16 '14

What IS going to happen with the scores? My Project Euler is a (sadly?) stronger part of my resume :(

16

u/hansdieter44 Jun 16 '14

All my code to solve the questions is checked into a repository, so even if they lose the scores I can replay them within 30 minutes or so :)

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

1

u/h3ckf1r3 Jun 16 '14

Is that all one language? or do you, like me, do all of the easier ones to get a grip on a new language?

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

2

u/Sheltac Jun 20 '14

Cool, I'm not the only one looking to master python by solving Euler's problems!

1

u/dem358 Jun 20 '14

That is exactly what I used and use it for as well!

1

u/hansdieter44 Jun 16 '14

Thats awesome, I am in the low thirties somewhere, but really want to do more.

Euler is oddly satisfying.

11

u/SikhGamer Jun 15 '14

Passwords at Project Euler are strongly encrypted using a one-way hash

Good.

2

u/GFandango Jun 16 '14

If you are not using a unique random password for every service you sign-up for you are doing it wrong.

And if you do, you shouldn't care if they hashed the passwords or not, if it's not used anywhere else it doesn't matter.

1

u/gavinb Jun 16 '14

It's only good if the password was salted before hashing.

Otherwise it is vulnerable to a simple dictionary attack.

1

u/ysangkok Jun 17 '14

Hashing is not encrypting and all hashes with more inputs than outputs are one-way.

0

u/[deleted] Jun 15 '14

[deleted] — view deleted comment

-20

u/Smarag Jun 16 '14 edited Jun 16 '14

md5 is perfect for passwords if used correctly with salting

stop spreading this "md5 is insecure hurt durr" myth

Edit: http://www.webdevrefinery.com/forums/topic/4850-hashing-myths/page__hl__hashing

13

u/netsec_burn Jun 16 '14 edited Jun 16 '14

Your post gave me cancer, and so did that link.

Myth #3: MD5 is less secure for password hashing than other algorithms like SHA.

Are you kidding me? This citation is way out of date. MD5 has VERIFIED COLLISIONS. MD5 signed certificates have been FORGED. Binary signatures have been COLLIDED. You can brute MD5 at billions of hashes per second on a commercial GPU. SHA is way less susceptible to brute force attacks, and has no collisions. Salted MD5 is barely safer than raw MD5.

Edit: On my way to chemotherapy now

4

u/Kapps Jun 16 '14

Being able to generate a collision doesn't matter for storing passwords. The problem is the fact that MD5 is so fast to brute force.

1

u/netsec_burn Jun 17 '14

To a degree, it actually does. With a disclosed hash and no password, you can collide it and log into a service using the collision.

→ More replies (6)

7

u/pseudousername Jun 16 '14

No, it's not. Md5 can be computed too quickly, allowing to brute force hashed passwords quickly. Bcrypt or scrypt are what you are looking for. They are designed to be hard to compute.

→ More replies (3)

2

u/karlthepagan Jun 16 '14

md5 is susceptible to extension attacks... So what's the point of a salt if you can craft a message to have a desired hash output by such an attack?

4

u/[deleted] Jun 16 '14 edited Jun 16 '14

Extension attack is only relevant for signature. It's completely irrelevant for password hashing.

Extension attack don't allow you to craft a message to get a desired output. It allows you to know the output of "hash(the data already there + some padding + the data you want to have appended)" if you know the output of "hash(the data already there)".

1

u/ivosaurus Jun 16 '14

Assuming you know that pure md5 is about the silliest thing you could use to store a password, it's very easy to construct a scheme using md5 that won't be susceptible to length extension attacks.

→ More replies (47)

24

u/dwarmia Jun 16 '14 edited Jun 16 '14

Why would anyone do that ?

They have enough knowledge to compromise the PE database, and they are ignorant enough to actually do that.

This is like burning a library for .... stuff ?

Sadistic.

→ More replies (2)

39

u/[deleted] Jun 15 '14

What exactly is Project Euler?

88

u/[deleted] Jun 15 '14

A website full of math problems that you solve by programming. Its great practice.

22

u/hwaite Jun 15 '14

So passwords are hashed and the site doesn't have credit card data or other personal information? What's the worst a hacker can do?

71

u/javacIO Jun 15 '14

Obtain information about accounts they could possibly link to alternate accounts owned by that user.

It isn't catastrophic but obviously their database being compromised is not a good thing.

14

u/grabnock Jun 16 '14

I use the same password for all of my nonessential shit.

So they get access to... throwaways and my reddit account?

I can live with that.

7

u/Eddonarth Jun 16 '14

But your reddit account IS essential!

1

u/vattenpuss Jun 16 '14

Which one out of the ~twenty active accounts I have is the essential one?

4

u/javacIO Jun 16 '14

Good practice :)

21

u/komollo Jun 16 '14

When passwords get dumped, there is almost always an email associated with it. Since people are morons, the password is usually the same as the email and a bunch of other accounts. Since the hacker now has their email and a password they frequently use, they have a good chance to get into a ton of accounts just by trying the email and password.

9

u/[deleted] Jun 16 '14

Hopefully the password was salted and hashed, then it shouldn't be a big problem. Users should still change their passwords anyway.

7

u/[deleted] Jun 16 '14

It's still a problem even if it's salted. Password can still be brute forced individually. What salting prevents is brute forcing all the password at the same time and finding duplicate password. If your password is weak even strong and proper hashing won't prevent someone from brute-forcing your password and finding it. Your safe only if you had a strong password.

6

u/YRYGAV Jun 16 '14

A programming site would definitely know their target users would feel better if they explicitely said the passwords were salted using a better hash than md5.

Since they neglected to mention both the hash algo and whether they salt or not, it's probably a safe assumption to assume unsalted md5 passwords that are crackable.

3

u/[deleted] Jun 16 '14

That would be pretty sad, if so. Or maybe they were salted, but they didn't specifically mention they were salted to scare us; this makes sure the programmers that use the sight change their passwords out of fear.

I didn't use the site, so whatevs. Hope everyone else takes this seriously.

1

u/Holkr Jun 16 '14

I imagine a simple dictionary attack against the entire database would net quite a lot of matches, against which no practical* salting/repeated hashing in the world will help.

* less than a few milliseconds server CPU time

6

u/Randosity42 Jun 16 '14

Since people are morons

I like how the only way to not be a moron is to be able to remember 100+ arbitrary strings of random characters indefinitely without writing them down anywhere.

23

u/[deleted] Jun 16 '14

Who said anything about remembering them indefinitely? You have to change them every 180 days, thank you very much.

8

u/montymintypie Jun 16 '14

This is why you use a password manager - one master password, but each individual site has a unique, stupid long password. If a website gets hacked, there's no chance of any others being compromised.

1

u/boxmore Jun 17 '14

But if anything happens to that password database... oh god.

1

u/Elec0 Jun 16 '14

Until someone jacks your master password. Then you're really fucked. Because it's only really a matter of time until someone gets your password, somehow.

4

u/montymintypie Jun 16 '14

It's all a game of chance/not being silly, really. Just with a password manager it's far lower.

Heck, add in 2 factor auth to your password manager and you're even more secure!

1

u/[deleted] Jun 16 '14

As long as you do not save your email pw in the manager, it is still just annoying not really fucked.
I would also point to /u/Deimorz post.

→ More replies (2)

7

u/Banane9 Jun 16 '14

Arbitrary strings only make it harder for you, not machines.

Use long passwords.

insert link to xkcd on password strength

1

u/[deleted] Jun 16 '14

You should probably actually do the quick Google it takes to actually link to that xkcd.

insert link to xkcd on 10 000 people

Here.

3

u/xkcd_transcriber Jun 16 '14

Image

Title: Ten Thousand

Title-text: Saying 'what kind of an idiot doesn't know about the Yellowstone supervolcano' is so much more boring than telling someone about the Yellowstone supervolcano for the first time.

Comic Explanation

Stats: This comic has been referenced 1463 time(s), representing 6.1863% of referenced xkcds.


xkcd.com | xkcd sub/kerfuffle | Problems/Bugs? | Statistics | Stop Replying

2

u/Banane9 Jun 16 '14

Well, excuse that I was on my phone and didn't want to lose the position in the reddit app.

1

u/xxNIRVANAxx Jun 16 '14

Not necessarily. Consider using the website name (maybe even backwards or the first N chars) in your password. It's still an arbitrary string, but there's some form to it now to help you remember. For example: xxNrIeRdVdAiNtAxx or rednirvana, redditnirvana, etc

1

u/komollo Jun 18 '14 edited Jun 18 '14

You can use a simple system to alter the middle of your password with something from each domain, so no one can easily have access to all their accounts with one password.

The main problem is people don't care.

3

u/gradual_alzheimers Jun 16 '14

Could you ELI5 how websites/ companies determine if their database was compromised? How would they even know if someone peaked in there after hacking it? Genuine question.

3

u/snoozer_cruiser Jun 16 '14

Strange errors in the logs, usage during odd hours, passwords randomly getting changed. A good setup usually has sudo logging on all production machines (to track all root commands anyone ever runs), and a separate logging server that collects all system/application logs. If the attacker is looking to silently steal data though, you won't find anything unless you were already watching for it.

2

u/gullibleboy Jun 16 '14

I'd like to know that myself. I have asked the IT folks, at my company, and they never give me a straight answer. I'm starting to suspect that they don't know the answer either. :(

6

u/hoodiepatch Jun 16 '14

If said hacker's professor lazily assigns Project Euler questions for homework, guess who's getting an A ...

Then again someone clever enough to discover a security hole in Project Euler is probably passionate enough to do his/her homework.

7

u/TedW Jun 16 '14

Maybe getting the professor's password was the extra credit assignment.

1

u/frymaster Jun 16 '14

Get email addresses and run the hashed passwords against a dictionary to at least find the weak ones. And people with weak passwords are more likely to have re-used the same password, for example for their email accounts.

From their historical emails you can work out what other sites they've signed up to, and even if they did use a different password, you can now request a password reset, since you control their email account. If they have their payment details saved anywhere (amazon, paypal) you can now buy things in their name

7

u/ragmondo Jun 16 '14

I actually forgot my password for the site so I'm hoping they'll publish the list shortly so i can carry on where I left off....

6

u/Muchoz Jun 16 '14

I have always wondered about these things. How does someone know people have been sniffing in the database? How do they know what has been compromised, what hasn't and when it happened? Is this by implementing a general log system or something?

11

u/CrazyCrab Jun 16 '14

Did projecteuler require email or not? I don't remember. If it did then I'll have to change some passwords.

3

u/[deleted] Jun 16 '14

As far as I know, it required an email.

15

u/wildnux Jun 16 '14

Looks like someone solved the final problem :D

2

u/ConstableBrew Jun 16 '14

Try www.codewars.com, it is similar but you can see other solutions once you finish.

11

u/cptroot Jun 16 '14

To be fair to Project Euler, their site does (did) contain a forum where users could post their solutions when they finished. It worked well, even if all it ever did was make me feel insignificant.

11

u/skakillers1 Jun 16 '14

Always fun to see the 40-odd line program you wrote in an hour be replicated by "4 lines in python, wrote it in 5 minutes!"

3

u/h3ckf1r3 Jun 16 '14

The guy who does it in assembly makes me feel silly.

2

u/spupy Jun 16 '14

Man, I'm slaving over a lisp solution for like 3 hours, until it finally works. Then some guy in the forum does it with like 3 lines of lisp. It blows my mind. I guess I'm still very bad at lisp.

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

3

u/retrodad Jun 16 '14 edited Jun 16 '14

J and K were the two languages that you'd see like that in PE answers. Both were strongly influenced by APL, which is why they were so short. APL used one character symbols instead of keywords and built-in function names, and tons of them. This let them be extremely brief, since one character would contain a lot of functionality. Those APL characters weren't ASCII (there were keyboards (and keyboard overlays) to let you type them), but J and K just re-use all the punctuation and symbols available on regular keyboards for all that completely disparate functionality, which is why those solutions always look like line noise.

Edit: Here's a video of someone writing the game of life in APL, to give an example of the power of this style of programming.

1

u/ConstableBrew Jun 17 '14

You are right. I had forgotten about that. It has been quite some time since I last was on pe

12

u/10gicpro Jun 16 '14

It may seem minor but I really appreciate the order they chose to say "all or parts." It shows that they take it seriously however large the breach was.

3

u/[deleted] Jun 16 '14

noo!! i just started doing these again recently and was enjoying it so much.

this sucks, whenever people ask me how i taught myself to program i refer them to projecteuler after they've come to grips with the basic syntax. this is one of my favourite websites, i really hope they figure it out and get back up and running soon.

3

u/rddtf3 Jun 16 '14

I started using Project Euler on Saturday. It was taken down on Sunday. >:(

2

u/smeagol13 Jun 16 '14

Does this exploit also include forum.projecteuler.net?

3

u/ethraax Jun 16 '14

Weren't those forums a totally separate service? I remember users being required to make a separate account for PE forums. In that case, probably not, although I imagine a fair number of users probably used the same passwords for the website and the forums.

3

u/during Jun 16 '14

Oh no... My progress...

16

u/fecal_brunch Jun 16 '14

All that learning for nothing!

1

u/Sheltac Jun 20 '14

As long as you've kept the code somewhere, like you should, It's okay.

Or you can look on the bright side: you get to reuse all the problems you don't remember how you solved to learn a new language!

1

u/jelloeater85 Jun 16 '14

And I was just going to make a account ... -_-

2

u/[deleted] Jun 16 '14

I've literally had my account for 3days :(

1

u/bildramer Jun 16 '14

Any idea on what the "serious security issue" was?

1

u/Klekticist Jun 16 '14

Mrgh, and I was just getting into it...

1

u/[deleted] Jun 18 '14

The Project Euler problems will be available soon at hackerrank.com

1

u/JiminP Jun 16 '14

Fortunately I use different passwords on different sites and I save my JS codes which used to solve problems, but this is very bad news :(

I wanted to read and solve PE problems after the final exam...

1

u/Umbrall Jun 16 '14

projecteuler.co

1

u/[deleted] Jun 16 '14

What worries me is that they say "if you use the same password at other websites then it is strongly advised that you change it"

Does this mean the hash the passwords with no salt?

I have nothing to worry about since I use a unique pwd to project euler, but still...

3

u/h3ckf1r3 Jun 16 '14

Salting does not guarantee that the password cannot be bruteforced. It just means that the hash for that password will be unique for that user, so no lookup tables or finding people who have the same password.

1

u/xAdakis Jun 17 '14

If they have access to the database, perhaps they could have access to the PHP files that contain the salt. . . just a thought.

1

u/[deleted] Jun 17 '14 edited Jun 17 '14

They probably got access to the salt, but even having the salt, they cannot use rainbow tables that already exist.

The salt is hopefully unique for each user (they can use pepper too, which is usually hardcoded and the same for every user; but the pepper usually exists as a complement and does not substitute the salt).

Of course they can compute a rainbow table for each user using the salt (and the pepper if that's the case).

Accordingly to Wikipedia they have around 360,000 users. They will have to compute a rainbow table for each user, since each user has a different salt.

So if they want to compute the salted hashes for the most common 100,000 passwords for the 360,000 users, they will have to compute 36,000,000,000 hashes. If they compute 1,000,000 hashes per second, they'll take 10 hours (in the worst case) to compute the whole rainbow table.

If the user's password is week, they might have to compute just a couple of hashes though!

They can probably get a good number of passwords this way.

So yeah, after writing this I realized that the computation they'll need to do is probably not as heavy as I previously though...

2

u/xAdakis Jun 17 '14

That is the way it goes. . .

You have to assume the worst case scenario, no matter how many precautions you took.

The minute any data is compromised, the whole thing is compromised and needs to be changed and re-encrypted using a different method before it will approach anything close to being secure again.

-5

u/karmakazi_ Jun 16 '14

Pray tell what is project Euler?

12

u/skakillers1 Jun 16 '14

See above, but basically it's a website that gives you math problems that you need to write a bit of code to solve (some of them are solvable analytically too, but most involve a lot of computation). Once you've solved it you can see a forum for the problem where people share their solutions, it's a great way to both get practice in a language you may be learning and get some insight into how the same thing is accomplished in other languages (or be baffled by some inscrutable code...).

-2

u/zeroone Jun 16 '14

I can't help but think that the hackers may have trained by doing Project Euler problems.

9

u/ethraax Jun 16 '14

Although there were a small handful of problems that involved guessing small encryption keys based on the knowledge that some plaintext contains ASCII characters, there weren't really any challenges that involved web security.

-4

u/argv_minus_one Jun 16 '14

Why the fuck aren't we all using certificate-based authentication yet? Passwords are fucking useless.

5

u/morb6699 Jun 16 '14

Because we all know that security using certificates can never be breached...

And, passwords aren't useless as long as you use a decent password. I, for one, would love to see you explain how to set up and manage certificates correctly to a layman, as opposed to creating a somewhat complex password.

1

u/argv_minus_one Jun 16 '14 edited Jun 16 '14

Because we all know that security using certificates can never be breached...

It's not that. Rather, using certificates means breaking into a server and grabbing its authentication database won't help you get at the users' other accounts. People often use the same password for many different things, but with a certificate, that's a non-issue.

Using certificates also means you don't need to reset your password if the server does get hacked. Hell, the server could make its authentication database publicly available and it still wouldn't matter. Only if the user's own machine is compromised is there a need to revoke and replace the certificate.

And, passwords aren't useless as long as you use a decent password.

Which most people don't, because they're harder than shit to remember, and a massive pain in the ass to stash somewhere.

I use completely random passwords, which is obviously more secure, but even worse for convenience.

I, for one, would love to see you explain how to set up and manage certificates correctly to a layman, as opposed to creating a somewhat complex password.

Could the server not mimic a CA and instruct the browser to generate a key pair, without the user having to actually set anything up? Then the only issue is backing up the certificate.

-1

u/erosPhoenix Jun 16 '14

but if you use the same password at other websites then it is strongly advised that you change it.

Done properly, security shouldn't have this problem. It sounds like they didn't salt the hash, which is an incredibly poor security practice that creates this type of vulnerability. I guess they just assumed this would never happen to them.

As a user, always assume the site's security is awful. As a site owner, always assume your users are malicious. Never say, "Well it won't happen to me." If people are willing to attack Project Euler, they'll attack you too.

11

u/ethraax Jun 16 '14

Bullshit. Salting the passwords before hashing is good at preventing someone getting passwords on a large number of users at once using a rainbow table, but they do nothing against targeted attacks. The accounts are associated with an email, so someone can always look for an email of a target and then try to crack that specific account's password. Salting does almost nothing to slow that down (well, maybe the attacker needs to guess the 1-2 ways of adding a salt to the password if he/she doesn't have access to the source the website uses).

It's still a good idea to change passwords if you used the same one, just in case.

-3

u/dethb0y Jun 16 '14

That's pretty meta.

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

19

u/d4rch0n Jun 16 '14

At least they know. Seriously though, anyone's game that accepts passwords, and people do this for fun.

It's also pretty disheartening to find a legitimate site like that has terrible security, so I'm glad that people know that they aren't safe no matter what their site does. It just shows that everyone needs to be paying attention if they accept passwords, or any personal data for that matter.

→ More replies (3)

0

u/[deleted] Jun 16 '14

[deleted] — view deleted comment

6

u/Elec0 Jun 16 '14

You can never be too paranoid. If you didn't change your passwords after that email then you're bad.

→ More replies (3)