Bitzu

CPSA ยท Unix network file, trust and remote access services

RPC services and portmapper enumeration

Portmapper enumeration, common RPC services and typical vulnerabilities.

Key points

  • Many Unix services (NFS, mountd, NIS, statd, rstatd, rusersd) are RPC programs that register with rpcbind, historically called the portmapper.
  • Anyone who can reach it can ask which programs and versions run and on which ports: rpcinfo -p <host> (or -s for a concise list).
  • The result guides further tests, for example NFS and NIS checks.
  • Risks include unnecessary services exposed to untrusted networks and old, unpatched RPC daemons.

Source: https://man7.org/linux/man-pages/man8/rpcinfo.8.html

Practice questions

Single choice

Which command lists the RPC programs registered on a remote host?

  1. rpcinfo -p <host>
  2. showmount -e <host>
  3. xhost <host>
  4. exportfs <host>
Show answer

Answer: A. rpcinfo -p <host>

rpcinfo -p <host> queries rpcbind and lists registered programs. showmount only covers NFS exports, and rpcinfo -s is a concise variant, not the plain listing asked for here.

Select all that apply

Which of these are RPC-based services commonly found on Unix hosts?

  1. mountd
  2. rstatd
  3. sshd
  4. rusersd
  5. syslogd
Show answer

Answer: A. mountd, B. rstatd, D. rusersd

mountd, rstatd and rusersd are RPC programs that register with rpcbind, and NIS is also RPC-based. sshd and syslogd do not use the RPC portmapper.

True or false

True or false: the portmapper protocol is the same thing that rpcinfo -p queries today under the name rpcbind.

Show answer

Answer: True

True. The rpcinfo man page describes rpcbind protocol version 2 as previously known as the portmapper protocol. The names are used interchangeably in older material.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module