The dark side of Remote Procedure Call protocols - Red Canary (2024)

Microsoft Remote Procedure Call (MSRPC) is an interprocess communication protocol mechanism that adversaries can abuse to perform a wide range of malicious actions. Just this year, two major attacks leveraged MSRPC to accomplish privilege escalation—PetitPotam and PrintNightmare. These aren’t the first attacks to leverage MSRPC, and they won’t be the last.

This blog introduces a project called MSRPC to ATT&CK, which maps commonly used MSRPC protocols to corresponding techniques and sub-techniques, providing context about each protocol. Read on to learn why this project exists, what type of information it contains, and how defenders can use this resource.

What is MSRPC?

MSRPC is Microsoft’s implementation of the Distributed Computing Environment/Remote Procedure Calls (DCE\RPC) call system, used for creating and facilitating communication between distributed client and server programs. Users can interact with MSRPC remotely (the scenario implied in the rest of this post) or locally by leveraging Advanced Local Procedure Call (ALPC). ALPC and the majority of other MSRPC components are out of scope for this article. If you’d like to know more about RPC components, SpecterOps published an extensive research paper (full disclosure: I wrote it) and James Forshaw wrote a noteworthy blog for Google Project Zero and has developed an extensive library of RPC-related information.

As previously mentioned, attackers leverage various MSRPC protocols for many purposes including, but not limited to, the following:

Historically, it’s been difficult to leverage RPC-based telemetry to perform detection at scale. The telemetry from an endpoint perspective is poor. Sure, there’s the Event Tracing for Windows (ETW) Microsoft-Windows-RPC provider, but if sensors are leveraging this provider at scale, then the end user has no control over its configuration. This means you can’t collect the RPC telemetry you might want or need, which leads to scalability issues.

There’s also Windows Security Event 5156, but that’s more of an implicit representation of MSRPC activity because it’s actually a Windows Filtering Platform (WFP) log that doesn’t include the specific RPC attributes that would help identify which protocol/interface is being leveraged. This data would help discern what is happening on an endpoint. A similar thing can be said with process-based network events, a data source collected by many endpoint detection and response (EDR) products. It might have attributes showing which binary received the call, the source and destination IPs of the call, and the transport protocol it used, but these events are missing key attributes like the method (RPC function) that was invoked.

That leaves us with network-based telemetry, which generally does have the information we need. Zeek, for example, will specify the protocol being used, the transport protocol used (TCP/IP / Named Pipes), the method being invoked, and the source/destination hosts. However, that leaves a gap of knowledge from a host perspective. You know a specific operation was called through network telemetry, but you might not have visibility into what the adversary actually did on the endpoint. This begs a few questions:

  • What binary was used to execute this method?
  • What if an environment doesn’t have great network telemetry?
  • How do defenders know how to relate activity back to the originating MSRPC protocol?

MSRPC to ATT&CK

The fundamental point of this project is to enumerate commonly abused MSRPC protocols and to provide information associated with those protocols—including unique identifiers, server binary data, and indicators of activity (IOA) like common network connection patterns—that defenders can use to develop detection and prevention strategies. This project is mapped to MITRE via the ATT&CK Navigator:

The dark side of Remote Procedure Call protocols - Red Canary (1)

This project currently covers 13 MSRPC protocols, and I hope to add more as time goes on. Each protocol will link to a Markdown document with the following categories:

Protocol name: The Microsoft official name for this protocol, along with an embedded link to Microsoft’s documentation of this protocol. Some examples include:

Interface UUID: A 128-bit value universally unique identifier (UUID) that identifies the MSRPC interface being used. The interface is basically the bridge between the client and the server. The RPC client must implement the interface, and the RPC server must expose the same exact interface—otherwise communication will not occur. Each interface has explicit methods or functions associated with it. These interfaces must be called in order to use those exposed functions.

Server binary: All the code needed to interface with a MSRPC protocol is precompiled and stored within the “RPC server.” Most often we see these binaries with dll & exe extensions. If the server code is stored within a dynamic link library (DLL), then it’s typically loaded by an EXE, so that it can interface and register with the RPC at runtime. This section contains the name of the binary housing the server code and the correlating binary that loads it (assuming that first binary is a DLL).

Endpoint: Specifies the transport protocol (ncacn_np and/or ncacn_ip_tcp) being used for this protocol.

ATT&CK relation: Links to the MITRE ATT&CK sub-technique/technique associated with the protocol.

Indicators of activity (IOA): These IOAs represent telemetry that you can expect tools like Zeek or EDR products to generate in response to related RPC activity. We’re using the term IOA purposefully here, distinguishing it from indicators of compromise (IOCs) as it doesn’t necessarily imply malice or severity. Since every organization is different and relies on different tools, data sources, and security controls, we wanted to provide IOAs that comprise both network and host-based telemetry:

  • Network sources will include information on transport protocols, the binaries that are connected to, corresponding methods/functions, and any other noteworthy attributes.
  • Host sources will include information like registry modifications, image loads, process creation events, file shares, identity logs, and more.

Prevention opportunities: MSRPC protocol abuse often results from a failure to implement the correct preventive measures. Such oversights could include patching delinquency, disabling services or NTLM, misconfiguring RPC filters or group permissions, or failing to set up any variety of other preventive controls. This information can help organizations understand what they can do to stop this activity from happening within their environment.

Notes: Generalized notes I found relevant regarding any of the above categories. This could be suggestions to change the DACL within the RPC filters, information regarding current threats, or other miscellaneous things.

Useful resources: Great reading material on the topic at hand, including documentation from MITRE and Microsoft and useful blog posts.

How can you use this?

I intended this project to be a one-stop shop for valuable information that security teams can use to develop controls to protect MSRPC. Here are three of my main objectives:

  • Increase visibility into this overlooked data source. Right now, there aren’t great RPC-explicit optics outside of network sensors. If an analyst runs across a binary communicating with many pipes that correlate to MSRPC protocols that expose methods allowing for enumeration, this project will help them confirm that someone is leveraging X protocol to achieve Y action.
  • Educate users about specific protocols. MSRPC to ATT&CK can be used like an encyclopedia, with comprehensive context about specific protocols and links to other relevant resources.
  • Compile all preventive measures in one place. Preventive measures are shared across Microsoft’s documentation, Twitter, and other miscellaneous tooling people have released. I wanted to collect all of that information and highlight specifics for the protocol of interest. If an organization decides not to take any of the preventive measures I mention, defenders may still gain insight into future detection opportunities.
The dark side of Remote Procedure Call protocols - Red Canary (2024)

FAQs

How to fix the remote procedure call that failed and did not execute? ›

The remote procedure call failed” error can be resolved by using several methods, which include restarting the remote procedure call (RPC) service, restarting the DCOM server process launcher, repairing system files, running the Windows app troubleshooter, or running a full system scan.

What is the security risk of remote procedure call? ›

Without proper encryption, sensitive information transmitted over XML-RPC can be intercepted and exposed. Secure communication channels, such as HTTPS, are crucial to encrypt data in transit and protect against eavesdropping. XML-RPC, like other web-based protocols, is susceptible to injection attacks.

What is the RPC remote procedure call protocol? ›

A Remote Procedure Call (RPC) is a software communication protocol that one program uses to request a service from another program located on a different computer and network, without having to understand the network's details.

What is remote procedure call on the client side? ›

On the client side, the stub handles the interface between the client's local procedure call and the run-time system, marshalling and unmarshalling data, invoking the RPC run-time protocol, and if requested, carrying out some of the binding steps.

How to remove remote procedure call failed? ›

Refresh Remote Procedure Call (RPC) Service
  1. Press Windows key + R to launch the Run dialog window.
  2. Type services. msc and click OK.
  3. Right-click the Remote Procedure Call service and select Refresh from the context menu.
  4. It only takes a moment for the service to restart.
Jun 13, 2023

How do I turn off remote procedure calls? ›

Start > search box, type ser > Enter > scroll down to Remote Procedur... > right click at it > Properties > ar Startup Type heading, click the pointer and select Disable > OK when done.

Is it okay to disable remote procedure call? ›

Microsoft recommends that you don't disable the RPC service.

Are remote procedure calls still used? ›

Sun's RPC, formally called ONC (Open Network Computing) RPC was one of the first RPC systems to achieve widespread use, thanks to the early popularity of Sun workstations, servers, and the Network File System (NFS). It is still in use on virtually all UNIX-derived systems (Linux, macOS, *BSD, SunOS).

Is RPC a vulnerability? ›

Vulnerability Overview:

RPC is a communication method for calling and executing programs from other terminals connected to the network. CVE-2022-26809 is a remote code execution vulnerability in Microsoft RPC runtime and affects Windows.

What port does remote procedure call use? ›

The client contacts the RPC-based server through the ports TCP 111 or UDP 135. The client tells the location server the unique RPC service number for the server it wishes to access.

What is the difference between remote procedure call and remote procedure invocation? ›

RMI stands for Remote Method Invocation, which is a similar to RPC but it supports object-oriented programming which is java's feature. A thread is allowable to decision the strategy on a foreign object. In RMI, objects are passed as a parameter rather than ordinary data.

Why is the remote procedure call running on my computer? ›

Remote Procedure Call (RPC) is a request-response protocol that one program can use to request a service from a program located in another computer in a same network without having to understand the network's details. It supports communication between Windows applications.

What are the security issues with RPC? ›

However, unsecured RPCs pose a significant security risk to organizations. Without proper authentication and encryption, hackers can intercept and modify the communication between systems, potentially gaining access to sensitive data or executing unauthorized commands.

Why do we need RPC? ›

Remote Procedure Call (RPC) protocol is generally used to communicate between processes on different workstations. However, RPC works just as well for communication between different processes on the same workstation.

What language is remote procedure call? ›

The Remote Procedure Call Language (RPCL) is identical to the eXternal Data Representation (XDR) language, except for the added program definition. The Remote Procedure Call Language (RPCL) is identical to the eXternal Data Representation (XDR) language, except for the added program definition.

What does remote procedure call failed and did not execute domain join? ›

The remote procedure call failed and did not execute. This error occurs when a network device (router, firewall, or VPN device) rejects network packets between the client being joined and the DC.

What does it mean when remote call failed? ›

The error message 'the remote procedure call failed' typically arises due to communication issues between various processes on your computer. I would suggest trying the following steps: Start your computer and wait for the login screen. Hold down the Shift key and click on the Power icon in the bottom right.

How to fix 8007071a the remote procedure call was cancelled? ›

Here are some potential solutions: Check Firewall Settings: Make sure that Remote Scheduled Task Management (RPC), Remote Scheduled Task Management (RPC-EPMAP), and Windows Management Instrumentation (WMI-In) are allowed in Inbound Rules.

What is the error message the remote procedure call failed? ›

This problem occurs when one of the following conditions is true: The server is backlogged and doesn't respond to the TCP ACK or the response message. So, the sender abandons the TCP session. The network is too slow or unreliable.

Top Articles
Coding Games and Programming Challenges to Code Better
Launching an ETF - Ultimus
Craigslist Free En Dallas Tx
Blackstone Launchpad Ucf
Rabbits Foot Osrs
Mama's Kitchen Waynesboro Tennessee
Byrn Funeral Home Mayfield Kentucky Obituaries
Mylife Cvs Login
Monticello Culver's Flavor Of The Day
Milk And Mocha GIFs | GIFDB.com
All Obituaries | Ashley's J H Williams & Sons, Inc. | Selma AL funeral home and cremation
Maxpreps Field Hockey
Readyset Ochsner.org
What Happened To Maxwell Laughlin
Hca Florida Middleburg Emergency Reviews
Painting Jobs Craigslist
Navy Female Prt Standards 30 34
Jayah And Kimora Phone Number
Aris Rachevsky Harvard
bode - Bode frequency response of dynamic system
Bekijk ons gevarieerde aanbod occasions in Oss.
Evil Dead Rise Showtimes Near Regal Sawgrass & Imax
Ceramic tiles vs vitrified tiles: Which one should you choose? - Building And Interiors
Tuw Academic Calendar
Expression Home XP-452 | Grand public | Imprimantes jet d'encre | Imprimantes | Produits | Epson France
This Is How We Roll (Remix) - Florida Georgia Line, Jason Derulo, Luke Bryan - NhacCuaTui
Mississippi Craigslist
Generator Supercenter Heartland
Vadoc Gtlvisitme App
Filmy Met
Pixel Combat Unblocked
Mg Char Grill
RFK Jr., in Glendale, says he's under investigation for 'collecting a whale specimen'
Admissions - New York Conservatory for Dramatic Arts
D-Day: Learn about the D-Day Invasion
The best bagels in NYC, according to a New Yorker
How to Print Tables in R with Examples Using table()
Craigslist - Pets for Sale or Adoption in Hawley, PA
Seven Rotten Tomatoes
Pokemon Reborn Gyms
Unveiling Gali_gool Leaks: Discoveries And Insights
Portal Pacjenta LUX MED
Brown launches digital hub to expand community, career exploration for students, alumni
Ephesians 4 Niv
Verizon Forum Gac Family
Latina Webcam Lesbian
Rovert Wrestling
Dolce Luna Italian Restaurant & Pizzeria
Elvis Costello announces King Of America & Other Realms
Divisadero Florist
Edict Of Force Poe
Latest Posts
Article information

Author: Rubie Ullrich

Last Updated:

Views: 5924

Rating: 4.1 / 5 (72 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Rubie Ullrich

Birthday: 1998-02-02

Address: 743 Stoltenberg Center, Genovevaville, NJ 59925-3119

Phone: +2202978377583

Job: Administration Engineer

Hobby: Surfing, Sailing, Listening to music, Web surfing, Kitesurfing, Geocaching, Backpacking

Introduction: My name is Rubie Ullrich, I am a enthusiastic, perfect, tender, vivacious, talented, famous, delightful person who loves writing and wants to share my knowledge and understanding with you.