Last active
September 18, 2021 19:58
-
-
Save med0x2e/a0e204c79808da841c809d6464b12094 to your computer and use it in GitHub Desktop.
Steps to run GadgetToJScript on linux (wine)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps: | |
1- apt-get install mono-complete | |
2- apt-get install wine winetricks -y | |
3- winetricks dotnet35 | |
4- winetricks dotnet48 | |
5- dpkg --add-architecture i386 && apt-get update && apt-get install wine32 | |
6- rm -Rf ~/.wine | |
7- WINEPREFIX=~/.wine32 WINEARCH=win32 wineboot | |
8- wine GadgetToJScript.NET3.5.exe -r -c helloworld.cs -d System.Windows.Forms.dll -w hta -o hello | |
Couldn't reproduce the same error from my side, I followed the same steps described above, on "SMP Debian 5.7.6-1kali2 (2020-07-01) x86_64 GNU/Linux". the first error you got is usually indicative of something wrong with wine configuration. may be running a random executable should confirm that. i used the same binaries located in the G2JS release. will create a docker image and share it when i get a chance to.
I wasn't able to get it to work with mono, certain dependencies are implemented in a slightly different way on mono. so i'm afraid it is not compatible with mono for now, (need to figure out an alternative of IDictionnary -> "AggregateDictionary" in the serialization gadget).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I wanted to chime in on this, I haven't been able to get these steps to work. I followed them exactly as you posted, but it throws an error and was curious if you've tested the steps on a clean kali system. I wrote a hello world file that just uses Console.WriteLine so it shouldn't need any reference passed in (which is why it isn't in the command line). Error shown is...
trying to use mono also has the same error
Was curious if you had tested this lately. Thanks for your help!