lukebaggett / dnscat2-powershell

A Powershell client for dnscat2, an encrypted DNS command and control tool.
https://github.com/iagox86/dnscat2
390 stars 120 forks source link

Decrease Script Size #7

Open lukebaggett opened 7 years ago

lukebaggett commented 7 years ago

At the moment, encryption functions use BouncyCastle's crypto DLL, which requires a reflective load of a huge amount of data, significantly increasing the script size. This should be avoided, which will require finding alternative Salsa20, SHA3, and ECDH-P256 functions.

lukebaggett commented 7 years ago

The size has been reduced quite a bit. Before it was 1052461 bytes, and now it's 409973 bytes (38.9%).

The current dll used for ECC is a stripped down ECC-only version of the BouncyCastle DLL from Rebex Labs. It is 563.2 kB before compression, and $EncodedCompressedFile.Length is 321864. Other external code includes FrankSpierings's implementation of Salsa20 and Sha3 in Powershell via C#. Much thanks to these people!