I don't know, they write things like “the magic happens here:” etc., but in fact, if we analyze the key verification code in detail (it lies on the surface), after a short parsing we will understand a very trivial algorithm:
(Example: 77777-TOM-3412345-31222)
1. We get the first 5 characters, represent them as a number, and check that they are multiples of 7.
2. Take out some part of the third number (in this example: “234”) and check that it is not equal to “000”
That's really all, the keygen code in this case will be something like this: https://pastebin.com/4qjRwh3f |
==> |
At first I was surprised that the binary is compiled in debug (I understood it that way), but in reality it doesn't help much in crackme solution, if you do it the way the developer intended and not bypass checks, etc.
All in all, quite interesting, but it could be made even more complicated by applying some protection techniques
I got the password by making this script: https://pastebin.com/g9mujWJp |
==> |