Documentation
¶
Index ¶
- Constants
- func ADsMem(shellcode []byte) error
- func AllocMemory(shellcode []byte) (uintptr, error)
- func CreateProcessWithPipe(shellcode []byte, program string) error
- func CreateRemoteThread(shellcode []byte, pid int) error
- func CreateRemoteThreadHalos(shellcode []byte) error
- func CreateThread(shellcode []byte) error
- func Direct(shellcode []byte)
- func EarlyBird(shellcode []byte, path string) error
- func EnumChildWindowsX(sc []byte) error
- func EnumDesktopWindowsX(sc []byte) error
- func EnumPageFilesWX(sc []byte) error
- func EnumSystemLocalesAX(sc []byte) error
- func EnumSystemLocalesExX(shellcode []byte) error
- func EnumSystemLocalesHalos(shellcode []byte) error
- func EnumThreadWindowsX(sc []byte) error
- func EnumTimeFormatsAX(sc []byte) error
- func EnumWindowsX(sc []byte) error
- func EnumerateLoadedModulesX(sc []byte) error
- func EtwpCreateEtwThreadX(shellcode []byte) error
- func Fiber(shellcode []byte) error
- func HalosGate(shellcode []byte) error
- func Ipv4AddressA(shellcode []string)
- func MacAddressA(shellcode []string)
- func NoRwx(shellcode []byte, path string) error
- func NtQueueApcThreadEx(shellcode []byte) error
- func ProcessHollowing(sc []byte, program string) error
- func Run(sc []byte, callback func(uintptr) error) error
- func SPFGate(sc []byte) error
- func Sha256(data []byte) []byte
- func Sha256Hex(s string) string
- func ShellcodeToUUID(shellcode []byte) ([]string, error)
- func StaneAlone(shellcode []byte)
- func UUIDFromString(shellcode []byte) error
- type ProcessHollower
- func (ph *ProcessHollower) AllocateMemory() (uintptr, error)
- func (ph *ProcessHollower) ChangeMemoryProtection(addr uintptr) error
- func (ph *ProcessHollower) Cleanup()
- func (ph *ProcessHollower) CreateProcess() error
- func (ph *ProcessHollower) CreateTrampoline(shellcodeAddr uintptr) ([]byte, error)
- func (ph *ProcessHollower) Execute() error
- func (ph *ProcessHollower) GetPEBAddress() error
- func (ph *ProcessHollower) ReadImageBaseFromPEB() error
- func (ph *ProcessHollower) ReadImageHeaders() (uintptr, error)
- func (ph *ProcessHollower) ResumeProcess() error
- func (ph *ProcessHollower) WriteShellcode(addr uintptr) error
- func (ph *ProcessHollower) WriteTrampoline(entryPoint uintptr, trampoline []byte) error
- type SysID
Constants ¶
const ( NAM = "NtAllocateVirtualMemory" NPM = "NtProtectVirtualMemory" NCT = "NtCreateThreadEx" )
const ( Kernel32 = "kernel32.dll" NtCreateThreadEx = "NtCreateThreadEx" NtProtectVirtualMemory = "NtProtectVirtualMemory" NtAllocateVirtualMemory = "NtAllocateVirtualMemory" WaitForSingleObject = "WaitForSingleObject" WriteProcessMemory = "WriteProcessMemory" )
Variables ¶
This section is empty.
Functions ¶
func AllocMemory ¶
func CreateProcessWithPipe ¶
func CreateRemoteThread ¶
func CreateRemoteThreadHalos ¶
func CreateThread ¶
func EnumChildWindowsX ¶
EnumChildWindowsX C++ EnumChildWindows(NULL, (WNDENUMPROC)addr, 0);
func EnumDesktopWindowsX ¶
EnumDesktopWindowsX C++ EnumDesktopWindows(NULL,(WNDENUMPROC)addr, 0);
func EnumPageFilesWX ¶
func EnumSystemLocalesAX ¶
EnumSystemLocalesAX C++ EnumSystemLocalesA((LOCALE_ENUMPROCA)addr, 0);
func EnumSystemLocalesExX ¶
func EnumSystemLocalesHalos ¶
EnumSystemLocalesHalos Hell's Gate + Halo's Gate technique
func EnumThreadWindowsX ¶
EnumThreadWindowsX C++ EnumThreadWindows(0, (WNDENUMPROC)addr, 0);
func EnumTimeFormatsAX ¶
EnumTimeFormatsAX C++ EnumTimeFormatsA((TIMEFMT_ENUMPROCA)addr, 0, 0);
func EnumWindowsX ¶
EnumWindowsX C++ EnumWindows((WNDENUMPROC)addr, 0);
func EnumerateLoadedModulesX ¶
func EtwpCreateEtwThreadX ¶
func Ipv4AddressA ¶
func Ipv4AddressA(shellcode []string)
func MacAddressA ¶
func MacAddressA(shellcode []string)
func NtQueueApcThreadEx ¶
func ProcessHollowing ¶
func ShellcodeToUUID ¶
ShellcodeToUUID takes in sc bytes, pads it to 16 bytes, breaks them into 16 byte chunks (size of a UUID), converts the first eight bytes into Little Endian format, creates a UUID from the bytes, and returns an array of UUIDs
func StaneAlone ¶
func StaneAlone(shellcode []byte)
func UUIDFromString ¶
Types ¶
type ProcessHollower ¶
type ProcessHollower struct {
// contains filtered or unexported fields
}
ProcessHollower 进程镂空结构体
func NewProcessHollower ¶
func NewProcessHollower(shellcode []byte, program string) *ProcessHollower
NewProcessHollower 创建新的进程镂空实例
func (*ProcessHollower) AllocateMemory ¶
func (ph *ProcessHollower) AllocateMemory() (uintptr, error)
AllocateMemory 在目标进程中分配内存
func (*ProcessHollower) ChangeMemoryProtection ¶
func (ph *ProcessHollower) ChangeMemoryProtection(addr uintptr) error
ChangeMemoryProtection 修改内存保护属性
func (*ProcessHollower) CreateProcess ¶
func (ph *ProcessHollower) CreateProcess() error
CreateProcess 创建挂起的进程
func (*ProcessHollower) CreateTrampoline ¶
func (ph *ProcessHollower) CreateTrampoline(shellcodeAddr uintptr) ([]byte, error)
CreateTrampoline 创建跳转代码
func (*ProcessHollower) GetPEBAddress ¶
func (ph *ProcessHollower) GetPEBAddress() error
GetPEBAddress 获取PEB地址
func (*ProcessHollower) ReadImageBaseFromPEB ¶
func (ph *ProcessHollower) ReadImageBaseFromPEB() error
ReadImageBaseFromPEB 从PEB中读取镜像基地址
func (*ProcessHollower) ReadImageHeaders ¶
func (ph *ProcessHollower) ReadImageHeaders() (uintptr, error)
ReadImageHeaders 读取镜像头信息
func (*ProcessHollower) ResumeProcess ¶
func (ph *ProcessHollower) ResumeProcess() error
ResumeProcess 恢复进程执行
func (*ProcessHollower) WriteShellcode ¶
func (ph *ProcessHollower) WriteShellcode(addr uintptr) error
WriteShellcode 将shellcode写入目标进程
func (*ProcessHollower) WriteTrampoline ¶
func (ph *ProcessHollower) WriteTrampoline(entryPoint uintptr, trampoline []byte) error
WriteTrampoline 将跳转代码写入入口点