Skip to content

Conversation

@rthxr
Copy link

@rthxr rthxr commented Feb 28, 2024

A functionality for extracting user tokens; For impersonation and other techniques

OpenProcessToken(hprocess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
GetTokenInformation(hToken, TokenIntegrityLevel, NULL, 0, &cbSize);

PTOKEN_MANDATORY_LABEL pTIL = (PTOKEN_MANDATORY_LABEL)LocalAlloc(0, cbSize);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is pTIL leaking in the heap if not cleared with LocalFree?


if(integrity_level < SECURITY_MANDATORY_HIGH_RID)
{
printf("Low privilege error!!1!\n");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relatively new to malware development, instead of cut access to the program, isn't it possible to escalate privilege through a child process ?

If the integrity_level < SECURITY_MANDATORY_HIGH_RID then
program attempt with a UAC Bypass to overload a existing kernel driver with a valid signature.
Then rexecute itself from the driver to escalate privileges?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants