Module04Enumeration Flashcards
What is Enumeration?
In the enumeration phase, attacker creates active connections with system and performs directed queries to gain more information about the target
Attackers use the extracted information to identify points of system attack and perform password attacks to gain unauthorized access to information system resources
Enumeration techniques are conducted in an intranet environment
Where are Enumeration techniques are conducted ?
Enumeration techniques are conducted in an intranet environment
Information Enumerated by Intruders
- Network resources
- Network shares
- Routing tables
- Audit and service settings
- SNMP and FQDN details
- Machine names
- Users and groups
- Applications and banners
Techniques for Enumeration
Extract user names using email IDs
Extract information using default passwords
Brute force Active Directory
Extract information using DNS Zone Transfer
Extract user groups from Windows
Extract user names using SNMP
The features and functions of TCP
- ### Supports acknowledgement for receiving data through sliding window acknowledgement system
- ### Provides automatic retransmission of lost or acknowledged data
- ### Provides addressing and multiplexing data
- ### Capability to establish, manage, and terminate the connection
- ### Offers quality of service transmission
- ### Provides congestion management and flow control
TCP/UDP 53
DNS Zone Transfer
The DNS resolution process establishes communication between DNS clients and DNS servers. DNS clients send DNS messages to DNS servers listening on UDP port 53. In case, the DNS message size exceeds the default size of UDP (512 octets), the response contains only data that UDP can accommodate, and the DNS server sets a flag to indicate the truncated response. The DNS client can now resend the request via TCP over port 53 to the DNS server. In this approach, the DNS server uses UDP as a default protocol and in case of lengthy queries where UDP fails, uses TCP as a backup failover solution. Some malwares such as ADM worm, Bonk Trojan, etc. use port 53 to exploit vulnerabilities within DNS servers. This can help intruders to launch attacks.
TCP/UDP 135
Microsoft RPC Endpoint Mapper
RPC is a protocol used by a client system to request a service from the server. An end point is the protocol port on which the server listens for the client’s remote procedure calls. RPC end point mapper enables RPC clients to determine the port number currently assigned to a specific RPC service. There is a flaw in the part of RPC that exchanges messages over TCP/IP. Failure results due to the incorrect handling of malformed messages. This affects the RPC end point mapper that listens on TCP/IP port 135. This vulnerability could allow an attacker to send RPC messages to the RPC End point Mapper process on a server, in order to launch a Denial of Service (DoS) attack.
UDP137
NetBIOS Name Service (NBNS)
NBNS, also known as Windows Internet Name Service (WINS), provides name resolution service for computers running NetBIOS. NetBIOS Name Servers maintain a database of the NetBIOS names for hosts and the corresponding IP address, the host is using.
The job of NBNS is to match IP addresses with NetBIOS names and queries. Attackers usually attack the name service first. Typically, NBNS uses UDP 137 as its transport protocol. It can also use TCP 137 as its transport protocol for few operations, though this might never happen in practice.
TCP139
NetBIOS Session Service (SMB over NetBIOS)
This is perhaps the most well-known Windows port. It is used to transfer files over a network. Systems use this port for both NULL Session establishment and file and printer sharing. A system administrator considering restricting access to ports on a Windows system should make TCP 139 a top priority. An improperly configured TCP 139 port can allow an intruder to gain unauthorized access to critical system files or the complete file system, resulting in data theft or other malicious activities.
TCP/UDP 445
SMB over TCP (Direct Host)
Windows supports file and printer sharing traffic using the Server Message Block (SMB) protocol directly hosted on TCP. In earlier OSs, SMB traffic required the NetBIOS over TCP (NBT) protocol to work on a TCP/IP transport. Direct hosted SMB traffic uses port 445 (TCP and UDP) instead of NETBIOS.
UDP 161
Simple Network Management protocol (SNMP)
Simple Network Management Protocol (SNMP) is widely used in network management systems to monitor network attached devices such as routers, switches, firewalls, printers, servers, etc. It consists of a manager and agents. The agent receives requests on Port 161 from the managers, and responds to the managers on Port 162
TCP/UDP 389
Lightweight Directory Access Protocol (LDAP)
LDAP is a protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. By default, LDAP uses TCP or UDP as its transport protocol over port is 389.
TCP/UDP 3268
Global Catalog Service
Microsoft’s Global Catalog Server, a domain controller that stores extra information, uses port 3268; its database contains rows for every object in the entire organization instead of rows for only the objects in one domain. Global Catalog allows one to locate objects from any domain without having to know the domain name. LDAP in Global Catalog Server uses port 3268. This service listens to port 3268 through a TCP connection. Administrators use Port 3268 for troubleshooting issues in the Global Catalog by connecting to it using LDP.
TCP 25
Simple Mail Transfer Protocol (SMTP)
SMTP is a TCP/IP mail delivery protocol. It transfers email across the Internet and across the local network. It runs on the connection-oriented service provided by Transmission Control Protocol (TCP), and it uses well-known port number 25.
Commands used by SMTP and thier syntax
Hello === HELO
From => MAIL FROM:
Recipient => RCPT TO:
Data => DATA
Reset => RESET
Verify => VRFY
Expand => EXPN
Help => HELP[string]
Quit => QUIT
TCP/UDP 162
SNMP Trap
Simple Network Management Protocol Trap (SNMP Trap) uses TCP/UDP port 162 to receive notifications such as optional variable bindings, sysUpTime value, etc., from agent to manager.
UDP 500
ISAKMP/Internet Key Exchange (IKE)
Internet Security Association and Key Management Protocol (ISAKMP) / Internet Key Exchange (IKE) is the protocol used to set up a security association (SA) in the IPsec protocol suite. It uses UDP port 500 to establish, negotiate, modify and delete Security Associations (SA) and cryptographic keys in a VPN environment.
TCP/UDP 5060, 5061
Session Initiation Protocol (SIP)
Session Initiation Protocol (SIP) is a protocol used in the applications of Internet telephony for voice and video calls. It typically uses TCP/UDP port 5060 (non-encrypted signaling traffic) or 5061 (encrypted traffic with TLS) for SIP to servers and other end points.
What is NetBIOS Enumeration
NetBIOS name is a unique 16 ASCII character string used to identify the network devices over TCP/IP, 15 characters are used for the device name and the 16th character is reserved for the service or name record type
How to attackers use NetBIOS enumeration to obtain
- List of computers that belong to a domain
- List of shares on the individual hosts in the network
- Policies and passwords
How does NetBIOS Name List look like?
Is NetBIOS name resolution supported by IPv6 ?
NetBIOS name resolution is not supported by Microsoft for Internet Protocol Version 6 (IPv6)
What is Nbtstat utility do ?
- TCP/IP (NetBT) protocol statistics, NetBIOS name tables for both the local and remote computers, and the NetBIOS name cache
- Run nbtstat command “nbtstat.exe –c” to get the contents of the NetBIOS name cache, the table of NetBIOS names, and their resolved IP addresses
- Run nbtstat command “nbtstat.exe –a ” to get the NetBIOS name table of a remote computer
Which ports and protocols do NetBIOS Use ?
NetBIOS uses UDP port 137 (name services), UDP port 138 (datagram services), and TCP port 139 (session services).
What information is obtained by attackers using NetBIOS enumeration ?
- List of computers that belong to a domain
- List of shares on the individual hosts in the network
- Policies and passwords
NetBIOS General
to enumerate the NetBIOS names, the remote system must have enabled file and printer sharing. NetBIOS enumeration may enable an attacker to read or write to the remote computer system, depending on the availability of shares, or launch a DoS.
Nbstat example
nbtstat -c
Command to get the contents of the NetBIOS name cache, the table of NetBIOS names, and their resolved IP addresses
nbtstat.exe –c
Command to get the NetBIOS name table of a remote computer
nbtstat.exe –a