get-info.md
September 8, 2021 ยท View on GitHub
Module: get-info
Basic module to extract information from the database with easy output to a bash-flow workspace
There are a few things you can extract with this module:
- Users, computers and groups
- Group members
- Computers that a user is administrator to
- Computer to computer administrator rights
- ... and more!
Notes
users,comps,groups,das,dasessions,nolaps,unconst,npusers,kerb,kerb-la,passnotreq,owned,hvt, andowned-to-hvtsall return simple lists and take no inputsgroups-fullreturns all domain groups with their respective members in the formatgroup@domain.local - member_node_namegroup-membersreturns all AD objects that are members of the inputGROUPowned-groupsreturns a list of owned objects with a list of all groups they are a member of, nice for grepping and targetingdescreturns all objects configured with a description in the formatobjectname - description textadmincompsreturns computers that are configured with admin rights for another computer in the formatadmincomp.domain.local - victimcomp.domain.local. Useful for printspooler + relay attacksadmintoreturns a all computersUNAMEis local admin to. Useful for offline cred spraying & dumpsadminsofreturns a list of all the users that have administrative privileges toCOMPsessionsreturns a list of all computers that a user has a session onsidhistreturns a list of objects configured with SID History in the formatusername - sid - foreign domain - foreign object name (if found)foreignprivsreturns a list of all cross-domain privileges on the network in the formatobject1@domain1 - edgename - object2@domain2unsupportedreturns a list of all machines running unsupported operating systems, with the OS versionget-notereturns the notes of each object, typically used with theadd-notefunction in themark-*modulespathwill return the full shortest path between two input nodes,paths-allwill return all the shortest pathshvt-pathswill return all paths to HVTs originating from an input nodeowned-pathswill return all paths to HVTs originating from an input nodeowned-adminswill return all computers to which owned users are admins-lapply column labels as a header. All queries withget-infodo not return column headers (like "UserName","ComputerName","Description",etc) by default with the query-e/--enabledreturns only the enabled users from the applicable query (only working for--usersand--passnotreq)d/delimIs a flag where a new output delimeter can be set to separate outputs. Default isoutput1 - output2with the "-" being the changable delimeter. Doesn't apply to path outputs
Examples
python3 max.py get-info --users
USER1@DOMAIN.LOCAL
...
python3 max.py get-info --admincomps
COMPUTER1.DOMAIN.LOCAL - COMPUTER2.DOMAIN.LOCAL
...
python3 max.py get-info --foreignprivs -l
ObjectName - EdgeName - VictimObjectName
COMP1.DOMAIN1.LOCAL - EdgeName - COMP2.DOMAIN2.LOCAL
USER1@DOMAIN2.LOCAL - EdgeName - GROUP1@DOMAIN3.LOCAL
...
python3 max.py get-info --adminto USER@DOMAIN.LOCAL
COMP1.DOMAIN.LOCAL
COMP2.DOMAIN.LOCAL
...
python3 max.py get-info --desc
USER1@DOMAIN.LOCAL - This user is super cool
USER3@DOMAIN2.LOCAL - This user's password is Password1!
...
python3 max.py get-info --path "DOMAIN USERS@DOMAIN.LOCAL, DOMAIN ADMINS@DOMAIN.LOCAL"
DOMAIN USERS@DOMAIN.LOCAL - EdgeName -> Node2 .... -> DOMAIN ADMINS@DOMAIN.LOCAL
python3 max.py get-info --hvt-paths "ADMINISTRATOR@JRENET.COM"
ADMINISTRATOR@DOMAIN.LOCAL - MemberOf -> ENTERPRISE ADMINS@DOMAIN.LOCAL - GenericAll -> DOMAIN.LOCAL
ADMINISTRATOR@DOMAIN.LOCAL - MemberOf -> ADMINISTRATORS@DOMAIN.LOCAL - WriteDacl -> DOMAIN.LOCAL
ADMINISTRATOR@DOMAIN.LOCAL - MemberOf -> ADMINISTRATORS@DOMAIN.LOCAL - AllExtendedRights -> DOMAIN.LOCAL
ADMINISTRATOR@DOMAIN.LOCAL - MemberOf -> ADMINISTRATORS@DOMAIN.LOCAL - WriteOwner -> DOMAIN.LOCAL
python3 max.py get-info --owned-admins
COMP1.DOMAIN.LOCAL - AdministratedBy - USER1@DOMAIN.LOCAL
COMP2.DOMAIN.LOCAL - AdministratedBy - USER1@DOMAIN.LOCAL
COMP2.DOMAIN.LOCAL - AdministratedBy - USER2@DOMAIN.LOCAL
...