Skip to content

Instantly share code, notes, and snippets.

@med0x2e
Last active September 18, 2021 19:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save med0x2e/a0e204c79808da841c809d6464b12094 to your computer and use it in GitHub Desktop.
Save med0x2e/a0e204c79808da841c809d6464b12094 to your computer and use it in GitHub Desktop.
Steps to run GadgetToJScript on linux (wine)
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
@med0x2e
Copy link
Author

med0x2e commented Apr 16, 2021

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