Skip to content

Memory leak and missing privilege in Privilege check module. #7

@JohnLaTwC

Description

@JohnLaTwC

Issue 1

Memory leak due to missing call to Marshal.FreeHGlobal for TokenInformation.

IntPtr TokenInformation = Marshal.AllocHGlobal(TokenInfLength);

Issue 2

I also think you should add SeManageVolumePrivilege to the specialPrivileges list.

See (https://twitter.com/0gtweet/status/1303427935647531018)

                var specialPrivileges = new List<string>()
            {
                "SeSecurityPrivilege",
                "SeTakeOwnershipPrivilege",
                "SeLoadDriverPrivilege",
                "SeBackupPrivilege",
                "SeRestorePrivilege",
                "SeDebugPrivilege",
                "SeSystemEnvironmentPrivilege",
                "SeImpersonatePrivilege",
+                "SeManageVolumePrivilege",
                "SeTcbPrivilege"
            };

var specialPrivileges = new List<string>()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions