Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jul 2018
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help - I'm writing a story where a character solves a cryptic coding puzzle...

    I'm writing a story where a character solves a cryptic coding puzzle. I'm looking for advice on what an expert coder would do in order to find patterns in code.

    Would they use software to test code for patterns, just use their eye, how would they test their theories, etc?

    I want the character to appear a coding genius who can see patterns / complete the puzzle where others can't. Code wise, it can be a mixture of any programming language.

    I'm not sure how clear this is but hopefully you kind of get when I'm saying. Any advice would help loads! Thanks

  2. #2
    New to the CF scene
    Join Date
    Jul 2018
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not an expert coder but I'd do something like this.

    I would have a pre-made set of programs I'd call a toolkit. When I'm looking at a piece of test code, I use my toolkit to run a bunch of tests on the test code. The toolkit would identify any common patterns in the test code which may be difficult or time consuming for a person. I would look at the code myself too, because of how limited computers are at reasoning. And if the story is about a genius I would assume they would be curious enough to want to figure out how the test code worked.

    Back to the toolkit. It could do forensic operations on the test code. It could look for patterns such as how whitespace was handled. Were there dead giveaways such as line endings, code indentation, encoding, etc. which suggest a certain operating system, code editor, or region settings used by the test code's creator? Were there comments in the code which could narrow down the author's identity based on punctuation style, whether or not they put one or two spaces after periods? Whether or not their formatting was consistent? Do they put spaces on both sides of parens? Ex: (i==7) vs ( i == 7 ). Do they indent their code with 2 spaces, 4 spaces, tabs, or something else? Do they follow PEP 8 StyleGuide? All that data could be plugged into an AI that found code on GitHub/Sourceforge/etc. with similar coding style.

    Another thing the toolkit could identify is wheter or not steganography was applied to the test code. Examples: Secret data hidden in zero-width characters, whitespace, obfuscated or encrypted code, etc.

    As for testing theories, the expert coder could create a test suite which runs code of their own creation against the test code. For example, The coder could theorize that sending parameters 2 and 3 to the test code should result in the test code spitting out 5. A test in the suite would be created that essentially says, "return a green light if the test code outputs 5 when I send it parameters 2 and 3." That's an example with simple numbers, but the actual data submitted could be a very complex algorithm. The test suite could be ran over and over very quickly to see if there are variations in the results between each run, and automatically ran after every time the coder comes up with a new theory and subsequently adds another test to the suite. Only when **all** the tests (theories) pass with green lights is the coder satisfied that they have cracked the cryptic code puzzle.

    Have you heard of Circada 3301? It's a cryptic coding puzzle. Might be good reference material.

    Also DARPA cyber grand challenge could give you some ideas. Youtube has some great vids of the competition which was live streamed. A bunch of teams build AI systems which would automatically find exploits on a remote system, and automatically patch security vulnerabilities. All without human intervention. That's the future of cyber security right there!


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •