RPC Scans: Finding the Services That Answer Remote Calls
A remote procedure call, or RPC, lets one program ask another program to perform an operation and return a result. An RPC scan looks for services that offer such calls and gathers information about them, such as the program involved and the versions of its calling rules it supports.
A service is a program that listens for requests and provides some function in response. RPC supplies a way to request that function across a connection. The caller sends the information the operation needs; the other program performs the work and sends a result back.
Discovering that a service answers is useful. It doesn't establish that someone without permission can use every operation the service offers.
- Learn Nmap from the person who wrote it.
- Find out what is really running on your network.
- Go from basic scans to advanced techniques with one reference.
Finding the address of the operation
A program needs somewhere to send its call. An endpoint is the location through which a service can be contacted. That can include a computer's network address and a port, a numbered communication point used to direct traffic to the right service.
There are two useful ways to learn about RPC services. A tool can ask a registration service what programs are listed, or it can send probes to a service and examine the replies.
One RPC family is Sun RPC, also called ONC RPC, short for Open Network Computing. In this family, a portmapper maintains information that helps locate registered programs. Nmap, a network discovery tool, documents an rpcinfo query that returns program numbers, supported versions, ports, communication protocols and program names.
Learn Nmap in Seven Minutes
A registration response tells the investigator what is listed. It doesn't, by itself, show that every listed endpoint can be reached from the computer making the inquiry. A separate connection to a listed service may encounter different network restrictions.
Direct probing asks a different question: what does this service actually answer? Nmap's service and version detection includes SunRPC queries to identify program and version numbers. It examines replies rather than relying solely on the customary service associated with a port number.
Reading a result without adding a conclusion
Consider a fictional inventory entry reporting a record-query program, a supported RPC program version and the endpoint where it is registered.
The program number identifies the RPC program. Its version number identifies a supported version of that program's calling interface—the rules a caller must follow. That number is not necessarily the release number of the installed software product.
- Skip the install: pfSense Plus comes preloaded, so you can start writing rules right away.
- Get a firewall, router and VPN in one silent box that sips power.
- Keep receiving pfSense Plus updates for the life of the product.
The entry gives an administrator concrete information to compare with the intended service inventory. Is the program expected? Is its location consistent with the design? If a direct probe succeeds, should that service be reachable from that part of the network?
A port scan can help establish reachability, while RPC-specific exchanges provide more information about the service answering. Neither result alone proves a software weakness that an attacker can exploit.
Permissions are another question. Authentication checks proof of who is making a request; authorization determines which operations that caller may use. A service can answer a discovery query and still require permission for its useful operations. Sending the call and checking who sent it are separate jobs.
The place where the scan runs also matters. A result from inside an organization's network describes what that observer could discover or contact under those conditions. It doesn't establish that the same service is exposed to every visitor on the internet.
What Do Port Numbers Actually Do?
RPC is a family of approaches
“RPC scan” can be ambiguous because RPC describes a broader programming idea, not one universal message format.
Nmap's traditional RPC detection uses the Sun/ONC family described above. The ONC RPC standard defines its calls, replies, programs and procedures. A procedure is one of the operations the program offers.
Microsoft RPC is a separate implementation of the remote-call idea. It also moves operation inputs and results between programs, but that doesn't make a SunRPC probe a universal test for every Microsoft RPC service.
Finding an unexpected service gives an administrator something specific to investigate. Its purpose and access rules determine whether to restrict, repair or keep it; the scan result alone doesn't make that decision.
Port Scan: Reading Open, Closed and Filtered

Network Services: One Computer Asks, Another Does the Job

Cyber Reconnaissance: How Ordinary Facts Become an Attack Plan

QUOTE:
"Amateurs hack systems, professionals hack people."

