CEH v11 Moudle 4 – Enumeration
3 10 月, 2022
/
0x00 常用的port
- UDP 137 (NETBIOS Name SErvice)
- TCP 139 (NEtBIOS Session Service)(SNB over NetBIOS)
- UDP 161 (Simple Network Management Protocol, SNMP)
- TCP/UDP 162 SNMP Trap
- TCP/UDP 53 (DNS)
- TCP/UDP 135(Microsoft RPC )
- TCP/UDP 389 (LDAP)
- TCP 2049 (NFS)
- TCP 25 (SMTP)
- (TCP/UDP 445) SMB over TCP
- SNMP Ttap TCP/UDP 162
- ISAKMP/Internet Key Exchange (IKE) UDP 500
- SSH TCP 22
0x01 Enumeration Concepts (枚舉)
- Get user names using email IDs
- Get information using default passwords
- Get user names using SNMP
- Brute force AD
- Get user groups from Windows
- Get information using DNS zone transfers
- NetBios, LDAP, NTP, DNS
0x02 SNMP Enumeration
- nmap 指令:
nmap -sU -p 161 <Target IP Address> - auxiliary/scanner/snmp/snmp_enum
- 指令:
snmp-check <Target IP Address>
- 指令:
snmp-check- GUI
- Engineer’s Toolset
- SNMPScanner
- OpUtils 5
- SNScan
- Management Information Base (MIB)
- MIB 是一個虛擬數據庫,其中包含 SNMP 管理的所有網絡對象的正式描述。MIB elements are recognized using object identifiers (OIDs)
- DHCP.MIB
- HOSTMIB.MIB:監控和管理主機資源
- LNMIB2.MIB:包含工作站和服務器服務的對像類型
- MIB_II.MIB:使用簡單的架構和系統管理基於 TCP/IP 的 Internet
- WINS.MIB:用於 Windows Internet 名稱服務 (WINS)
- MIB 是一個虛擬數據庫,其中包含 SNMP 管理的所有網絡對象的正式描述。MIB elements are recognized using object identifiers (OIDs)
- 其他工具
- snmpcheck
- softperfect network Scanner
- Network Performance Monitor
- OpUtils
- PRTG Network Monitor
- Enginner’s Toolset
0x03 Windows System Basics
- Security Context – 用戶的身分與認證資訊
- Security Identifier (SID) – 識別使用者、群組和帳戶
- Resource Identifier (RID) – 標示SID帳戶的權限
- USER NUMBER
- SID 最後面為使用者號碼
- Example SID: S-1-5-21-3874928736-367528774-1298337465**-500**
- Administrator Account – SID of 500
- Regular Accounts – start with a SID of 1000
- Linux Systems used user IDs (UID) and group IDs (GID). Found in /etc/passwd
- SAM Database
- file where all local passwords are stored (encrypted) (所有密碼)
- Stored in C:\Windows\System32\Config
- Linux Enumeration Commands in PowerShell or CmdPrompt
- finger – 使用者和電腦的資訊
- rpcclient – info on RPC in the environment
- showmount – 顯示所有的shared directories
- Look for share resources (NetBIOS)
- net view \sysName
- net view \sysName
- Windows SysInternals
0x04 NetBIOS Enumeration
- 指令 :
nmap -O <target> - UDP port 137 or TCP port 138/139
- nbtstat displays protocol statistics and current TCP/IP connections using NetBIOS over TCP/IP.
- nbtstat gives your own info
- 指令 :
nbtstat -a- list the remote machine’s name table given its name
- (介面卡狀態) 列出指定其名稱的遠端電腦名稱表格
- 指令 :
nbtstat -A- list the remote machine’s name table given its IP address
- (介面卡狀態) 列出指定其 IP 位址的遠端電腦名稱表格。
- 指令 :
nbtstat -n- gives local table
- (名稱) 列出本機 NetBIOS 名稱
- 指令 :
nbtstat -c- gives cache information
- (快取) 列出 NBT 快取的遠端電腦名稱和它們的 IP 位址。
0x05 Linux System Basics
- Enum4linux
- tool for enumerating information from Windows and Samba systems
- 指令 :
enum4linux -u CEH -p Pa55w0rd -U 10.0.2.23-uUsername,-pPassword,-Uusers information
- finger
- who is currently logged in, when and where.
- w
- 顯示誰登錄
- 顯示他們正在做麼。
0x06 NTP Enumeration
- Runs on TCP ports 389 and 636 (over SSL)
- nmap指令 :
sudo nmap -sT -O <target IP address> - Tools for Enumeration LDAP:
- Softerra
- JXplorer
- Lex
- LDAP Admin Tool
- Active Directory Explorer
- Softerra LDAP Administrator
0x07 NTP Enumeration
- Runs on UDP 123
- 指令 :
nmap -sU -pU:123 -Pn -n --script=ntp-monlist <target> - 駭客透過NTP取得list of connected hosts
- client IP(含system name 、OS)
- 如果 NTP 服務器位於非軍事區 (DMZ)還可以拿到內部IP
0x08 SMTP Enumeration
- SMTP: TCP 25 –> [outbound email]
- IMAP: TCP 143 / 993(over SSL) –> [inbound email]
- POP3: TCP 110 / 995(over SSL) –> [inbound email]
- 指令:
nmap -p25 --script smtp-commands <target IP>
0x09 NFS Enumeration
- 透過 Rpcinfo -p <target IP> 列舉出來
0x10 SMTP Enumeration
- 郵件系統通常使用帶有 POP3 和 IMAP 的 SMTP它在 TCP PORT 25或 587 上運行。
- SMTP 提供以下三個內置命令。
- VRFY-Validates users驗證使用者
- EXPN-查詢別名對應的email
- RCPT TO-定義消息的接收者
- 工具
- NetScanTools Pro
- smtp-user-enum
- 用戶名猜測工具主要用於針對默認的 Solaris SMTP 服務。可以使用 EXPN、VRFY 或 RCPT TO。
0x11 DNS Enumeration
- 工具
- dig
- nslookup
- DNSRecon
0x12 VoIP Enumeration
- VOIP使用Session Initiation Protocol(SIP)來啟用影音傳輸
- SIP通常使用UDP/TCP2000 2001 5050 5061
- 可透過這些資訊來取得VOIP的getway或是server、IP-PEX等等資訊,進而執行DOS、session hijacking、Caller ID Spoofing、 eavesdropping(竊聽) 等
0x13 IPV6 Enumeration
- Enyx
- IPv6 Hackit
0x14 BGP Enumeration
- TCP 175
- The Border Gateway Protocol 邊界網關協議 (BGP) 是一種路由協議,用於在 Internet 上的不同自治系統 (AS) (自治系統) 之間交換路由和可達性信息。
- 由於該協議用於將一個 AS 連接到其他 AS,因此也稱為外部 BGP(eBGP)。
- BGP 在port 179 上創建其 TCP 會話。攻擊或是BGP設定錯誤都會導致網路癱瘓,例如當年的FaceBook設定錯誤癱瘓了6小時,還有對岸的長城也是透過這個來審查哪些網站連不上