Network Protocols Reference
A comprehensive reference for network protocols commonly encountered in security testing, network analysis, and system administration.
When to Use This Skill
Use this skill when you need to:
- Understand how a specific network protocol works
- Identify which protocols are running on a network during reconnaissance
- Analyze service discovery mechanisms (mDNS, DNS-SD, SSDP, WSD)
- Understand authentication and directory protocols (OAuth 2.0, RADIUS, LDAP, AD)
- Explain protocol behavior for security assessments
- Troubleshoot network connectivity issues related to specific protocols
Service Discovery Protocols
Multicast DNS (mDNS)
Purpose: IP address resolution within small, local networks without a dedicated name server.
How it works:
- Multicasts a query within the subnet
- Host with the specified name responds with its IP address
- All devices in the subnet update their mDNS caches
Key characteristics:
- Domain suffix:
.local only
- Port: UDP 5353
- IPv4 multicast:
224.0.0.251
- IPv6 multicast:
ff02::fb
- Ethernet MAC (IPv4):
01:00:5E:00:00:FB
- Ethernet MAC (IPv6):
33:33:00:00:00:FB
- Scope: Confined to local network, does not cross routers
Special behavior:
- Domain Name Relinquishment: Host releases domain name by sending packet with TTL of zero
- Conflict handling: Conflicts with non-mDNS hosts in
.local domain require network configuration adjustments
Security testing considerations:
- mDNS traffic is visible to all devices on the subnet
- Can reveal hostnames and IP addresses of devices
- Useful for network reconnaissance in local environments
DNS-SD (DNS Service Discovery)
Purpose: Discovering services on a network by querying specific domain names.
How it works:
- Queries specific service type domains (e.g.,
_printers._tcp.local)
- Response includes all related domains and available services
Common service types:
_printers._tcp.local - Printers
_http._tcp.local - Web services
_ssh._tcp.local - SSH services
_smb._tcp.local - SMB file sharing
Security testing considerations:
- Reveals available services on the network
- Can enumerate service types without direct probing
- Often used in conjunction with mDNS
SSDP (Simple Service Discovery Protocol)
Purpose: Discovery of network services, primarily used by UPnP.
How it works:
- Text-based protocol using UDP
- Uses multicast addressing
- Built on HTTPU (HTTP over UDP)
Key characteristics:
- Port: UDP 1900
- IPv4 multicast:
239.255.255.250
- Protocol foundation: HTTPU (HTTP over UDP)
Security testing considerations:
- UPnP devices often have security vulnerabilities
- SSDP can reveal device types and capabilities
- Common target for network reconnaissance
- Can be used to discover IoT devices
Web Service for Devices (WSD)
Purpose: Identify available services on a network (e.g., printers).
How it works:
- Devices broadcast UDP packets
- Service seekers send requests
- Service providers announce their offerings
Security testing considerations:
- Can enumerate network services
- Often used in enterprise environments
- May reveal sensitive service information
Authentication and Authorization Protocols
OAuth 2.0
Purpose: Secure, selective sharing of user information between services.
How it works:
- User authenticates with authorization server
- User grants authorization to the client service
- Authorization server generates access token
- Client service uses token to access specified user data
Common use cases:
- "Sign in with Google" / "Sign in with Facebook"
- API access delegation
- Third-party service integration
Security testing considerations:
- Token handling and storage
- Scope validation
- Authorization code flow security
- Token expiration and refresh mechanisms
RADIUS (Remote Authentication Dial-In User Service)
Purpose: Network access protocol for authentication, authorization, and accounting.
How it works:
- User credentials verified by RADIUS server
- May include network address verification
- Post-authentication: network access granted
- Session details tracked for billing and statistics
Key characteristics:
- Primary users: ISPs, enterprise networks
- Functions: AAA (Authentication, Authorization, Accounting)
- Common ports: UDP 1812 (authentication), UDP 1813 (accounting)
Security testing considerations:
- Credential handling
- Shared secret security
- Accounting data integrity
- Replay attack prevention
File Sharing and Session Protocols
SMB (Server Message Block)
Purpose: Sharing files, printers, and ports.
How it works:
- Operates directly over TCP or via NetBIOS over TCP
- Dual compatibility enhances connectivity with various devices
Key characteristics:
- Direct TCP: Port 445
- NetBIOS over TCP: Ports 137, 138
- Common in: Windows environments, file servers
Security testing considerations:
- SMBv1 is deprecated and vulnerable
- Common target for lateral movement
- Check for SMB signing enforcement
- Enumerate shares and permissions
NetBIOS (Network Basic Input/Output System)
Purpose: Manages network sessions and connections for resource sharing.
How it works:
- Supports unique names for devices
- Supports group names for multiple devices
- Enables targeted or broadcast messaging
- Communication modes: connectionless (no acknowledgment) or connection-oriented (session-based)
Key characteristics:
- Traditional protocols: IPC/IPX
- Common usage: TCP/IP
- Associated protocol: NetBEUI (fast but verbose due to broadcasting)
Security testing considerations:
- NetBIOS name enumeration
- Can reveal system names and user information
- Often disabled in modern security configurations
Directory and Identity Protocols
LDAP (Lightweight Directory Access Protocol)
Purpose: Management and access of directory information over TCP/IP.
How it works:
- Supports various operations for querying and modifying directory information
- Interacts with databases designed for LDAP communication
Key characteristics:
- Primary use: Distributed directory information services
- Common ports: TCP 389 (unencrypted), TCP 636 (LDAPS)
- Operations: Search, modify, add, delete directory entries
Security testing considerations:
- Anonymous bind vulnerabilities
- LDAP injection attacks
- Information disclosure through enumeration
- Certificate validation for LDAPS
Active Directory (AD)
Purpose: Network-accessible database for centralized management of network entities.
How it works:
- Contains objects: users, groups, privileges, resources
- Hierarchical structure of domains
- Subdomains allow further segmentation
- Each subdomain may maintain its own server and user base
Key characteristics:
- Centralized management: User access to network resources
- Query capabilities: Retrieve contact details, locate resources
- Structure: Domains, subdomains, organizational units
Security testing considerations:
- Kerberos authentication security
- Group Policy Object (GPO) analysis
- Privilege escalation paths
- Lateral movement opportunities
- Password policy enforcement
Protocol Quick Reference Table
| Protocol |
Primary Port(s) |
Transport |
Purpose |
| mDNS |
UDP 5353 |
UDP |
Local name resolution |
| DNS-SD |
UDP 5353 |
UDP |
Service discovery |
| SSDP |
UDP 1900 |
UDP |
UPnP service discovery |
| WSD |
UDP (varies) |
UDP |
Device service discovery |
| RADIUS |
UDP 1812/1813 |
UDP |
AAA for network access |
| SMB |
TCP 445 |
TCP |
File/print sharing |
| NetBIOS |
TCP 137-139 |
TCP |
Session management |
| LDAP |
TCP 389/636 |
TCP |
Directory services |
| OAuth 2.0 |
TCP 443 |
TCP/HTTPS |
Authorization |
Common Security Testing Scenarios
Network Reconnaissance
- mDNS enumeration: Scan for
.local hosts on the subnet
- SSDP discovery: Query
239.255.255.250:1900 for UPnP devices
- SMB enumeration: Check ports 445, 137-139 for file shares
- LDAP enumeration: Query port 389 for directory information
Service Discovery Analysis
- DNS-SD queries: Request specific service types to enumerate services
- WSD monitoring: Capture broadcast packets for service announcements
- Protocol fingerprinting: Identify services by their protocol behavior
Authentication Testing
- RADIUS testing: Verify authentication flow and accounting
- OAuth 2.0 validation: Test token handling and scope enforcement
- AD security: Assess Kerberos and LDAP security configurations
Troubleshooting Tips
- mDNS not working: Check firewall rules for UDP 5353, verify
.local domain configuration
- SSDP discovery failing: Ensure UDP 1900 is open, check multicast routing
- SMB connectivity issues: Verify ports 445 or 137-139, check NetBIOS configuration
- LDAP queries failing: Check port 389/636, verify bind credentials and permissions
- AD authentication problems: Verify Kerberos configuration, check time synchronization
Best Practices
- Disable unnecessary protocols: Turn off NetBIOS, SMBv1, and other legacy protocols when not needed
- Use encrypted variants: Prefer LDAPS over LDAP, SMB signing enabled
- Segment networks: Isolate service discovery traffic to appropriate VLANs
- Monitor protocol traffic: Watch for unusual mDNS, SSDP, or LDAP activity
- Keep services updated: Regularly patch SMB, LDAP, and other protocol implementations
1---2name: network-protocols-reference3description: Network protocol reference for security testing, network analysis, and troubleshooting. Use this skill whenever the user asks about network protocols, service discovery mechanisms, authentication protocols, or needs to understand how protocols like mDNS, DNS-SD, SSDP, WSD, OAuth 2.0, RADIUS, SMB, NetBIOS, LDAP, or Active Directory work. Trigger for protocol enumeration, network reconnaissance, service discovery analysis, or when explaining protocol behavior in security contexts.4---56# Network Protocols Reference78A comprehensive reference for network protocols commonly encountered in security testing, network analysis, and system administration.910## When to Use This Skill1112Use this skill when you need to:13- Understand how a specific network protocol works14- Identify which protocols are running on a network during reconnaissance15- Analyze service discovery mechanisms (mDNS, DNS-SD, SSDP, WSD)16- Understand authentication and directory protocols (OAuth 2.0, RADIUS, LDAP, AD)17- Explain protocol behavior for security assessments18- Troubleshoot network connectivity issues related to specific protocols1920## Service Discovery Protocols2122### Multicast DNS (mDNS)2324**Purpose**: IP address resolution within small, local networks without a dedicated name server.2526**How it works**:27- Multicasts a query within the subnet28- Host with the specified name responds with its IP address29- All devices in the subnet update their mDNS caches3031**Key characteristics**:32- **Domain suffix**: `.local` only33- **Port**: UDP 535334- **IPv4 multicast**: `224.0.0.251`35- **IPv6 multicast**: `ff02::fb`36- **Ethernet MAC (IPv4)**: `01:00:5E:00:00:FB`37- **Ethernet MAC (IPv6)**: `33:33:00:00:00:FB`38- **Scope**: Confined to local network, does not cross routers3940**Special behavior**:41- **Domain Name Relinquishment**: Host releases domain name by sending packet with TTL of zero42- **Conflict handling**: Conflicts with non-mDNS hosts in `.local` domain require network configuration adjustments4344**Security testing considerations**:45- mDNS traffic is visible to all devices on the subnet46- Can reveal hostnames and IP addresses of devices47- Useful for network reconnaissance in local environments4849### DNS-SD (DNS Service Discovery)5051**Purpose**: Discovering services on a network by querying specific domain names.5253**How it works**:54- Queries specific service type domains (e.g., `_printers._tcp.local`)55- Response includes all related domains and available services5657**Common service types**:58- `_printers._tcp.local` - Printers59- `_http._tcp.local` - Web services60- `_ssh._tcp.local` - SSH services61- `_smb._tcp.local` - SMB file sharing6263**Security testing considerations**:64- Reveals available services on the network65- Can enumerate service types without direct probing66- Often used in conjunction with mDNS6768### SSDP (Simple Service Discovery Protocol)6970**Purpose**: Discovery of network services, primarily used by UPnP.7172**How it works**:73- Text-based protocol using UDP74- Uses multicast addressing75- Built on HTTPU (HTTP over UDP)7677**Key characteristics**:78- **Port**: UDP 190079- **IPv4 multicast**: `239.255.255.250`80- **Protocol foundation**: HTTPU (HTTP over UDP)8182**Security testing considerations**:83- UPnP devices often have security vulnerabilities84- SSDP can reveal device types and capabilities85- Common target for network reconnaissance86- Can be used to discover IoT devices8788### Web Service for Devices (WSD)8990**Purpose**: Identify available services on a network (e.g., printers).9192**How it works**:93- Devices broadcast UDP packets94- Service seekers send requests95- Service providers announce their offerings9697**Security testing considerations**:98- Can enumerate network services99- Often used in enterprise environments100- May reveal sensitive service information101102## Authentication and Authorization Protocols103104### OAuth 2.0105106**Purpose**: Secure, selective sharing of user information between services.107108**How it works**:1091. User authenticates with authorization server1102. User grants authorization to the client service1113. Authorization server generates access token1124. Client service uses token to access specified user data113114**Common use cases**:115- "Sign in with Google" / "Sign in with Facebook"116- API access delegation117- Third-party service integration118119**Security testing considerations**:120- Token handling and storage121- Scope validation122- Authorization code flow security123- Token expiration and refresh mechanisms124125### RADIUS (Remote Authentication Dial-In User Service)126127**Purpose**: Network access protocol for authentication, authorization, and accounting.128129**How it works**:130- User credentials verified by RADIUS server131- May include network address verification132- Post-authentication: network access granted133- Session details tracked for billing and statistics134135**Key characteristics**:136- **Primary users**: ISPs, enterprise networks137- **Functions**: AAA (Authentication, Authorization, Accounting)138- **Common ports**: UDP 1812 (authentication), UDP 1813 (accounting)139140**Security testing considerations**:141- Credential handling142- Shared secret security143- Accounting data integrity144- Replay attack prevention145146## File Sharing and Session Protocols147148### SMB (Server Message Block)149150**Purpose**: Sharing files, printers, and ports.151152**How it works**:153- Operates directly over TCP or via NetBIOS over TCP154- Dual compatibility enhances connectivity with various devices155156**Key characteristics**:157- **Direct TCP**: Port 445158- **NetBIOS over TCP**: Ports 137, 138159- **Common in**: Windows environments, file servers160161**Security testing considerations**:162- SMBv1 is deprecated and vulnerable163- Common target for lateral movement164- Check for SMB signing enforcement165- Enumerate shares and permissions166167### NetBIOS (Network Basic Input/Output System)168169**Purpose**: Manages network sessions and connections for resource sharing.170171**How it works**:172- Supports unique names for devices173- Supports group names for multiple devices174- Enables targeted or broadcast messaging175- Communication modes: connectionless (no acknowledgment) or connection-oriented (session-based)176177**Key characteristics**:178- **Traditional protocols**: IPC/IPX179- **Common usage**: TCP/IP180- **Associated protocol**: NetBEUI (fast but verbose due to broadcasting)181182**Security testing considerations**:183- NetBIOS name enumeration184- Can reveal system names and user information185- Often disabled in modern security configurations186187## Directory and Identity Protocols188189### LDAP (Lightweight Directory Access Protocol)190191**Purpose**: Management and access of directory information over TCP/IP.192193**How it works**:194- Supports various operations for querying and modifying directory information195- Interacts with databases designed for LDAP communication196197**Key characteristics**:198- **Primary use**: Distributed directory information services199- **Common ports**: TCP 389 (unencrypted), TCP 636 (LDAPS)200- **Operations**: Search, modify, add, delete directory entries201202**Security testing considerations**:203- Anonymous bind vulnerabilities204- LDAP injection attacks205- Information disclosure through enumeration206- Certificate validation for LDAPS207208### Active Directory (AD)209210**Purpose**: Network-accessible database for centralized management of network entities.211212**How it works**:213- Contains objects: users, groups, privileges, resources214- Hierarchical structure of domains215- Subdomains allow further segmentation216- Each subdomain may maintain its own server and user base217218**Key characteristics**:219- **Centralized management**: User access to network resources220- **Query capabilities**: Retrieve contact details, locate resources221- **Structure**: Domains, subdomains, organizational units222223**Security testing considerations**:224- Kerberos authentication security225- Group Policy Object (GPO) analysis226- Privilege escalation paths227- Lateral movement opportunities228- Password policy enforcement229230## Protocol Quick Reference Table231232| Protocol | Primary Port(s) | Transport | Purpose |233|----------|----------------|-----------|----------|234| mDNS | UDP 5353 | UDP | Local name resolution |235| DNS-SD | UDP 5353 | UDP | Service discovery |236| SSDP | UDP 1900 | UDP | UPnP service discovery |237| WSD | UDP (varies) | UDP | Device service discovery |238| RADIUS | UDP 1812/1813 | UDP | AAA for network access |239| SMB | TCP 445 | TCP | File/print sharing |240| NetBIOS | TCP 137-139 | TCP | Session management |241| LDAP | TCP 389/636 | TCP | Directory services |242| OAuth 2.0 | TCP 443 | TCP/HTTPS | Authorization |243244## Common Security Testing Scenarios245246### Network Reconnaissance2471. **mDNS enumeration**: Scan for `.local` hosts on the subnet2482. **SSDP discovery**: Query `239.255.255.250:1900` for UPnP devices2493. **SMB enumeration**: Check ports 445, 137-139 for file shares2504. **LDAP enumeration**: Query port 389 for directory information251252### Service Discovery Analysis2531. **DNS-SD queries**: Request specific service types to enumerate services2542. **WSD monitoring**: Capture broadcast packets for service announcements2553. **Protocol fingerprinting**: Identify services by their protocol behavior256257### Authentication Testing2581. **RADIUS testing**: Verify authentication flow and accounting2592. **OAuth 2.0 validation**: Test token handling and scope enforcement2603. **AD security**: Assess Kerberos and LDAP security configurations261262## Troubleshooting Tips263264- **mDNS not working**: Check firewall rules for UDP 5353, verify `.local` domain configuration265- **SSDP discovery failing**: Ensure UDP 1900 is open, check multicast routing266- **SMB connectivity issues**: Verify ports 445 or 137-139, check NetBIOS configuration267- **LDAP queries failing**: Check port 389/636, verify bind credentials and permissions268- **AD authentication problems**: Verify Kerberos configuration, check time synchronization269270## Best Practices2712721. **Disable unnecessary protocols**: Turn off NetBIOS, SMBv1, and other legacy protocols when not needed2732. **Use encrypted variants**: Prefer LDAPS over LDAP, SMB signing enabled2743. **Segment networks**: Isolate service discovery traffic to appropriate VLANs2754. **Monitor protocol traffic**: Watch for unusual mDNS, SSDP, or LDAP activity2765. **Keep services updated**: Regularly patch SMB, LDAP, and other protocol implementations