h4wkst3r / InvisibilityCloak

Proof-of-concept obfuscation toolkit for C# post-exploitation tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Obfuscating then building Rubeus fails with "does not contain a definition for 'Program' and no accessible extension method 'Program"

jsdhasfedssad opened this issue · comments

Hi,

After obfuscating Rubeus main using InvisibilityCloak then trying to build it using both VS 2017 and 2022 I get the below error.

"'byte[]' does not contain a definition for 'Program' and no accessible extension method 'Program' accepting a first argument of type 'byte[]' could be found (are you missing a using directive or an assembly reference?) r

Anything I can do?

Hi @jsdhasfedssad - I was able to run InvisibilityCloak through the latest version of Rubeus, and compile with VS 2019 without any issues.


C:\Toolkit\InvisibilityCloak-main>python InvisibilityCloak.py -d C:\Testing\Rubeus-master -n "SomethingNew" -m rot13

        ,                 .     .   .        ,-. .         ,
        |         o     o |   o | o |       /    |         |
        | ;-. . , . ,-. . |-. . | . |-  . . |    | ,-. ,-: | ,
        | | | |/  | `-. | | | | | | |   | | \    | | | | | |<
        ' ' ' '   ' `-' ' `-' ' ' ' `-' `-|  `-' ' `-' `-` ' `
                                        `-'

====================================================
[*] INFO: String obfuscation method: rot13
[*] INFO: Directory of C# project: C:\Testing\Rubeus-master
[*] INFO: New tool name: SomethingNew
====================================================

[*] INFO: Generating new GUID for C# project
[*] INFO: New project GUID is b7401288-ea69-4afa-b5d0-cadf564ea226
[*] INFO: Changing C# project GUID in below files:
C:\Testing\Rubeus-master\Rubeus.sln
C:\Testing\Rubeus-master\Rubeus\Rubeus.csproj
C:\Testing\Rubeus-master\Rubeus\Properties\AssemblyInfo.cs


[*] INFO: Removing PDB string in C# project file

[*] INFO: Renaming Rubeus.sln to SomethingNew.sln
[*] INFO: Renaming Rubeus.csproj to SomethingNew.csproj
[*] INFO: Renaming directory Rubeus to SomethingNew

[+] SUCCESS: New GUID of b7401288-ea69-4afa-b5d0-cadf564ea226 was generated and replaced in your project
[+] SUCCESS: New tool name of SomethingNew was replaced in project

[*] INFO: Performing rot13 obfuscation on strings in C:\Testing\Rubeus-master\SomethingNew\Program.cs
[*] INFO: Performing rot13 obfuscation on strings in C:\Testing\Rubeus-master\SomethingNew\Asn1\Asn1Extensions.cs
[*] INFO: Performing rot13 obfuscation on strings in C:\Testing\Rubeus-master\SomethingNew\Asn1\AsnElt.cs
[*] INFO: Performing rot13 obfuscation on strings in C:\Testing\Rubeus-master\SomethingNew\Asn1\AsnException.cs
----SNIP----

[+] SUCCESS: Your new tool SomethingNew now has the invisibility cloak applied.


C:\Toolkit\InvisibilityCloak-main>cd C:\Testing\Rubeus-master\SomethingNew\bin\Release

C:\Testing\Rubeus-master\SomethingNew\bin\Release>dir
 Volume in drive C has no label.
 Volume Serial Number is 524F-42EE

 Directory of C:\Testing\Rubeus-master\SomethingNew\bin\Release

11/14/2023  07:52 AM    <DIR>          .
11/14/2023  07:52 AM    <DIR>          ..
11/14/2023  07:52 AM           628,736 SomethingNew.exe
11/14/2023  07:50 AM               158 SomethingNew.exe.config
               2 File(s)        628,894 bytes
               2 Dir(s)   3,360,198,656 bytes free