RPC Program Enumeration with rpcinfo
RPCBind (portmapper) on port 111 is a directory service for RPC programs. Its value is not in the portmapper itself but in the list of programs it returns: each entry maps a program name to a dynamically assigned port. NFS, mountd, NIS/YP, and other RPC services register here on startup. Every non-111 port in the output is real attack surface that must be scanned and identified. Move to exposed services assessment after building the full port list.
- Fast Program Listing
- TCP vs UDP: When Results Look Incomplete
- nmap rpcinfo Script
- Pivot Scan: Service Detection on Discovered Ports
- Program Name Reference
Fast Program Listing
program vers proto port service 100000 4 tcp 111 rpcbind 100000 3 udp 111 rpcbind 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs 100005 1 tcp 43577 mountd 100005 3 udp 38297 mountd 100024 1 udp 35147 status 100021 4 tcp 36921 nlockmgr
Every non-111 port in this output is a service running on a dynamic port. Add all of them to your scan targets immediately. The program name in the rightmost column tells you what to investigate next: mountd alongside nfs is the most common high-value finding and leads directly to NFS enumeration.
TCP vs UDP: When Results Look Incomplete
If the default query returns partial results or times out, query each transport explicitly:
TCP succeeds but UDP fails when UDP is filtered: still useful, pivot off the TCP-registered ports. Both failing means port 111 may not be reachable from your current position or is firewalled. Verify with a direct nc probe:
reachable
nmap rpcinfo Script
Useful when rpcinfo is not installed locally or you want the output in a consistent nmap format:
| rpcinfo: | program version port/proto service | 100000 2,3,4 111/tcp rpcbind | 100003 3,4 2049/tcp nfs | 100005 1,2,3 43577/tcp mountd | 100021 1,3,4 36921/tcp nlockmgr |_ 100024 1 35147/udp status
Pivot Scan: Service Detection on Discovered Ports
Take every non-111 port from the rpcinfo output and run service detection against them directly:
2049/tcp open nfs 3-4 (RPC #100003) 36921/tcp open nlockmgr 1-4 (RPC #100021) 43577/tcp open mountd 1-3 (RPC #100005)
Program Name Reference
Common RPC programs and what each means for next steps:
Program | Service | Next step |
|---|---|---|
nfs (100003) | NFS file server | NFS export enumeration, mount without auth |
mountd (100005) | NFS mount daemon | showmount -e, list exports |
nlockmgr (100021) | NFS lock manager | Supports NFS stack, enumerate alongside nfs |
status (100024) | NSM status monitor | Supports NFS stack |
ypserv (100004) | NIS/YP server | NIS domain enumeration, ypcat passwd |
ypbind (100007) | NIS/YP bind | Confirms NIS client, enumerate domain |
rexd (100017) | Remote execution | High priority: often unauthenticated RCE |
walld (100008) | Wall broadcast | Low value, note and move on |
Move to exposed services assessment to evaluate what the discovered programs expose, then pivot into the appropriate service pages for exploitation.
References
-
Script behavior and output fields for RPC program enumeration