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.4metadata:5 source: https://skillmd.com/skills/abelrguezr/network-protocols-reference6---78# Network Protocols Reference910A comprehensive reference for network protocols commonly encountered in security testing, network analysis, and system administration.1112## When to Use This Skill1314Use this skill when you need to:15- Understand how a specific network protocol works16- Identify which protocols are running on a network during reconnaissance17- Analyze service discovery mechanisms (mDNS, DNS-SD, SSDP, WSD)18- Understand authentication and directory protocols (OAuth 2.0, RADIUS, LDAP, AD)19- Explain protocol behavior for security assessments20- Troubleshoot network connectivity issues related to specific protocols2122## Service Discovery Protocols2324### Multicast DNS (mDNS)2526**Purpose**: IP address resolution within small, local networks without a dedicated name server.2728**How it works**:29- Multicasts a query within the subnet30- Host with the specified name responds with its IP address31- All devices in the subnet update their mDNS caches3233**Key characteristics**:34- **Domain suffix**: `.local` only35- **Port**: UDP 535336- **IPv4 multicast**: `224.0.0.251`37- **IPv6 multicast**: `ff02::fb`38- **Ethernet MAC (IPv4)**: `01:00:5E:00:00:FB`39- **Ethernet MAC (IPv6)**: `33:33:00:00:00:FB`40- **Scope**: Confined to local network, does not cross routers4142**Special behavior**:43- **Domain Name Relinquishment**: Host releases domain name by sending packet with TTL of zero44- **Conflict handling**: Conflicts with non-mDNS hosts in `.local` domain require network configuration adjustments4546**Security testing considerations**:47- mDNS traffic is visible to all devices on the subnet48- Can reveal hostnames and IP addresses of devices49- Useful for network reconnaissance in local environments5051### DNS-SD (DNS Service Discovery)5253**Purpose**: Discovering services on a network by querying specific domain names.5455**How it works**:56- Queries specific service type domains (e.g., `_printers._tcp.local`)57- Response includes all related domains and available services5859**Common service types**:60- `_printers._tcp.local` - Printers61- `_http._tcp.local` - Web services62- `_ssh._tcp.local` - SSH services63- `_smb._tcp.local` - SMB file sharing6465**Security testing considerations**:66- Reveals available services on the network67- Can enumerate service types without direct probing68- Often used in conjunction with mDNS6970### SSDP (Simple Service Discovery Protocol)7172**Purpose**: Discovery of network services, primarily used by UPnP.7374**How it works**:75- Text-based protocol using UDP76- Uses multicast addressing77- Built on HTTPU (HTTP over UDP)7879**Key characteristics**:80- **Port**: UDP 190081- **IPv4 multicast**: `239.255.255.250`82- **Protocol foundation**: HTTPU (HTTP over UDP)8384**Security testing considerations**:85- UPnP devices often have security vulnerabilities86- SSDP can reveal device types and capabilities87- Common target for network reconnaissance88- Can be used to discover IoT devices8990### Web Service for Devices (WSD)9192**Purpose**: Identify available services on a network (e.g., printers).9394**How it works**:95- Devices broadcast UDP packets96- Service seekers send requests97- Service providers announce their offerings9899**Security testing considerations**:100- Can enumerate network services101- Often used in enterprise environments102- May reveal sensitive service information103104## Authentication and Authorization Protocols105106### OAuth 2.0107108**Purpose**: Secure, selective sharing of user information between services.109110**How it works**:1111. User authenticates with authorization server1122. User grants authorization to the client service1133. Authorization server generates access token1144. Client service uses token to access specified user data115116**Common use cases**:117- "Sign in with Google" / "Sign in with Facebook"118- API access delegation119- Third-party service integration120121**Security testing considerations**:122- Token handling and storage123- Scope validation124- Authorization code flow security125- Token expiration and refresh mechanisms126127### RADIUS (Remote Authentication Dial-In User Service)128129**Purpose**: Network access protocol for authentication, authorization, and accounting.130131**How it works**:132- User credentials verified by RADIUS server133- May include network address verification134- Post-authentication: network access granted135- Session details tracked for billing and statistics136137**Key characteristics**:138- **Primary users**: ISPs, enterprise networks139- **Functions**: AAA (Authentication, Authorization, Accounting)140- **Common ports**: UDP 1812 (authentication), UDP 1813 (accounting)141142**Security testing considerations**:143- Credential handling144- Shared secret security145- Accounting data integrity146- Replay attack prevention147148## File Sharing and Session Protocols149150### SMB (Server Message Block)151152**Purpose**: Sharing files, printers, and ports.153154**How it works**:155- Operates directly over TCP or via NetBIOS over TCP156- Dual compatibility enhances connectivity with various devices157158**Key characteristics**:159- **Direct TCP**: Port 445160- **NetBIOS over TCP**: Ports 137, 138161- **Common in**: Windows environments, file servers162163**Security testing considerations**:164- SMBv1 is deprecated and vulnerable165- Common target for lateral movement166- Check for SMB signing enforcement167- Enumerate shares and permissions168169### NetBIOS (Network Basic Input/Output System)170171**Purpose**: Manages network sessions and connections for resource sharing.172173**How it works**:174- Supports unique names for devices175- Supports group names for multiple devices176- Enables targeted or broadcast messaging177- Communication modes: connectionless (no acknowledgment) or connection-oriented (session-based)178179**Key characteristics**:180- **Traditional protocols**: IPC/IPX181- **Common usage**: TCP/IP182- **Associated protocol**: NetBEUI (fast but verbose due to broadcasting)183184**Security testing considerations**:185- NetBIOS name enumeration186- Can reveal system names and user information187- Often disabled in modern security configurations188189## Directory and Identity Protocols190191### LDAP (Lightweight Directory Access Protocol)192193**Purpose**: Management and access of directory information over TCP/IP.194195**How it works**:196- Supports various operations for querying and modifying directory information197- Interacts with databases designed for LDAP communication198199**Key characteristics**:200- **Primary use**: Distributed directory information services201- **Common ports**: TCP 389 (unencrypted), TCP 636 (LDAPS)202- **Operations**: Search, modify, add, delete directory entries203204**Security testing considerations**:205- Anonymous bind vulnerabilities206- LDAP injection attacks207- Information disclosure through enumeration208- Certificate validation for LDAPS209210### Active Directory (AD)211212**Purpose**: Network-accessible database for centralized management of network entities.213214**How it works**:215- Contains objects: users, groups, privileges, resources216- Hierarchical structure of domains217- Subdomains allow further segmentation218- Each subdomain may maintain its own server and user base219220**Key characteristics**:221- **Centralized management**: User access to network resources222- **Query capabilities**: Retrieve contact details, locate resources223- **Structure**: Domains, subdomains, organizational units224225**Security testing considerations**:226- Kerberos authentication security227- Group Policy Object (GPO) analysis228- Privilege escalation paths229- Lateral movement opportunities230- Password policy enforcement231232## Protocol Quick Reference Table233234| Protocol | Primary Port(s) | Transport | Purpose |235|----------|----------------|-----------|----------|236| mDNS | UDP 5353 | UDP | Local name resolution |237| DNS-SD | UDP 5353 | UDP | Service discovery |238| SSDP | UDP 1900 | UDP | UPnP service discovery |239| WSD | UDP (varies) | UDP | Device service discovery |240| RADIUS | UDP 1812/1813 | UDP | AAA for network access |241| SMB | TCP 445 | TCP | File/print sharing |242| NetBIOS | TCP 137-139 | TCP | Session management |243| LDAP | TCP 389/636 | TCP | Directory services |244| OAuth 2.0 | TCP 443 | TCP/HTTPS | Authorization |245246## Common Security Testing Scenarios247248### Network Reconnaissance2491. **mDNS enumeration**: Scan for `.local` hosts on the subnet2502. **SSDP discovery**: Query `239.255.255.250:1900` for UPnP devices2513. **SMB enumeration**: Check ports 445, 137-139 for file shares2524. **LDAP enumeration**: Query port 389 for directory information253254### Service Discovery Analysis2551. **DNS-SD queries**: Request specific service types to enumerate services2562. **WSD monitoring**: Capture broadcast packets for service announcements2573. **Protocol fingerprinting**: Identify services by their protocol behavior258259### Authentication Testing2601. **RADIUS testing**: Verify authentication flow and accounting2612. **OAuth 2.0 validation**: Test token handling and scope enforcement2623. **AD security**: Assess Kerberos and LDAP security configurations263264## Troubleshooting Tips265266- **mDNS not working**: Check firewall rules for UDP 5353, verify `.local` domain configuration267- **SSDP discovery failing**: Ensure UDP 1900 is open, check multicast routing268- **SMB connectivity issues**: Verify ports 445 or 137-139, check NetBIOS configuration269- **LDAP queries failing**: Check port 389/636, verify bind credentials and permissions270- **AD authentication problems**: Verify Kerberos configuration, check time synchronization271272## Best Practices2732741. **Disable unnecessary protocols**: Turn off NetBIOS, SMBv1, and other legacy protocols when not needed2752. **Use encrypted variants**: Prefer LDAPS over LDAP, SMB signing enabled2763. **Segment networks**: Isolate service discovery traffic to appropriate VLANs2774. **Monitor protocol traffic**: Watch for unusual mDNS, SSDP, or LDAP activity2785. **Keep services updated**: Regularly patch SMB, LDAP, and other protocol implementations