Live data from Hacker News

Coding Challenge for MI5

mi5.gov.uk

31–40 of 43 posts

Re: Coding Challenge for MI5

#31
I did HEX > ASCII > BASE64 Decode... Got this.

---

ш4ʄF ꇢʝ 0ʼnÁGۊ㩌挨ﻲn偃Y픤맀㫍zHvB塁ڟङ돒ٱ噭ۻm큔員踥;U35̆^ې5躂FTѥ憆∻bI1隤7糃1sÄàbrXÒ5㨄gP肂2똑jgQ7凮轋DnظƁए4o̤拢۪`z툃䇤1喉鴌桘 xO挎EệhʍϢU뵥f摗䪦驭y秺f¬y靭欅鞞뭡ʮꆫ婨zƛ뫶

---

With some editing out of characters...

Yan Lei who suffer㫍Qie ې Da Cheng ruin Fenghun rope䇤throat Fengchui O destroyed ʍϢU 摗Yu秺 䰢Ren Ju scabbard 뭡 Lun 뫶

---

Not sure if I'm on to something but was interesting seeing the Chinese characters.

Re: Coding Challenge for MI5

#32
post #31

I did HEX > ASCII > BASE64 Decode... Got this. --- ш4ʄF ꇢʝ 0ʼnÁGۊ㩌挨ﻲn偃Y픤맀㫍zHvB塁ڟङ돒ٱ噭ۻm큔員踥;U35̆^ې5躂FTѥ憆∻bI1隤7糃1sÄàbrXÒ5㨄gP肂2똑jgQ7凮轋DnظƁए4o̤拢۪`z툃䇤1喉鴌桘 xO挎EệhʍϢU뵥f摗䪦驭y秺f¬y靭欅鞞뭡ʮꆫ婨zƛ뫶 --- With some editing out of characters... Yan Lei who suffer㫍Qie ې Da Cheng ruin Fenghun rope䇤throat Fengchui O destroyed ʍϢU 摗Yu秺 䰢Ren Ju scabbard 뭡 Lun 뫶 --- Not sure if I'm on to something but was interesting seein…

I think there is maybe a couple more steps to it but interesting to see what you guys come up with.

Re: Coding Challenge for MI5

#33

1. Open PNG in text editor, see comment: As I read, numbers I see. 'Twould be a shame not to count this art among the great texts of our time 2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM. 3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's. 4. Now feed it through this program: #include main() { int c, l=0, n=1; while(EOF != (c=getchar())) { if(c == l…

My solution:

  #!/bin/sh
  wget https://www.mi5.gov.uk/sites/default/files/u2/puzzle.png
  convert puzzle.png puzzle.xpm # Convert the image to XPM with ImageMagick.
  # Here is what the contents of puzzle.xpm looks like:
  # http://pastebin.com/0PySSAXx. The spaces represent one color and the dots
  # the other. We'll replace the spaces with underscores for readability.
  
The XPM image file format (https://en.wikipedia.org/wiki/X_PixMap) is great for doing things like this. I find it easier to read and to edit by hand than the Netpbm format family. It seems ImageMagick can't write XPM2, though, which makes extra preprocessing necessary.

Re: Coding Challenge for MI5

#34
The count-the-pixels thing is too obvious, and doesn't explain why this is a compressed png that's almost twice the size of what you get when you decompress it.

"'Twould be a shame not to count this art among the great texts of our time" makes me think part of the file is a one-time pad against part of some famous book (based on the phrasing, and the Britishness of MI5, probably some 19th century British literary author, maybe Dickens or Austen). Assuming that's the case, the solution would be:

1. Figure out which 'text' they're referring to, or get the text of as many books as possible;

2. Take the chunk of the file between the PNG headers and the Comment;

3. XOR that chunk against the corpus with a sliding window;

4. Score each sample based on number of english words found in the output, keeping the top 10 as you go (or do some map/reduce crap because this would take a while);

5. Read the top outputs and see if anything makes sense.

This would also explain why the file is a bit longer than you'd think it should be based on its visual contents.

If anyone wants to try it, this might be a good start:

* https://www.gutenberg.org/ebooks/author/37

* https://www.gutenberg.org/ebooks/author/68

Re: Coding Challenge for MI5

#35

Earlier quoted context omitted.

Well the full message is "436F6E67726174756C6174696F6E732C20796F7520736F6C766564207468652070757A7A6C65212057687920646F6E927420796F75206170706C7920746F206A6F696E206F7572207465616D3F206D69352E676F762E756B2F6361726565727320" "Congratulations, you solved the puzzle! Why don�t you apply to join our team? mi5.gov.uk/careers " So i doubt there is much more to it ;)

I got that far too. I don't believe it - there has to be more to it than that. There'll be something else in that file that's better hidden, for sure, and I'm pretty sure it won't be plain ASCII and hex. :)

I'm a bit disappointed there aren't any hidden chunks that take advantage of the PNG format :-(

Uncompressed it's just a binary message of 2 pixel colours, so unless that comment at the end is pointing somewhere else then it's not got much depth...

Re: Coding Challenge for MI5

#36

1. Open PNG in text editor, see comment: As I read, numbers I see. 'Twould be a shame not to count this art among the great texts of our time 2. Threshold so some of the pixels are black and others are white. Save as ASCII PBM. 3. Strip the PBM header lines and remove newlines so that it's just 0's and 1's. 4. Now feed it through this program: #include main() { int c, l=0, n=1; while(EOF != (c=getchar())) { if(c == l…

Can you spoil the latest Bourne film for me as well please?

Re: Coding Challenge for MI5

#37
Iterate over the personal information of 5000 citizens using a for loop and violate their rights by calling the violateHumanRights() function which takes a single parameter which is the personal identification number attribute of the citizen.

Re: Coding Challenge for MI5

#38
post #34

The count-the-pixels thing is too obvious, and doesn't explain why this is a compressed png that's almost twice the size of what you get when you decompress it. "'Twould be a shame not to count this art among the great texts of our time" makes me think part of the file is a one-time pad against part of some famous book (based on the phrasing, and the Britishness of MI5, probably some 19th century British literary aut…

It does seem too obvious, and the comment seems to be pointing somewhere else like you say.

What do you mean about the compressed size?

There are no hidden chunks in the file, and the image data chunk when inflated is 60147 bytes, vs 1270 compressed.

Re: Coding Challenge for MI5

#39
post #38
post #34

The count-the-pixels thing is too obvious, and doesn't explain why this is a compressed png that's almost twice the size of what you get when you decompress it. "'Twould be a shame not to count this art among the great texts of our time" makes me think part of the file is a one-time pad against part of some famous book (based on the phrasing, and the Britishness of MI5, probably some 19th century British literary aut…

It does seem too obvious, and the comment seems to be pointing somewhere else like you say. What do you mean about the compressed size? There are no hidden chunks in the file, and the image data chunk when inflated is 60147 bytes, vs 1270 compressed.

I ran `convert -compress None puzzle.png` and the output was ~800 bytes. Clearly that's optimizing the image too, but basically the image seems wastefully large, and that makes me suspicious there's something going on there.

Re: Coding Challenge for MI5

#40

OK, so, the obvious "congratulations" messages aside, what's really in that file? Example: Take the PNG, convert it to another lossless format. Then convert that lossless format back to PNG. Different file size, right? OK, the comment accounts for about 120 bytes.. but what about the rest? Why is it that much bigger? "As I read, numbers I see. 'Twould be a great shame not to count this art among the great texts of ou…

"As I read, numbers I see."

If we move the comma, this becomes: "As I read Numbers, I see"...

OTP on the https://en.wikipedia.org/wiki/Book_of_Numbers, perhaps?

There may well be a lot more to this puzzle than first meets the eye!

Post reply on HN