SelfDeletionBOF
October 3, 2021 ยท View on GitHub
BOF implementation of the research by @jonasLyk and the drafted PoC from @LloydLabs
Why?
I didn't see that it currently existed (via the Community Kit) at the time of authorship.
How do I run this?
- In this case, you have two options:
- Use the existing, compiled object file, located in the
distdirectory (AKA proceed to major step two) - Compile from source via the
Makefilecd srcmake cleanmake
- Use the existing, compiled object file, located in the
- Load the
Aggressorfile, in theScript Manager, located in thedistdirectory - Within a provided
Beacon,beacon> self_delete
Any known downsides?
- We're still using the
Win32API andDynamic Function Resolution. This is for you to determine as far as "risk".- Most of these calls can be replaced with
NtorZwequivalents, which most (if not all) relevant stubs have been generated for you in thesyscalls.hheader file.- I may replace these with the aforementioned at a later point, but as it stands, I just wanted this up and "out there" for people first and foremost.
- As it stands, there is one
64-bitcall toNtClose, if you wish, you may just create theDynamic Function Resolutionprototype inwin32_api.hforCloseHandle.
- Most of these calls can be replaced with