Hack Forums
[.NET] Reduce Stub Size - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Reduce Stub Size (/showthread.php?tid=5919616)



Reduce Stub Size - Alx0 - Dec 16, 2018

Is there any way / code for a crypter to minimize the Output file / compress it or somehing like that?
Or are there any possibilities to reduce the Stub size?


RE: Reduce Stub Size - Dredd - Dec 16, 2018

(Dec 16, 2018 07:36 AM)Alx0 Wrote:  Is there any way / code for a crypter to minimize the Output file / compress it or somehing like that?
Or are there any possibilities to reduce the Stub size?

How large is the stub your producing and what dependencies are you using?


RE: Reduce Stub Size - gigajew - Dec 16, 2018

Here's a simple zip-based packer if that's all you need https://my.mixtape.moe/jzvhvu.zip merry christmas
VirusTotal scans:
Archive: https://www.virustotal.com/#/file-analysis/YWVhOWM0YTI1OTY5MTk4MzUwMDUzYWU3NDUyMmZmM2E6MTU0NDk3ODU0MA==
Binary: https://www.virustotal.com/#/file/68a97817576b5bfbe23f7cb5b2af86e62d63c4b9d40e2bd00f3cdfa53feb00b1/detection

If you're trying to implement this in your code, just use GZipStream or like I did; ZipArchive


RE: Reduce Stub Size - Alx0 - Dec 16, 2018

(Dec 16, 2018 09:33 AM)⁠Dredd Wrote:  How large is the stub your producing and what dependencies are you using?

My Stub is 16KB ( i know not much)
But my Server is about 400KB so i want to compress this size with the stub in it to e.g 50KBytes or something like that. At the moment the stub is only the decryption function (rc4) but soon there will be many functions (startup, Persistence...) and the stub will be much larger...


RE: Reduce Stub Size - NYANxCAT - Dec 16, 2018

You can just use a plugin system instead of putting all the functions together in 1 assembly.


RE: Reduce Stub Size - Alx0 - Dec 16, 2018

(Dec 16, 2018 10:52 AM)˗ˏˋ NYAN CAT ˎˊ˗ Wrote:  You can just use a plugin system instead of putting all the functions together in 1 assembly.

What do you mean with a plugin system?


RE: Reduce Stub Size - NYANxCAT - Dec 16, 2018

Using a DLL as a plugin, same as njRAT, Revenge-RAT and LimeRAT.

Example, a plugin to restart and update client
https://github.com/NYAN-x-CAT/Lime-RAT/tree/master/Project/Plugins/PCL


RE: Reduce Stub Size - Nick (Name) - Dec 17, 2018

(Dec 16, 2018 01:52 PM)Alx0 Wrote:  What do you mean with a plugin system?

If you’re going to go down the path of a plugin system to stage your payload, I would highly recommend not reading anything produced by NYAN-x-CAT as their code is unreadable/has zero flow, utilizes bad practices, and is unoptimized. I’d suggest taking a look into using the command pattern along with a proxy pattern for your plugins, it’s not a simple solution and can be a bit complex. There’s plenty of examples online for VB.NET and C#, I’m not going to spoon feed them to you, but here’s a few wiki articles on the concepts.
https://en.wikipedia.org/wiki/Command_pattern
https://en.wikipedia.org/wiki/Proxy_pattern