Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Windows Account Discovery Script #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions discovery_win_accounts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Name: Windows Account Discovery
# RTA: discovery_win_accounts.py
# ATT&CK: T1087
# Description: Account discovery commands via net and wmic

import common


def main():
common.log("Windows Account Discovery using net.exe and wmic")
commands = [
'net.exe group \"Domain Admins\" /domain',
'net.exe group \"Enterprise Admins\" /domain',
'net.exe user',
'net.exe user /domain',
'net.exe localgroup administrators',
'net.exe share',
'net.exe use',
'net.exe accounts',
'net.exe config workstation',
'wmic useraccount list /format:list',
'wmic ntdomain',
'wmic group list /format:list',
'wmic sysaccount list /format:list',
]

for cmd in commands:
common.execute(cmd)


common.log("Finished Enumerating Account Discovery", log_type="-")


if __name__ == "__main__":
exit(main())