Encrypting Strings

Strings are a big indicator of malware and are a big target of most AV's and security products. Here we will make use of encrypting your strings and shellcode to evade detection.

We will use XOR encryption to hide our payloads. I have stolen a xor encryptor script from here:

This takes a shellcode bin file and xor encrypts it with a random key.

If you pass your file to this script, you should get a key and your encrypted shellcode in a byte array.

To decrypt this, we can use this simple C function in our implants:

Example of using this XOR function is:

Last updated

Was this helpful?