You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
693 B
25 lines
693 B
#include "../ptm_ctx/ptm_ctx.hpp"
|
|
|
|
// not sure how far back this goes but i think if you are
|
|
// on windows 10 you should be alright...
|
|
#define KTHREAD_PKPROCESS_OFFSET 0xB8
|
|
#define KPROCESS_DIRBASE_OFFSET 0x28
|
|
|
|
namespace hyperspace
|
|
{
|
|
class hyper_ctx
|
|
{
|
|
using virt_addr_t = std::uintptr_t;
|
|
using phys_addr_t = std::uintptr_t;
|
|
|
|
vdm::vdm_ctx* v_ctx;
|
|
ptm::ptm_ctx* target_ctx;
|
|
std::pair<virt_addr_t, phys_addr_t> hyperspace_context, orig_context;
|
|
PEPROCESS clone_peproc, orig_peproc;
|
|
|
|
public:
|
|
explicit hyper_ctx(ptm::ptm_ctx* target_ctx);
|
|
auto hyper_jmp(std::uint32_t tid = GetCurrentThreadId()) -> void;
|
|
auto hyper_ret(std::uint32_t tid = GetCurrentThreadId()) -> void;
|
|
};
|
|
} |