大网数据广告活动
网络与域名解析

Callbacks (RPC)

· 52CE 我爱测

Often the programming model necessitates a server callback to a client through a remote procedure call (RPC), or client calls into an untrusted server. This introduces many potential pitfalls.

Often the programming model necessitates a server callback to a client through a remote procedure call (RPC), or client calls into an untrusted server. This introduces many potential pitfalls.

First, callback to the client must be made with a sufficiently low impersonation level. If the server is a highly privileged system service, calling back a local client with an impersonation level of impersonate or higher can provide the client with privileges sufficient to take over the system. Calling back a remote client with higher impersonation level than necessary can also lead to undesirable consequences.

Second, if an attacker induces your service to perform a callback, it can launch what is called a black hole—denial of service attack. Such attacks are not specific to RPC; in these attacks, a machine induces you to send traffic to it, but it does not respond to your requests. You sink more and more resources into calling the black hole, but they never come back. One generic example of such an attack is a TCP-level attack called a TCP/IP SYN flood attack.

On the RPC level, a simple black-hole attack occurs when an attacker calls an interface, and requests the server to call the interface back. The interface complies, but the attacker never returns the call: one thread on the server is tied up. The attacker does this 100 times, tying 100 threads on the server. Eventually the server runs out of memory. Debugging the server can potentially reveal the identity of the black-hole caller, but often the server will be restarted without suspecting foul play, or there may not be enough expertise available to determine the attacker.

The third pitfall is on the client. Often a client makes a call to the server informing the server how to call it back (usually a string binding), and then waits for a call from the server to arrive, blindly accepting any call on that endpoint that claims to come from the server. The callback protocol from the server to the client should include some verification mechanism to ensure that when the callback comes to the client, it actually originated on the server.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。