klezVirus / inceptor

Template-Driven AV/EDR Evasion Framework
Other
1.6k stars 263 forks source link

Compiler limit exceeded: Line cannot exceed 16777214 characters #35

Open bestrocker221 opened 2 years ago

bestrocker221 commented 2 years ago

Describe the bug dotnet executable

When compiling the cs files needed for the encoders, the CSC compiler complains and stops the process.

[-] Error: temp\tmpg84fw_q7.cs(26,16777214): error CS1034: Compiler limit exceeded: Line cannot exceed 16777214 characters

To Reproduce This happens when passing a binary (in my case ~4MB) into inceptor.

Expected behavior working

notes I think that it might be because the cs file creation process includes the encoded binary into the bytearray in one single line. It might be enough to split the bytearray on more lines? (I am not a C# developer)

Take the opportunity to congratulate all the devs for the amazing work, this tool is awesome.

klezVirus commented 2 years ago

Thanks @bestrocker221, it's really appreciated! I'm working on this tool alone, and in my spare time only, unfortunately. This is why I'm struggling to implement all the things that I would like.

Anyway, I had a similar problem, I think I fixed it in the dev branch but never merged. Let me take a look.

bestrocker221 commented 2 years ago

All right! I am checking out the dev branch, but I am not able to start any compilation due to

[*] Phase 5: Compiling [-] Warning: warning CS1607: Assembly generation -- The version '10.0.19041.1586 (WinBuild.160101.0800)' specified for the 'file version' is not in the normal 'major.minor.build.revision' format

klezVirus commented 2 years ago

Strange, a warning shouldn't stop the compilation. Do you also see any error?

geodaftw commented 2 years ago

Hi! Is there a work around for this? I too receive the same issue on any shellcode larger than 5MB. I've tried compressing the shellcode and receive an error on:

"No logical space left to create more user strings."