This blog post has been created for completing the requirements of SecurityTube Linux Assembly Expert Certification: http://securitytube-training.com/online-courses/securitytube-linux-assembly-expert/ Student ID: SLAE - 1342
Hello Shellcoders,
     It has been two week since I wrote my last article. Well if you haven’t seen my Assignment 6 blog post on SLAE ASSIGNMENT 6 | POLYMORPHIC SHELLCODE'S - LINUX X86, then you can check it [Here]. Today in this post we will be writing the Crypter which will encrypt our execve-stack x86 Shellcode which is the final assignment for the SLAE exam.
So the requirement is:

  1. Create a custom crypter like the one shown in the "crypters" video.
  2. Free to use any existing encryption schema.
  3. Can use any programming language.
I will be using AES CBC Mode Encryption to encrypt the shellcode. I will be implementing the crypter in python3.
If you have any doubt, then please feel free to ping me on twitter [@Pwsecspirit].

Here is the python code of our Crypter:
Let's run it and see the help menu.
So, we can use -e or --encrypt to encrypt the shellcode. Let's encrypt it.
Amazing we have our encrypted shellcode data string. Let pass it to the decrypt option.
Amazing it decrypted and executed the shellcode as expected. I believe that's it for this assignment.

Thanks,

Continue Reading