Skip to content

Commit

Permalink
Update SeAuditPrivilegePoC.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
daem0nc0re authored Jul 4, 2022
1 parent 8e7ec49 commit 7acf391
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static extern int NtEnumerateSystemEnvironmentValuesEx(
const int ERROR_OBJECT_ALREADY_EXISTS = 5010;

/*
* P/Invoke : User defined functions
* User defined functions
*/
static bool AddTestSecurityEvent(int eventId, int numEvents)
{
Expand All @@ -172,7 +172,6 @@ static bool AddTestSecurityEvent(int eventId, int numEvents)
int count = 0;
string sourceName = "PrivFu";
string fileName = "FakeEvent";
bool success = false;
var Registration = new AUTHZ_SOURCE_SCHEMA_REGISTRATION
{
dwFlags = (uint)AUTHZ_REGISTRATION_FLAGS.AUTHZ_ALLOW_MULTIPLE_SOURCE_INSTANCES,
Expand Down Expand Up @@ -259,14 +258,13 @@ static bool AddTestSecurityEvent(int eventId, int numEvents)
}
else
{
success = true;
count++;
}
}

Console.WriteLine("[*] Done. {0} event(s) are created.", count);

return success;
return (count > 0);
}


Expand Down

0 comments on commit 7acf391

Please sign in to comment.