Commands to identify domains/work groups and memberships within the network, from outside a windows computer?
Commands to identify domains/work groups and memberships within the network, with access to windows cmd or powershell?
CMD
net users %username% #Me
net users #All local users
net localgroup #Groups
net localgroup Administrators #Who is inside Administrators group
whoami /all #Check the privileges
PS
Get -WmiObject -Class Win32_UserAccount
Get -LocalUser | ft Name, Enabled, LastLogon
Get -ChildItem C:\Users -Force | select Name
Get -LocalGroupMember Administrators | ft Name, PrincipalSource
Command to show scans and domain controller names from nmap?
net View
Commands to browse list of available shared network resources collected and distributed by the computer browser service on a Microsoft network?
net share
net view
net view \<computer_name> /All</computer_name>
Command to identify and analyse accessible SMB shares?
net share
enum4linux <target_ip>
smbclient -L \\\<target_ip></target_ip></target_ip>
smbclients option L lists shares
Remove L option to connect
Try anonymous login, if not, use other credentials.
Identifying user accounts on target systems
and domains using NetBIOS
nbtscan <target_ip>
nmap -sV 172.16.1.102 --script nbstat.nse -v</target_ip>
Identifying user accounts on target systems
and domains using SNMP
snmpwalk -c public -vl -t <target_ip>
nmap --script "snmp * and not snmp-brute" <target_ip></target_ip></target_ip>
Identifying user accounts on target systems
and domains using LDAP
nmap -n -sV –script “ldap * and not brute” <target_ip>
ldapsearch -x -h <IP> -D '<DOMAIN>\<username>' -w <passwords>' -b "DC=<1_SUBDOMAIN></passwords></username></DOMAIN></IP></target_ip>
3 AD roles?
What is Global Catalogue?
Handles AD queries and logon
What is Domain Master Browser?
What is Flexible Single Master Operations (FSMO)?
5 FSMO roles?
What is Schema Master?
Manages read-write copy of AD schema
The AD schema defines attributes that you can apply to objects in AD database.
What is Domain Naming Master?
Ensures you don’t have domains with same names in the same forest.
Master of domain names.
Since domains aren’t created often, this role is likely to live on same DC with another role.