Sunday, 2 February 2020

(Finally) Solving the Weasel keygenme

Back in 2016, kao posted the weasel keygenme on Tuts4you. It consisted of two parts - a custom VM in C# and some crypto. The VM implemented the main logic of the keygenme. In my previous writeup about the challenge, I succeeded in partially solving the challenge by devirtualizing the VM. The crypto part was left unsolved. This was mainly because the crypto logic was way too complex and without special algorithms there was no way to have a go at it. As described in my earlier post, even SAT solvers have no luck in cracking the crypto.

However this time after nearly 4 years I am happy to say that I did manage to break the crypto. In this blog post I will describe the process to solve this keygenme along with all the failed attempts.

Initially I planned to post the write-up on this blog but the blogger platform is not too good for handling equations and mathematical terms. Hence I have left the write-up as an IPython notebook on Google Colab which has been embedded as a GitHub Gist below. In case the preview below doesn't load properly on your browser you can always find the original notebook on Colab.

The keygen can be found on GitHub


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Thank you so much for this wonderful information about coding /Reversing. in this blog, it s amazing explained by you. nowadays People are preferring digital platforms to search their relevant things and they are more active on digital platforms. so get affordable USA VPS Hosting For your business profile.This is a great opportunity to reach your business on top in a very short time. that will get increase the brand reputation.

  4. Nice blog !!This blog is provides information about Solving the Weasel keygenme. which is very needful information for us. I come across few helps over here related by this post to do my task nicely. If you want to know about Server hosting ., I can help you USA VPS hosting it is provides best Server hosting and grow you business I really love your blog and surely recommend to my friends. Thank you so much for sharing this and I wish you all the best for the upcoming article. keep it u....!!!!!!!!!!!!!