-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DotNetToJScript-based Launchers Don't Work on Some Versions of Windows 10 / Windows Server 2016 #28
Comments
I've added this note to the Wiki: I've also added a note to the launcher descriptions for each of the DotNetToJScript-based payloads to make this more obvious. I'm not 100% sure why this is the case, but I have a few theories. If anyone has a solution to this, I am open to a PR, but I likely will just keep the launchers for use in other scenarios. Keeping this open for now, but may eventually close. |
I was having the same issue on Windows 7 SP1 and Windows 10 RS3 build 16299.15 Using this FrontBinaryFormattedDelegate, EndBinaryFormattedDelegate pair in Models/Launchers/Launcher.cs made it work for me: Values were obtained from running dotnettojscript (without the -n option) on an assembly of size 10752 bytes. Note: |
Still seeing similar behavior for both windows 7 and windows 10 with defender disabled. This does not appear to be a AMSI issue. It seems more like a .nettojscript or compilation problem. I manually compiled the grunt csharp code using CSC on windows 10 and then used .nettojscript to generate the base64 encoded assembly and copied and pasted the b64 string into the JS file created by covenant. This worked on win10 without defender enabled, but was detected by AMSI with defender enabled. The .nettojscript launchers created on the Linux side do not appear to be compiling as expected. Payload creation: Ubuntu16.04 LTS w/ dotnet core installed |
We are having the same issue on Windows 7 targets. It is definitely not a Windows 10 only problem. |
I can't get the script generated by Covenant to work, but I can create the DotNetToJScript payload myself and get it to work on a Windows 10 Pro box. I found that the DotNetVersion HAS TO BE SET to Net35 (this exact same process doesn't work for Net40, the Stager will never get beyond a status of "Stage2").
|
Hello.
After the upgrade, the launch of the payload error appears (mshta, Regsvr32).
An error has occurred in the script on htis page.
Line: 229
Char: 1
Error: Binary stream '90' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization
Code: 0
The text was updated successfully, but these errors were encountered: