Weebly folks: if you really want to recruit decent front-end people, please put this puzzle on a page that isn't chock-full of table-based layout, inline styling, and other icky crap.
Can't figure out which packet to send and in what format (hex? binary?) :(
Update: Wow! Can't believe I actually spent 20 minutes with Wireshark trying to reply with the actual TCP packets that were next in the handshake sequence.
Update 2: Finally solved it :) Pro-tip: keep it simple.
Spoiler alert - don't read more of this comment if you want to solve it yourself.
Almost all of the solution in Haskell (except for the bit about extracting the actual answer from the Javascript); it's probably not what they intended, since the job is for a web-dev, but most of us here are probably just doing it for fun. I found the bit about guessing what string was hashed to make the MD5 the hardest, because it was basically just pure brute force (I didn't know what timezone it was in or what date format was used - so the hint wasn't very helpful).
import Network.URI
import Network.HTTP
import Data.Maybe
import Data.Time.Clock.POSIX
import Data.Time.LocalTime.TimeZone.Olson
import Data.Time.LocalTime.TimeZone.Series
import Data.Time.Clock
import Data.Time.LocalTime
import Data.Time.Calendar
import Text.Printf
import Control.Monad
import Codec.Binary.Base64.String
main = do
-- Is there a more portable way to do this?
pdtTZS <- getTimeZoneSeriesFromOlsonFile "/usr/share/zoneinfo/America/Los_Angeles"
pdtTime <- liftM (utcToLocalTime' pdtTZS) getCurrentTime
let next = printf "w%02d%02d" ((\(_, _, d) -> d) . toGregorian . localDay $ pdtTime) (todHour $ localTimeOfDay pdtTime)
ts <- getPOSIXTime
let str = urlEncodeVars [("pos", "solvepuzzle"),
("auth", show ts),
("msg", "SYN/ACK"),
("next", next)]
r <- simpleHTTP (Request (fromJust $ parseURI "http://www.weebly.com/weebly/publicBackend.php")
POST
[Header HdrContentLength (show $ length str),
Header (HdrCustom "X-Requested-With") "XMLHttpRequest",
Header (HdrCustom "X-Prototype-Version") "1.7_rc1",
Header HdrContentType "application/x-www-form-urlencoded"]
str
)
case r
of
Left err -> print err
Right b -> do
putStrLn (decode . rspBody $ b)
you could just search Yahoo! for the md5 sum and it gives you the answer on the search results page.
Also, it's easier to just do the whole thing in firebug by rewriting the javascript on the page. The only thing I couldn't figure out was, what do you do when you get to 42?
besides that 42 would be all you need to know about everything, searching yahoo only works for well known hashes, it won't work for an arbitrary hash like this.
SPOILER ALERT -
Hey guys after a while of searching i couldn't find any site that could crack the hash for me my result is
9e0a70f64a9b39a9f216417e70664529
here i could find a Result:
http://www.cmd5.org/
Result: w1113
but when i submit that i get this message
ZXZhbHVhdGUgdGhlIGZvbGxvd2luZzogIGFsZXJ0KCdUaGUgc2VjcmV0IGNvZGUgaXM6ICcrYStkKyhjKyJfIikrKGIqMikpOwo== (This isn't the solution...)
which obviously tells me i got it wrong, not trying to apply for the position, just liked the puzzle, and i was curious about what other techniques are they, that don't require the GPU attack, or JtR which is priced at $180
I suppose it depends upon the password and the complexity. However my lowly GTX460 was cracking 600 million hashes a second.
Another poster mentioned yahoo -- the hash I drew (it changes hourly) was not on Yahoo, or Google, or rainbox table search engines. So that point is irrelevant (yes, of course the first check is search engines. But if it's not there you kind of have to move on). For the record, given that it changed, it was bb421ba20e679cc36ecae553c02cf948.
I did the puzzle you guys had a couple years ago when I was a grad student, and I just finished doing this one. I was sorta disappointed the secret hadn't changed, so if I were to email you it now, you couldn't tell if I had solved the current puzzle, or just archived the previous secret.
Took me 10 minutes to solve the puzzle (i love puzzles) but I'm not too keen on the job posting (still in college and want to finish it). Thanks for the fun but sorry.
When you put a puzzle online, people who solve it have to somehow say "I am not stupid. I demonstrate my non stupidity by solving that puzzle".
On that note...I too solved that puzzle! I, too, am not stupid!
Though seriously puzzles like this need to not underestimate the takers. I think many, when met by the syn bit, immediately started going down the process of actually constructing a custom handshake with their server, before perhaps thinking "Nah, not worth the trouble".