Skip to content
This repository was archived by the owner on Jan 21, 2021. It is now read-only.
This repository was archived by the owner on Jan 21, 2021. It is now read-only.

Invoke-EnumerateLocalAdmin not working with groupnames other than "Administrators" #176

@hannestrunde

Description

@hannestrunde

When running Invoke-EnumerateLocalAdmin the script only enumerates groups named "Administrators". However, on a German Windows this group is named "Administratoren".

To get it working I just had to change Line 6231 in PowerView.ps1 in the master branch from $GroupName = 'Administrators', to $GroupName,. Then the begin section of the script (lines 6240 to 6247) will do it's magic and get the correct group name.

I wanted to initiate a pull request when i saw that the whole begin section was removed from the code in the dev branch (lines 6626 to 6633):
b4891eb

I tried the Invoke-EnumerateLocalAdmin script from the dev branch on my German Windows 7 machine because I thought maybe I was missing something but it obviously tried to enumerate the group "Administrators" again and that of course failed with:

WARNING: [!] Error: Exception calling "Invoke" with "2" argument(s): "Der Gruppenname konnte nicht gefunden werden.

which translates to:

WARNING: [!] Error: Exception calling "Invoke" with "2" argument(s): "The group name could not be found.

Is there a specific reason why the begin section to fetch the group name based on the security identifier was removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions