Slashdot Mirror


GCHQ Challenge Solution Explained

First time accepted submitter DrDevil writes "The British spy agency GCHQ recently published a puzzle at canyoucrackit.co.uk (as featured on Slashdot), now just a few days later an academic at the University of Greenwich in England has posted a full video explanation of the puzzle. The puzzle has three stages and is not at all simple — likely to challenge even the best computer science graduates."

107 comments

  1. Opaque by DarkIye · · Score: 3, Interesting

    I didn't give the challenge a serious go, but stage 1 just seems convoluted - why is it the mark of a good code cracker to recognise x86 bytecode?

    1. Re:Opaque by Robadob · · Score: 4, Funny

      Because terrorists are yet to discover x64

    2. Re:Opaque by bWareiWare.co.uk · · Score: 5, Insightful

      The ability to recognise codes is precisely what they were testing.
      If they had used a week cryptography code everyone would have cracked it, if they had used a strong code no one could (at least no one who didn't already work for their competition).
      Utilizing an unexpected but extremely common code seems to be a nice solution.

    3. Re:Opaque by pushing-robot · · Score: 4, Informative

      Well, "DEADBEEF" is a bit of a giveaway.

      --
      How can I believe you when you tell me what I don't want to hear?
    4. Re:Opaque by TheRealMindChild · · Score: 1

      I was always more partial to DEADD00D

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    5. Re:Opaque by Surt · · Score: 1

      I would have expected deadbeef to indicate another platform.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    6. Re:Opaque by marcansoft · · Score: 5, Informative

      Recognizing unknown architecture binaries is an important skill to have when reverse engineering, especially for embedded systems. Very often you'll get a firmware file and you have to figure out what it is. Each architecture has its peculiarities, so it doesn't take long to get a feeling for what their opcodes look like. For example, 32-bit ARM code sticks out like a sore thumb (no pun intended :) due to the condition code field, which means that every 32-bit word almost always starts with 0xEx (and whether that's the first or last byte in the word tells you the endianness). Variable length architectures like x86 look very different from RISC ISAs with a fixed instruction length like PowerPC.

    7. Re:Opaque by whoever57 · · Score: 1

      It wasn't -- according to the Register, the mark of a good cracker was the ability to use Google.

      --
      The real "Libtards" are the Libertarians!
    8. Re:Opaque by Lumpy · · Score: 3, Interesting

      Not really.
      You can make a simple cipher that is obfuscated in such a way that many people will not get it.

      Heck a simply letter substitution ciper used on a dead language will pretty much cull the number of people trying to crack it by a significant amount. I completely fooled my CS instructor by doing just that. Aramaic phrase that had a simple letter substitution applied and a xor of a passphrase that was 1/10th the length of the cipher.

      Mine was un-cracked for a full semester with him, his undergrads and all the CS students crakcing at it. Nowhere in the challenge did he say we HAD to use english as the content of the message.

      --
      Do not look at laser with remaining good eye.
    9. Re:Opaque by Anonymous Coward · · Score: 0

      An old woman in a palace (most of the time).

    10. Re:Opaque by maroberts · · Score: 3, Interesting

      Let's assume for the sake of this discussion that you are a USian.
      As a result of political infighting you have heads of state that are reviled in a vitriolic manner by about half the population.

      Lets take a list of your heads of state:
      Nixon (out due to Watergate)
      Ford (ok, but reviled for Nixon pardon)
      Carter (amiable bloke, but seemed to let America go to sleep on his watch)
      Reagan (surprisingly effective, considering he was slowly losing his marbles)
      H.W.Bush (had the bad luck to say "No new taxes" when ambush adverting was getting going)
      Clinton (also effective, but American expectation of clean personal life when married to Hillary?? pleasse)
      George Bush (endless disputes about chads)
      Obama (has the bad luck to be black, leading to morons disputing his legitimacy to be President)

      In the UK, Queen Lizzie enjoys the support of a large majority of the population, and most of the political shenanigans gets directed, not at the Head of State, but at the (semi) elected Prime Minister, thus keeping the head of state out of most of the sh1t. I'd say the UK system works better in that regard.

      As for the tv cameras, I strongly suspect that most US shopping malls have the same coverage as our city centres, and your heavily robbed 7-11s probably have their own personal systems etc. Most states have surveillance of one sort or another; the only question is where and how much.

      And we've (nearly) all been British Citizens and not British Subjects since the Nationality Act 1981 (subject is used but is normally incorrect)

      --

      Donte Alistair Anderson Roberts - hi son!
      Karma: Chameleon

    11. Re:Opaque by ceoyoyo · · Score: 1

      The mark of a good code cracker is to be able to look at a bunch of numbers and/or letters and recognize patterns. This one was x86 byte code, which is, IMHO, a nice break from english language letter frequencies.

    12. Re:Opaque by Anonymous Coward · · Score: 0

      You know.. of all the shit you could have thrown at the UK... it's constitutional monarchy is the LEAST problem at the moment. We have the same problems as the US - our democracy has been eaten from the inside by corporations.

    13. Re:Opaque by An+dochasac · · Score: 1

      X64? Weren't the Taliban still using C64s? Can GCHQ crack this Commodore 64 crypto: ; WAIT Command B82D 20 EB B7 JSR $B7EB B830 86 49 STX $49 B832 A2 00 LDX #$00 B834 20 79 00 JSR $0079 B837 F0 03 BEQ $B83C B839 20 F1 B7 JSR $B7F1 B83C 86 4A STX $4A B83E A0 00 LDY #$00 B840 B1 14 LDA ($14),Y B842 45 4A EOR $4A B844 25 49 AND $49 B846 F0 F8 BEQ $B840 B848 60 RTS

    14. Re:Opaque by xaxa · · Score: 4, Interesting

      It looked interesting, but I lost interest when I saw the salary -- slightly less than what I have already, working for a different bit of government. And GCHQ is in Cheltenham.

      But have you visited the UK? I live here, so it's what I'm used to, but when visiting a couple of cities in the US recently I felt more "watched" and regulated. There were many signs with lists of local laws, with violations incurring big fines. There were *more* public (government/city/whatever) CCTV cameras. (I don't know about private ones, in shops and so on -- they didn't catch my eye.) The government buildings were built like fortresses, and I had my ID scanned and bag x-rayed when visiting museums. When I tried to leave, a government employee handled my genitals.

      I don't want an argument about which country is better -- they both need improvements in this respect. But I'd like to know how you felt watched (or similar) when you visited the UK.

    15. Re:Opaque by xaxa · · Score: 1

      There is a group, Republic, trying to make the UK a republic. I considered joining around the time of Prince Whatsit's wedding.

      Economically, it would be nice if we didn't have to pay for the royal family. Politically, it would be nice if we could elect a head of state. Culturally, it would be nice to look round our castles and palaces, and have the art and so on in a national museum.

      But, there are much, much bigger economic, political and cultural problems. I gave some extra money to Liberty instead.

    16. Re:Opaque by AHuxley · · Score: 1

      Its what they taught the freedom fighters in the 1980's?

      --
      Domestic spying is now "Benign Information Gathering"
    17. Re:Opaque by Anonymous Coward · · Score: 0

      So... maybe there is a market for old computers for terrorists?

      What - you don't recognize tms9900 byte code? Fools!

    18. Re:Opaque by marcansoft · · Score: 1

      Well... I do know someone who is capable of staring at an unknown, undocumented binary blob for a new/proprietary architecture and working out enough of the ISA to write a fairly comprehensive disassembler and then an emulator. Just by staring at the hex and making educated guesses as to what each opcode means, which he later refines as he makes sense of the program. How he can do that boggles the mind, but he can (I've seen him do it at least three times already).

      I don't know if the intelligence agencies happen to employ anyone like him though.

    19. Re:Opaque by Anonymous Coward · · Score: 0

      If you've spent any time at all looking at x86 machine code it should be obvious what this is. The first byte is EB which is a near jump, the sequence CD 80 appears, which is a Linux system call invoke, there are several 90 opcodes which are no-ops commonly used for padding, and the constant "deadbeef" is present, in little-endian order, further increasing the odds that it's x86 machine code. I actually started this puzzle, but it seemed kind of stupid and too easy so I stopped. Seeing the full solution now, I'm glad I didn't waste my time.

    20. Re:Opaque by jdege · · Score: 1

      I wondered that, myself. I doubt I would have recognized it.

      But just on a lark, I put the bytes into a file, and hadded it to the Unix "file" command.

      It reports that it is a "DOS executable (COM)".

      --
      When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
    21. Re:Opaque by Anonymous Coward · · Score: 0

      Awww, nice try, but you fell a the very first step.

      We in the UK are British Citizens not British Subjects, and have been for 29 years.
      Oh, and nobody is expected to bow (or curtsey) when meeting members of the Royal Family, either.

      So, you two main points are completely wrong.

      Must try harder...

    22. Re:Opaque by Ash+Vince · · Score: 1

      In the UK, Queen Lizzie enjoys the support of a large majority of the population

      She is kind of easy to support, she does sweet FA and she costs us less than we give to most foreign countries in aid.

      Obama (has the bad luck to be black, leading to morons disputing his legitimacy to be President)

      Nice.

      --
      I dont read /. to RTFA, I read /. to offend people in ignorance.
    23. Re:Opaque by tehcyder · · Score: 1

      I finished stage 1 and 2, and decided it wasn't worth the time finishing it, since they wouldn't hire me anyways. :) That, and I think I'm allergic to the UK. Having cameras all over the place, watching my every move, gives me the creeps. I'm ok with the occasional stalker, but these aren't even people that decided they were madly in love with me, and want to kill me. I'd always feel like I'd be hearing a voice over a hidden speaker saying "Citizen, you have violated citizens code XYZ. Please remain where you are. You will be transported for re-education."

      Unless you're living somewhere carefree and beautiful like Somalia, you really are blind to your surroundings. if you think the UK is egregiously bad in terms of privacy.

      Oh, and go fuck yourself.

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    24. Re:Opaque by tehcyder · · Score: 1

      I share your allergy, but I also have a more serious allergy. I am no person's "subject". I am a free man. No matter how the Brits argue the matter, no matter all the amendments etc to UK constitution, Brits remain subjects of some old woman in a castle. The only way that I would ever bow to the old girl, is if she first bowed to me. Figurehead or not, that "subject" thing would rub me raw, really, really fast.

      I'm anti-monarchist, but I still prefer the Queen as head of state over dangerous war-mongering retards like Ronald Reagan or George W Bush

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    25. Re:Opaque by tehcyder · · Score: 1

      It looked interesting, but I lost interest when I saw the salary

      No offence, but why not just piss off and work in the City inventing ever more esoteric and unauditable financial instruments, if you're so fucking clever and money-oriented?

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    26. Re:Opaque by xaxa · · Score: 1

      It looked interesting, but I lost interest when I saw the salary

      No offence, but why not just piss off and work in the City inventing ever more esoteric and unauditable financial instruments, if you're so fucking clever and money-oriented?

      With an attitude like that, we'd probably get along pretty well :).

      My comment is too brief. I live (and want to continue to live) in inner London. That's more important than the salary. But GCHQ's £24k is still low, especially as the changes to pensions are going to affect net pay (~£500 less, I think) and pay increases are currently on hold in the public sector.

      I already work for the government, earning £27k (I think), only in science rather than spying/hacking/security. Comparable jobs pay a lot more, but mine helps interesting and useful science.

  2. Google? by grimJester · · Score: 1

    You can probably find some examples by doing a search for the start of the code. The problem right now is that all the hits are on the challenge itself.

  3. Not a great challenge by marcansoft · · Score: 5, Interesting

    My opinion, as someone who has both solved and organized several challenges of this sort, is that the challenge is neither hard (at least by the standards of the ones I've dealt with) nor well designed. In fact, it kind of degenerates: it starts out OK but the ending is terrible.

    Stage 1 is interesting: it combines recognizing executable code (the first thing I thought when I stared at that hex dump is "this looks like x86 code", but being able to recognize binary architectures is a valuable skill) combined with some steganography (fishing out the rest of the required data from the PNG. Fair enough, and OK for a first round.

    Stage 2 starts out well: virtual machines are used for obfuscation and make fun challenges. However, the execution is backwards. Being given VM bytecode and a specificiation to implement a VM isn't a hacking or reverse engineering challenge; it's just work ("go implement this for me"). A much better challenge would be to be given either the spec or (preferably) code that implements it, and then have to reverse engineer the bytecode itself to solve the puzzle. That involves writing a custom disassembler, which is a much more interesting task.

    Stage 3 is a clusterfuck. It's just an executable that checks for a few constants in a file and then builds a URL out of the rest of it. There's a hash (old-school DES crypt() salted password) that the input has to match, but even though it's crackable using a dictionary, you don't even have to do that because the URL includes the hash (which is in the executable), not the plaintext! The rest of the URL isn't checked, and it's basically a guessing game where you have to fish out constants from previous levels. It's just a glorified way of saying "okay, now take a wild guess as to what numbers to stick in the URL". It's not realistic in the slightest.

    Anyone interested in a "better stage 2" might want to check out a level that I put together for the Hack-It competition at the 18th Euskal Encounter (2010). Your goal is to figure out the 64-bit input key that works (if you don't know what "works" means, compile and run the code and it should be obvious). The full set of challenges can be found here: 2010 2011 (unfortunately, the website / problem statements are in Spanish, but I'm sure you can work it out with a bit of copy/pasting into Google Translate - if there's enough interest I'll translate them to English).

    1. Re:Not a great challenge by Anonymous Coward · · Score: 0

      Step 1, interestingly it also reminded me of machine code - probably because I've spent too many hours programming a ZX81 inmy yuff, I'm not sure today's kids have had that experience - so all in all I agree its bad.

    2. Re:Not a great challenge by Anonymous Coward · · Score: 0

      Hmm someone is an 8bit fan ;-) Marcan

    3. Re:Not a great challenge by ceoyoyo · · Score: 0

      "combined with some steganography"

      Calling data contained in the comment field of a png steganography seems rather overly generous.

    4. Re:Not a great challenge by snowgirl · · Score: 1

      "combined with some steganography"

      Calling data contained in the comment field of a png steganography seems rather overly generous.

      He didn't say that it was GOOD stenography...

      --
      WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
    5. Re:Not a great challenge by b4dc0d3r · · Score: 3, Interesting

      Your experience has you quite biased towards these sorts of things. You only watched this video, I can tell, and didn't pay attention.

      In the disassembly for stage 3, the messages "loading stage x license key", when they clearly said you were on "stage 2 of 3", were good hints. The unused firmware bits were fairly obvious because they had the right size and served no other purpose, and the unused bytes from stage 1 were obvious after you get your mind on the "unused bits from each stage" track.

      And the VM part wasn't trivial. This guy did it in python, but it was intended to be done in javascript. The implementation doesn't really matter, but understanding the bit fiddling needed to implement it is a valuable skill. If you have the skills to disassemble, but not write anything more complicated than hello world, you're probably not useful to them. Not a difficult challenge, but one where you can easily make a mistake and grind your gears for hours. Remember the intent, to find viable candidates for cybersecurity who are interested in doing this sort of thing. Sometimes cyber security is boring but you do what's necessary to solve the problem.

      And they never advertised it as a hack-it contest or programming challenge, just a puzzle. So it didn't have to even be fun or entertaining to do - just something to solve. Note as well, they didn't ask for contact information or offer a resume upload - just "Please consider applying with us". So it doesn't even get you an interview.

      If you spent the time and are curious enough, you're probably someone they want. If not, you're probably not.

    6. Re:Not a great challenge by marcansoft · · Score: 1

      If you want a steganography challenge (with a twist), try this, from this year's Hack-It ;)

    7. Re:Not a great challenge by marcansoft · · Score: 1, Interesting

      Your experience has you quite biased towards these sorts of things. You only watched this video, I can tell, and didn't pay attention.

      I solved stage 2 entirely on my own and reverse engineered enough of stage 3 to realize exactly what it was doing. I had glossed over stage 1 (after I realized it was x86 I just googled it and saw that others had solved it already) so I didn't immediately know about the unused instructions, but I did correctly guess that the "firmware" stuff from stage 2 was used for the second two 32-bit words in the URL.

      Basically, I had no interest in playing the guessing game portions of the challenge, especially since I found out about it late and plenty of people had solved all of it already. I have no incentive to beat it entirely on my own: this isn't a contest and I already have a full-time job so I am not interested in applying; I was just curious to see what kind of problems they were and whether any of them were interesting to me.

      In the disassembly for stage 3, the messages "loading stage x license key", when they clearly said you were on "stage 2 of 3", were good hints. The unused firmware bits were fairly obvious because they had the right size and served no other purpose, and the unused bytes from stage 1 were obvious after you get your mind on the "unused bits from each stage" track.

      Of course it was obvious, but that doesn't make it interesting. This is the kind of problem that is testing no useful skill other than whether the player has been on the lookout for unused stuff that may or may not be useful later. That's not really how real life problems work. If something is used, there will be pointers to it in real applications. Reverse engineering isn't about pulling numbers from strange places and "trying to see if they work".

      Mind you, some people enjoy this kind of puzzle. I'm just saying it's the wrong kind of puzzle.

      And the VM part wasn't trivial. This guy did it in python, but it was intended to be done in javascript.

      Why, because the file happened to end in .js? The only information in it was a memory array, a few constants, and comments. If, as a reverse engineer, you pick the language that you're "supposed to use" instead of the language that you prefer or which is most practical or useful in a given situation, you're doing it wrong. I played in a CTF once where we were given a Linux box running a few services, including one written in shell with a bunch of shell injection and path traversal vulnerabilities. I just rewrote it in Python: it was faster than trying to wrap my head around the existing shell code and its bugs, and I could easily guarantee that all of those holes were gone (and the service was simple enough that I knew there wouldn't be any unexpected exploitable problems). Fixing the original would've taken longer.

      The implementation doesn't really matter, but understanding the bit fiddling needed to implement it is a valuable skill.

      So they had people implement a VM in order to prove that they know how to shift and mask bits? The are a myriad other ways of doing that that don't involve a VM. If you're going to have a challenge based on a VM, it should be because you want the player to be able to understand a program written in a novel architecture and write their own disassembler, or something similar. The whole point of a VM in a security system is to obfuscate the code running on it - if you don't have to disassemble or understand that code to achieve your goal, then the VM has failed its purpose.

      If you have the skills to disassemble, but not write anything more complicated than hello world, you're probably not useful to them.

      If the intent is to test that the player can program, then it's still a much better challenge to provide the VM code and a description of the architecture, but still require th

    8. Re:Not a great challenge by dnewt · · Score: 3, Insightful

      Unless you're intimately familiar with the tasks undertaken by GCHQ analysts such as the one this test is recruiting for, I think it's hard to say for sure whether the test was, in fact, good or bad. The thinking behind why some elements of the test were designed the way they were may not be immediately obvious. Having said that, I do wonder whether GCHQ would put their best minds to task working on devising a top rate recruitment puzzle. With the current international climate, combined the the current economic climate, I'd hazard a guess that their time is rather precious ;)

  4. Why crack it when you can bypass it? by TripleP · · Score: 4, Funny

    So if you can't crack it, but you can bypass the challenge, do you still win?

    http://www.canyoucrackit.co.uk/soyoudidit.asp

    1. Re:Why crack it when you can bypass it? by Xugumad · · Score: 1

      If by win, you mean stand a fair chance of getting to the interview stage, probably. I suspect lacking a good answer to "How did you solve the problem?" would be a bit of an issue, until the whole thing was blown wide open anyway...

    2. Re:Why crack it when you can bypass it? by Anonymous Coward · · Score: 0

      Pointless anyway. I recently learned that the PC is dead and there is no use for these complex machines anymore. All we need is tablets and phones, for which the apps are available from app stores. Is there an app for this challenge?

    3. Re:Why crack it when you can bypass it? by newcastlejon · · Score: 1

      If by win, you mean stand a fair chance of getting to the interview stage, probably. I suspect lacking a good answer to "How did you solve the problem?" would be a bit of an issue, until the whole thing was blown wide open anyway...

      "Cheating is often more efficient." 7 of 9

      I'm no expert, but isn't showing initiative a desirable quality in candidates?

      --
      If God forks the Universe every time you roll a die, he'd better have a damned good memory.
    4. Re:Why crack it when you can bypass it? by ericloewe · · Score: 1

      Yeah, but simply trying out addresses to see if you randomly reach the "Well done!" page is not really useful in this context.

    5. Re:Why crack it when you can bypass it? by Anonymous Coward · · Score: 0

      It wasn't random at all. Google indexed it and there were only a few links, and the name made it obvious.

      I'm surprised that more of an issue wasn't made as to the sloppy execution.

    6. Re:Why crack it when you can bypass it? by Rashdot · · Score: 1

      No, because your IP address wasn't registered jumping through all the hoops.

      --
      This is not the sig you're looking for.
    7. Re:Why crack it when you can bypass it? by Xugumad · · Score: 1

      Debatable; keep in mind they're recruiting for cryptanalysts and information/network security people, not spies in the traditional sense. They want strong problem solving abilities; so short-cutting to the solution I would imagine won't discount someone, but they would also need to show the core skills expected of the job...

    8. Re:Why crack it when you can bypass it? by Anonymous Coward · · Score: 0

      Even if it's blown wide open you can still ask "here's a similar but not identical problem, please solve it" at the interview. Those who googled the solution and didn't understand the method will be very easy to weed out, those who googled the solution and understood the problem might have a chance of solving similar problems. Those who solved it themselves should be able to make the relevant adjustments easily.

    9. Re:Why crack it when you can bypass it? by Anonymous Coward · · Score: 1

      "I crowdsourced it."

  5. I've been having a go... by shic · · Score: 3, Interesting

    I'm aware that the solution has been leaking out onto the net...

    Starting later than most, in spare time, I've trudged through stages One and Two... I've been playing with the stage-3 executable and have disassembled it... though there remains further tedious trudging for me to demonstrate by sensible sequential steps how to go about solving stage-3.

    I'm finding it difficult to convince myself that it's worth the effort... I'm sure I can fathom any remaining steps - based upon the fact that there has been little about stages one and two that was actually 'challenging'. It seems silly to plod onwards without 'cheating'.

    I was interested principally to try and find out what sort of skills GCHQ actually want... I never assumed I'd be (one of the) first to solve it. The experience has left me wondering what sort of job this sort of tom-foolery would suit one for. Sure debugging and OS-level skills can be valuable - but the challenge is most time consuming as one is required to guess the objective - identifying the intentions of the challenge setter rather than to address real-world issues.

    1. Re:I've been having a go... by marcansoft · · Score: 2

      Stage 3 isn't worth the effort. It's very little hacking/reverse engineering and mostly silly guesswork with no sensible sequence of steps to get there. Spoiler ahead:

      The primary challenge is to guess what bits of stage 1 and stage 2 to stick into a URL (or a file which the exe then formats into a URL). You have to go back to stages 1 and 2 and fish out the most likely candidates for "3 32-bit numbers that do nothing and stick out like a sore thumb".

    2. Re:I've been having a go... by locokamil · · Score: 0

      It's absolutely not worth it to get through to the end.

      Salary from their job posting:

      £25,446 (GC10) £31,152 (GC9)

      Why on earth would a top notch graduate apply for this position when s/he could make 4x that in the private sector? As the professor in the third video said: that's rather a disappointing end.

    3. Re:I've been having a go... by starofale · · Score: 2

      errrr.... what?

      I'd like to know where I could earn £120,000 as a starting salary when I graduate.

    4. Re:I've been having a go... by locokamil · · Score: 1

      Top grade banks. Look to get hired as a quant, not a techie. Starting salary in the US was $160K flat, plus bonus when my college friends were doing it a few years back. Things have cooled off a bit since then, but it's still possible -- especially with a finished masters or half-finished doctorate.

    5. Re:I've been having a go... by Rising+Ape · · Score: 1

      What are the hours and stress like in that job though?

    6. Re:I've been having a go... by Necroloth · · Score: 1

      compared to working for the Intelligence service, knowing that your every movement, call and net is monitored?

    7. Re:I've been having a go... by locokamil · · Score: 1

      In at 6:30, out by 7, with monitoring of risk jobs overnight if need be.

    8. Re:I've been having a go... by Rising+Ape · · Score: 1

      So pretty horrible then, just about enough time to work, eat and sleep.

      There's always a catch isn't there?

    9. Re:I've been having a go... by xaxa · · Score: 2

      What are the hours and stress like in that job though?

      Rhetorical, or not?

      A couple of my friends (well, more friends-of-friends) from my year went on to do that. That was when I stopped seeing them. "Let's meet for drinks after work in central London!" They rarely turned up before 10pm, and even then sometimes went back to work after an hour or two. Got to get their bonus, you see.

      One of my closer friends -- I lived with this guy for two years! -- is working for a hedge fund. £200k, I think, probably with a bonus. He was never particularly social, but in the last three years I've seen him about three times. Last time, he noticed I'd cycled straight from work and asked if I thought it was quicker than taking the metro. I said it was similar, but it was nice to avoid the crowds and kept me fit. He said "but the train's always pretty empty at 5:45am"...

    10. Re:I've been having a go... by xaxa · · Score: 2

      You might get £35k (basic) in IT in a bank in London, with anything up to 100% bonus. You get to help screw up the economy, too. Don't worry -- after 2-3 years you'll have lost your morals.

      Or similar money (and bonus) working in IT for a software company writing code for banks.

      I know someone who's making nearer (over?) £120k as a contractor for banks writing Android apps, but he spent a couple of years writing apps himself (earning a decent amount selling them) before he had the reputation to do that.

    11. Re:I've been having a go... by MattBecker82 · · Score: 3, Informative

      Err ... no. There simply aren't quant jobs with grad starting salaries of that level, certainly not in London, and I would highly doubt you'd find that level in NY either. Salaries actually went up (and bonuses down in relative terms) after '08-09, but there's still no way you'll get a six-figure (GBP) base for a grad starting position.

      Also, timing is pretty bad if you want to land a quant role right now. Front-office hiring patterns tend to be very cyclical and right now they're in a downswing with most banks downsizing their quant teams and only a few hiring. Those that are hiring will much prefer experienced candidates over fresh grads, and competition among grads is fierce at the best of time.

      If you really want to go for it, be aware that most houses won't look at you unless you have at least a Masters or equivalent in finance and/or a Doctorate in strongly numerate hard-science subject. You need demonstrable skills in maths (linear algebra, PDEs, probability theory), quant finance theory and software development. Language-wise, C++ is a must-have, knowing R is also good. "Sure I can program: I did some MATLAB as part of my masters" is not looked upon well. Interviews are tough and mostly fair: a mix of technical (maths, finance, programming) and problem-solving, with some interviewers unfortunately throwing in the odd "what-am-I-thinking" type question. Oh, and if the interviewer asks you to explain your doctoral thesis, it's not because they care about the subject: they are testing your skill at communicating complex subject matter succinctly.

      Disclaimer: I was a quant in a tier-one European bank for over 6 years, including recruiting experienced hires and grads.

    12. Re:I've been having a go... by locokamil · · Score: 1

      I didn't mind it too much...I managed to find a wife, start a family, have a hobby shop and write a book while I was in the system.

      The key is to not become addicted to the fat paycheck. It's hard for some people to do, which is why they stay in and subject themselves to the stress for years on end. I saw far too many people with empty million dollar Manhattan apartments to fall into that trap, so when the wife got a teaching job in another part of the country in my sixth year, I packed up and left. We bought a house, have enough left over for our kids' college educations, and keep family-friendly hours now.

      There are tradeoffs for everything, but if I had a chance to do it all over again, I can't imagine what I'd do differently.

  6. I thought this was a crypto/cypher challange by morphage · · Score: 1

    I didn't realize that reversing IA-32 excutables was the modern meaning of cracking a code. I figured it would be difficult and possibly even rely on dictonary attack of a cryptographic hash, but IA-32 machine code? This sounds like they are more interested in recruiting people to analyze stuff like Stuxnet than to attract people with cryptography, information theory, and signals backgrounds. I don't claim to be crypto expert (I've took an abstract algebra class that is a requirement for all cryptography classes at a university) but my first instinct was to assume that each byte was either an xor'd (as a first pass, to get it out of signed byte space) or residue of some modular division operation. When that didn't work I started analyzing the frequency of the bytes and map them to the letter frequency distribution for English. When I realized that most symbols only appeared once I gave up. If nothing else it was an excuse to brush up on my Python iterators.

    I haven't looked at the video yet, because I still want to see how far I can get with just the spoilers in the comments.

    1. Re:I thought this was a crypto/cypher challange by morphage · · Score: 2

      I haven't looked at the video yet, because I still want to see how far I can get with just the spoilers in the comments.

      Grr...now I'm mad I didn't recognize the byte swapped DEADBEEF.

    2. Re:I thought this was a crypto/cypher challange by dachshund · · Score: 4, Insightful

      didn't realize that reversing IA-32 excutables was the modern meaning of cracking a code. I figured it would be difficult and possibly even rely on dictonary attack of a cryptographic hash, but IA-32 machine code?

      For better or for worse, modern intelligence agencies are much more dependent on people who can RE software and develop exploits, than they are on pure cryptographers.

      This is a consequence of the rolling disaster that is software security, combined with the fact that crypto folks have (mostly) gotten their act together.

    3. Re:I thought this was a crypto/cypher challange by The+Askylist · · Score: 3, Interesting

      GCHQ has just announced that they are to lead the UK's cybersecurity push. I guess they need some reverse engineering skills in a hurry.

    4. Re:I thought this was a crypto/cypher challange by PeterBrett · · Score: 2

      This sounds like they are more interested in recruiting people to analyze stuff like Stuxnet

      Yes, that's probably exactly what they're after.

    5. Re:I thought this was a crypto/cypher challange by Anonymous Coward · · Score: 0

      Weak crypto is almost trivial to decrypt - substitution ciphers fall prey to simple frequency analysis, Kasiski, Friedman, et al

      Strong crypto is usually impossible to crack and the only weaknesses you can hope for are in the implementation of the algorithm rather than the algorithm itself (whether that is the re-use of one-time pads, weaknesses in a software implementation that lead to side channels, bad randomness, ...).

      In practice you will want to get the text before it is encrypted or after it has been decrypted. Breaking the actual codes will only be possible when dealing with fools.

    6. Re:I thought this was a crypto/cypher challange by russotto · · Score: 2

      This sounds like they are more interested in recruiting people to analyze stuff like Stuxnet

      Yes, that's probably exactly what they're after.

      If they're really looking for people who can do that, they should be looking at people who crack DRM. Oh, are most of the people like that keeping their heads down and unlikely to be considering government jobs? Gee golly, I can't imagine why...

    7. Re:I thought this was a crypto/cypher challange by elfprince13 · · Score: 1

      Maybe I've too recently spent too much time looking at disassemblies, but I recognized it as x86 almost immediately.

    8. Re:I thought this was a crypto/cypher challange by Anonymous Coward · · Score: 0

      Yup, me too, although I didnt quite get why. Although reading some of the comments I understand it isnt a extremely fun puzzle.

    9. Re:I thought this was a crypto/cypher challange by Anonymous Coward · · Score: 0

      Doesn't one usually push from behind?

  7. Meh by Anonymous Coward · · Score: 0

    Looks like some Brits need to try out the Mystery Hunt

  8. perhaps they want to examine packet logs? by wierd_w · · Score: 4, Insightful

    This is an intelligence agency, and network intrusion programs pumping executable code in the attempt at smashing a stack and jumping execution are pretty common.

    Perhaps they want people who can quickly spot x86 assembly payloads from raw packet traces as part of a counter aggression op?

    If we assume that their network stack isn't riddled with exploitable stack variables or pointers, and that they successfully prevent the code from running, but log the unrequested network access and dump the binary packets to file for analysis, then having people that can "at a glance" determine what kind of data is in those dumps would be valuable.

    Being able to determine what it actually is supposed to do even more so.

    With the recent hysteria over scada system cyber attacks (I hate that phrase btw..),setting up a fake scada system as a honeypot and seeing what the cat drags in could also make use of this skillset.

    So, the obvious questions:

    Does the UK fear it has poorly secured scada systems, or does it fear network worm intrusion on some network segement, and if so, what segments or systems are those?

    1. Re:perhaps they want to examine packet logs? by carvell · · Score: 1

      Why do people think this is anything other than a publicity stunt to generate internet-chatter and pimp their name about a bit?

      The details of the challenge are almost certainly irrelevant - anyone can apply for GCHQ jobs directly with them, without having to complete a challenge.

      The more their name is banded around forums and sites like slashdot the better, as they'll get more people applying for their jobs, which can only be good for them.

    2. Re:perhaps they want to examine packet logs? by Anonymous Coward · · Score: 0

      Perhaps they want people who can quickly spot x86 assembly payloads from raw packet traces as part of a counter aggression op?

      This is a simple task in statistical analysis. You can bet your ass that they have code which does this way better than a human does it. And if they don't I'll write it for them (not for £25K/year though).

  9. Screen recorder by onceuponatime · · Score: 1

    So what screen recorder software did the author use? It plays back nicely.

    1. Re:Screen recorder by Anonymous Coward · · Score: 0

      I don't know exactly what they used, but FRAPS will typically record 30/60 FPS smoothly. Given the low resolution, it wouldn't be that hard either.

    2. Re:Screen recorder by onceuponatime · · Score: 1

      Fraps doesn't do Linux. Whatever was used here was on Linux. That's what I want it for as well.

    3. Re:Screen recorder by xaxa · · Score: 1

      If you look at the final video, you'll see that it's Linux running inside a VM, on Windows.

    4. Re:Screen recorder by DrDevil · · Score: 1

      The screen recorder is Camtasia - Linux is running in a VM under Windows.

    5. Re:Screen recorder by Sulphur · · Score: 1

      If you look at the final video, you'll see that it's Linux running inside a VM, on Windows.

      Was it on the boss's machine?

    6. Re:Screen recorder by onceuponatime · · Score: 1

      Thanks for that! It made for a very nice presentation.

  10. Stopped at stage 3 by AdrianKemp · · Score: 1

    Stage 1 and 2 were really easy frankly. Especially stage 2 since aside from the small error (intentional or not) in the implementation document it was just some simple coding.

    Stage 3 was where I stopped, not because I was daunted or otherwise unable but because I didn't have the tools available to screw around with the exe. It was also at that point that I learned they were too stupid to even put up a robots.txt file and thus were not an organization I had any interest in working for.

  11. My solution with full writeup by ncw · · Score: 5, Informative

    I was going to hold this back until the competition was finished, but it seems the cat is out of the bag!

    Here is my solution and a writeup of exactly how I got there.

    http://www.craig-wood.com/nick/articles/how-i-solved-the-gchq-challenge/

    --
    Every man for himself, all in favour say "I"
  12. I got demotivated by Anonymous Coward · · Score: 0

    after googling the solution: https://www.google.com/#q=site:canyoucrackit.co.uk&hl=en&safe=off&filter=0

    'Disallow: /' in robots.txt does not stop Google from picking these URLs from other sites...

  13. GCHQ explanation by Anonymous Coward · · Score: 0

    www.twitter.com/badeip posted an explanation for this challenge a while ago

  14. Re:Screen recorder - here by Anonymous Coward · · Score: 2, Interesting

    http://recordmydesktop.sourceforge.net/about.php

  15. Re:Screen recorder - here by onceuponatime · · Score: 1

    This is probably it. Thanks.

    For something ontopic. What's all that stuff about morse code in the source then? Are they providing several challenges so they can recruit people of different skill levels and I indeed different areas of expertise? It would seem the logical thing to do. Maybe there is even another even harder challenge in there to get the really really clued up people? Maybe there's a code hidden In the white space of the source code? (Just throwing down the gauntlet and teasing people).

  16. Stage 2 VM in JavaScript by Frans+Faase · · Score: 1

    I spend about three hours writing (mostly debugging) a JavaScript implementation of the VM. (I did make a side step to C++ because at one point the JavaScript implementation seemed to run in an infinite loop.) I also discovered that the specification was not very clear and required some interpretation. So stating that stage 2 was the simplest step, and using some code that someone else developed, is not really honest. The biggest problem was with figuring out how the jmp instruction worked and the use of the cs register, because that was not explained in the specification. For more on my implementation see here.

  17. Stage 2 not trivial by Frans+Faase · · Score: 1

    It took me about 3 hours to implement stage 2 in JavaScript (and in C++ when the JavaScript implementation seemed to run in an infinite loop). The specification was not really trivial with respect to the jump instruction and did not explain the use of the cs register, which is not obvious to people who have not worked with 8 mirco processors using segmented memory, such as the Z-80. I always played with the 6502, which doesn't use segmented memory and has a 16-bit program counter.

    1. Re:Stage 2 not trivial by marcansoft · · Score: 1

      It took me about 30 minutes using Python (why would you use JavaScript? The mind boggles.), but yes, I agree, the specification wasn't terribly clear especially if you've never worked with segmented memory. The jump instructions also are confusingly described as jumping to r2:r1 in the mod=1 version (it should be imm:r1). Personally, I quite dislike this memory model (and x86 in general), but I've had the "pleasure" of working with an embedded system integrating a 80186 core so I had a fairly good idea of what they look like.

    2. Re:Stage 2 not trivial by Anonymous Coward · · Score: 0

      why would you use JavaScript?

      Why not? My JavaScript version is no more complicated than the Python version linked in TFA. Did you have some sort of point or are you just another Python fanatic?

    3. Re:Stage 2 not trivial by marcansoft · · Score: 1

      Well, if JavaScript is the language that you're most familiar and comfortable with, and you're happy using a browser or you have a commandline JS interpreter handy, then by all means. I personally prefer Python of course, but everyone has a different taste in programming languages. However, what makes no sense is writing it in JS just because the original file ends in .js. That little fact should have exactly zero influence on the choice of language that you do pick to implement this in.

      Considering the parent switched to C++ though, it seems the he hit some kind of snag. If JS is his preferred scripting language then I wouldn't expect him to switch to something else when he has trouble, that's why I kind of assumed that he picked JS just because the original file happened to be JS and not because it's what he finds easiest.

      FWIW, my Python version is about 2.5x shorter than TFA's version (counting only the actual code, not the memory block or comments), though I went for a quick and dirty, shortest and simplest version that would do the job, without attempting to make it pretty-print instructions or do anything fancy, and without giving much though to readability (it was meant as a throwaway implementation that I could expand upon if I needed to analyze execution in more detail - thankfully, that wasn't needed and after adding a couple debug prints I was able to iron out a bug or two and it just worked).

    4. Re:Stage 2 not trivial by Frans+Faase · · Score: 1

      I used JavaScript as I assumed that that was the expected target language. Most of the time went into understanding the semantics of the jmp(e) instruction and for that I needed some tracing. Then I went to C++ (my prefered language for the matter) when I hit an infinite loop and did not see any output, because I ran the script inside Firefox.

      It was also not my objection to write the shortest possible code. The more I write programs (including dirty and quick), I come to the conviction that my code should look nice and be pleasant to read. Too often, I have had the experience of having trouble with understandig code that I wrote more than few years ago. I look at your code and indeed it is very compact, but it is not easy to see that it indeed implements the specifications correctly. I am getting the impression that there is an "self.ip += 1" missing in the implementation of the jmp(e) when mod == 1.

    5. Re:Stage 2 not trivial by marcansoft · · Score: 1

      I am getting the impression that there is an "self.ip += 1" missing in the implementation of the jmp(e) when mod == 1.

      You're right. The problem isn't the lack of "self.ip += 1" inside the condition (that would do nothing, as the branch target specifies the new value for self.ip anyway); the problem is that when a conditional branch with mod == 1 isn't taken, the second byte is executed as a new instruction instead of skipped. I guess this variant isn't used in the provided bytecode so it didn't break things.

      I agree that code useful in the long term should be easy to read, but the chances of me wanting to go back to this code in the future are very, very slim, so I didn't bother with that aspect.

  18. Thank you, participants... by Anonymous Coward · · Score: 1

    ...for helping GCHQ crack the "Modern Warfare 3" video game copy protection! Well done, everyone!

    If you are interested in helping us get free premium television channels, cellular phone minutes, tickets to concerts, and more money from taxpayers, then join our team!

  19. not to go all dark arts by Anonymous Coward · · Score: 0

    but my first thought was,
    the passwords probably somewhere amongst the hosted files
    and if i did dns lookup, I could either use a web crawler see if anything was left somewhere obvious
    or go for a dictionary attack and try and get FTP access and search through the root
    but this seemed what's the word, stupid so I didn't bother ...

    kind of wished I had tbh ... 30k a year for using a bit of commonsense

    what we've learned; web masters are as lazy I'd thought

  20. Re: segmented memory by neonsignal · · Score: 2

    The Z80 is not a segmented memory model either; you might be thinking of some of the embedded versions such as the HD64180. It was the x86 architecture that was really afflicted with these segment registers.

  21. Challenge ruined .... by Anonymous Coward · · Score: 0

    Thanks for ruining the challenge in favour of some cheap publicity!!!!

  22. There was a really easy way to solve this. by nonsensical · · Score: 1

    Use google and search for site:canyoucrackit.co.uk and select show ommited results. http://www.google.com/search?q=site:www.canyoucrackit.co.uk&hl=en&safe=off&filter=0

  23. my way to solve it by Anonymous Coward · · Score: 0

    Buhahahaha. Took me 10 mins for stage1, 2h for searching for missing halfkey i.e. stage2 and 10 more minutes for stage 3.
    Very challenging indeed. Sk00n