Skip to content

feat: add --early-bird APC injection technique - #11

Merged
incendiary merged 1 commit into
masterfrom
feat/early-bird-apc
May 19, 2026
Merged

feat: add --early-bird APC injection technique#11
incendiary merged 1 commit into
masterfrom
feat/early-bird-apc

Conversation

@incendiary

Copy link
Copy Markdown
Owner

Summary

  • Adds --early-bird as a third injection path alongside --nt (NtQueueApcThread) and the default (QueueUserAPC)
  • Early Bird queues shellcode into a CREATE_SUSPENDED process before its primary thread executes any user-mode code; the APC fires on ResumeThread, ahead of the entry point and ahead of in-process hooks loaded during DLL initialisation
  • Usage string updated to document all three flags
  • 5 new tests; total 16 (up from 11), all passing

Technique summary

Flag API Alertable state required? When APC fires
(none) QueueUserAPC Yes When target thread enters alertable wait
--nt NtQueueApcThread No Immediately (NTDLL bypasses the check)
--early-bird QueueUserAPC Inherent on new thread On ResumeThread, before entry point

Test plan

  • dotnet test — 16/16 pass locally
  • CI matrix (Debug + Release, Windows) via GHA

🤖 Generated with Claude Code

Adds a third injection path alongside the existing QueueUserAPC default
and the --nt (NtQueueApcThread) variant.

Early Bird APC queues shellcode into a CREATE_SUSPENDED process before
its primary thread has executed any user-mode code.  A newly created
suspended thread begins in an alertable state, so QueueUserAPC fires
immediately on ResumeThread -- ahead of the process entry point and
therefore ahead of any in-process defensive hooks loaded via the normal
DLL initialisation sequence.

- Program.cs: ParseUseEarlyBird(), explicit --early-bird branch in Main
  with technique commentary; usage string updated
- ProgramTests.cs: 5 new tests (parse flag, case-insensitive, URL skip,
  mutual exclusion with --nt)
- Total tests: 16 (up from 11)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@incendiary
incendiary merged commit 8444d2e into master May 19, 2026
8 checks passed
@incendiary
incendiary deleted the feat/early-bird-apc branch May 19, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant