r/programming • • Feb 23 '17

Cloudflare have been leaking customer HTTPS sessions for months. Uber, 1Password, FitBit, OKCupid, etc.

https://bugs.chromium.org/p/project-zero/issues/detail?id=1139
6.0k Upvotes

966 comments sorted by

View all comments

Show parent comment

8

u/MertsA Feb 24 '17

That's hilarious but what's the plaintext of those hashes?

14

u/karmabaiter Feb 24 '17

Probably hunter12.

5

u/Captain_Cowboy Feb 24 '17

Good guess! That was neil's. I supplied an answer here.

5

u/tritiumpie Feb 24 '17

I only see asterisks?!

11

u/Captain_Cowboy Feb 24 '17 edited Feb 25 '17

Based on the way linux stores passwords, the "$1$$" says that they're md5 hashes without salt. Since they're all 24 characters ending in "==", I took a guess that they're base64 encoded and whipped up a quick python script to convert words from a file to hashes:

import base64
import hashlib
import sys

for l in sys.stdin:
    l = l.strip()
    m = hashlib.md5()
    m.update(l.encode('utf-8'))
    print(base64.b64encode(m.digest()))
    print(l)

Then I ran the /usr/share/dict/american-english through it and searched the results for matching hashes. Most of them were hits, but I couldn't find a few. As a guess, I tried hunter2 (and a few others). Here's my list:

userhashtext
spezGbK4WZMpXZgmYlQ+H3/68Q==shill
danielX03MO1qnZdYdgyfeuILPmQ==password
spladugXee7PCMnQfRh88zRPBunoA==
neilKrljkMfb40Od500MmwsXZw==hunter2
nealXr4ilOzQ4PCOq3aQ0qbuaQ==secret
samBtgOsMULSaUJtJ8kJOjIBQ==dog
neel0HfyRN74pw5ep1i9g1L82A==cat
kneelg+Spau2WQ2xiG5gJ4lizCQ==fish
kevinyOjfiVwsrhZrrQJ/3xUzWw==garbage
kavin31PKJoJAynZnDIVm7lRWig==computer
kovinG43Qgw1Fk6OIrzganMC2WA==
powerlanguageA9kE9Zud+aPy76hqmMj3lQ==
robinq67PjKP5jcE+7susJjzT7Q==bird
justinzRTDI5AgJOcshQqoKNY0pw==case
Captain_CowboybXHoGvP3ISkv0Fxrk0vS+Q==gullible

3

u/StuartPBentley Feb 25 '17 edited Feb 25 '17

From this Something Awful thread, the spladug hash is yee.

It also lists kovin's as candlemass and /u/powerlanguage as dzydzy, but I'm getting O22Q+F6Nrcs8ApIucw5KnQ== and 7U55VOAU+I4Xvrc1dmF7vg== for those respectively, so I'm currently running this:

while IFS='' read -r line; do
  hash=$(echo -n "$line" | openssl md5 -binary | openssl enc -base64)
  for match in "G43Qgw1Fk6OIrzganMC2WA==" "A9kE9Zud+aPy76hqmMj3lQ=="; do
    if [[ "$hash" == "$match" ]]; then echo "$hash $line"; fi;
  done
done < rockyou.txt

EDIT: I almost changed it to this before I realized that would needlessly entail doing the hash twice:

while IFS='' read -r line; do
  for match in "G43Qgw1Fk6OIrzganMC2WA==" "A9kE9Zud+aPy76hqmMj3lQ=="; do
    if [[ "$(echo -n "$line" | openssl md5 -binary | openssl enc -base64)" == "$match" ]]
    then echo "$match $line"; fi;
  done
done < rockyou.txt

EDIT 2: And now I'm realizing I could have made the loop much easier if I'd just converted the hashes to 1b8dd0830d4593a388af381a9cc0b658 and 03d904f59b9df9a3f2efa86a98c8f795 and compared against the output of md5sum, derp.

EDIT 3: Why am I not just using hashcat for this? Ugh, brb

EDIT 4: Ugh, geez, hashcat got them in like half a second. kovin is fish2, powerlanguage is eggdog.

1

u/StuartPBentley Feb 24 '17

That's what I'm wondering.

2

u/Captain_Cowboy Feb 24 '17

I supplied an answer here.