|Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
May the source be with you, but remember the KISS principle ;-)
Bigger doesn't imply better. Bigger often is a sign of obesity, of lost control, of overcomplexity, of cancerous cells
|Summary||OSI Protocol Layers||Recommended Books||Recommended Links||Lecture Notes||Unix System Calls|
|Security Issues||rsync||MSBlaster Worm||Microsoft RPC||Humor||Etc|
There are two ways of starting RPC services: at boot time via RC files or on demand.
At boot time RPC services vai /etc/rc2.d/s71rpc startup script that initializes the rpcbind service After the system starts up, the rpcbind daemon starts listening at port 111. The rpcbind process associates RPC program numbers with port numbers above 32768. The port number used by the rpcbind daemon is listed in the /etc/inet/services file. To view the port number and protocol, perform the command:
grep rpcbind /etc/services
sunrpc 111/udp rpcbind
sunrpc 111/tcp rpcbind
For a client to make request to the server the rpcbind service must be running on the server system. When an RPC service starts at boot, it communicates port and RPC number to the rpcbind process: If the RPC service has registered its current port number with the rpcbind daemon during startup, the current port number of the RPC service is returned to the client.
Some rpcbind services start only on demand. They are listed in
inetd.conf file and are controlled by
The rpcinfo command is used to list and delete RPC services. Two corresponding options are -p and -d:
# grep sprayd /etc/rpc
sprayd 100012 spray
Sun Microsystems's invented RPC in mid 80th. The original version of RPC was defined in RFC 1050. RPC is a powerful technique for constructing distributed, client-server based applications. It is based on extending the notion of conventional, or local procedure calling, so that the called procedure need not exist in the same address space as the calling procedure.
RPC opened new possibilities in network programming making possible such protocols as NFS, NIS, rsh, etc. Network File System (NFS) is a network file sharing system application that is a good example of how RPC can be used. Version 2 of RPC is defined in RFC 1057 and RFC 1831.
RPC services are not typically assigned to well-known ports. Rather than tying applications to particular ports, RPC provides a port mapping service whereby RPC assigns port numbers above 1024 to applications that are written to request RPC for ports. The lookup services that can be used for this include PORTMAPPER (PMAP) and RPCBIND and are described in RFC 1833. Portmapper has a fixed port (either UDP or TCP) number 111 to which an application (RPC service) makes a call to gain a port number to use. This lookup service program must be started first and remain operational throughout the runtime of the application.
The list of RPC services includes:
While originated in Sun RPC spread first to other Unixes and then to other OSes like Windows becoming pretty much a cross-platform protocol. Even command line utilities are often replicated. For example, Windows has rpcinfo utilities that operates pretty much like its Unix counterpart. To ensure cross-platform compatibility RPC data now are encoded using eXternal Data Representation (XDR), which defines how integers, floating point numbers and strings are represented(RFC 1832). This Presentation Layer protocol enables different computers with different operating systems to interact seamlessly. There is no formal message header or protocol system for XDR. XDR uses an 8-bit byte, with the lower bytes being the most significant. The RFC defines that all integer data types are converted to 4-byte integers, (there is also available an extended 64-bit integer format). IEEE 32-bit formats are used for floating-point numbers, where the mantissa is the lower 23 bits, the exponent takes 8 bits, and the sign of the number is 1 bit. Where data takes less than 4 bytes for any type, padding is added to ensure 4-byte lengths
RPC services started at boot time with startup scripts run on available ports above 32768. The rpcbind process associates RPC program numbers with port numbers.
The rpcbind service must be running on the server system for you to make RPC requests to the server. When an RPC service starts at boot, it communicates the following information to the rpcbind process:
If a client wants to make an RPC call to a given program number, it must
first contact the rpcbind service
on the server machine to obtain the port address before it can send the
RPC requests. If the RPC service has registered its current port number
with the rpcbind daemon during
startup, the current port number of the RPC service is returned to the
In Solaris the /etc/rc2.d/s71rpc startup script initializes the rpcbind service. The port number used by the rpcbind daemon is listed in the /etc/inet/services file. After the system starts up, the rpcbind daemon starts listening at port 111. To view the port number and protocol, grep the /etc/inet/services for string "rpcbind":
# grep rpcbind /etc/services
sunrpc 111/udp rpcbind
sunrpc 111/tcp rpcbind
Some rpcbind services start
only on demand. The port numbers are registered with the
rpcbind process during boot. When
a client application requests a service, the rpcbind
process returns the port number of the service to the client machine. The
client machine generates a new request using the port number that it just
received for the requested service.
RPC services on demand, such as the sprayd service, are implemented as follows:
The rpcinfo command makes an RPC call to an RPC server, and reports what it finds. Two frequently used options to the rpcinfo command are -p and -d.
Registration of RPC services. RPC services need to be registered. You can list services and unregister any services with rpcinfo. Note – Using the command rpcinfo -p host command returns information about registered RPC services on the specified host.
rpcinfo -p [ host ]
# rpcinfo -p
program vers proto port service
100000 4 tcp 111 rpcbind
100000 3 tcp 111 rpcbind
100000 2 tcp 111 rpcbind
100000 4 udp 111 rpcbind
100000 3 udp 111 rpcbind
100000 2 udp 111 rpcbind
100232 10 udp 32772 sadmind
100083 1 tcp 32771
The columns are as follows:
To unregister the RPC service given a specified prognum (program number) and versnum (version number), perform the rpcinfo command:
This command unregisters the RPC service with program number
100012 and version number 1.
Note – When using the rpcinfo -d command to unregister an RPC service, the RPC service can be identified using either the service name or the program number.
The deleted RPC service that uses program number 100012 is sprayd. To register the sprayd service again, send a HUP signal to the inetd daemon as follows:
# pkill -HUP inetd
Google matched content
Remote Procedure Calls (RPC) by Dave Marshall (1/5/1999)
Tutorial on RPCs
A Tutorial on Sockets and RPCs
Remote Procedure Call -- Carnegue-Mellon
docs.sun.com Introduction to the Solaris Development Environment
docs.sun.com NIS+ and DNS Setup and Configuration Guide
Solaris - Tuning Your TCP-IP Stack
TCP-wrapped rpcbind for Solaris
Client Server Computing - Unix Sockets and RPC
Denial of Service in Applications Using RPC over Named Pipes
See also MSBlaster Worm -- the most high profile exploitation of RPC vulnerabilities in MS Windows.
There are several problems with RPC itself, some more security related than others. The portmapper itself can be persuaded to "forward" requests to services which may then be fooled into thinking that they come from the local machine. The standard portmappers provide very little in the way of access control or logging. Wietse Venema has a version of the portmapper which does provide these extra services. [Solaris 10 implements this wrapper -NNB].
The more common problems are with the RPC services themselves. They are typically appallingly badly written from the security perspective and are a common source of network weaknesses..,
Microsoft has published an advisory regarding buffer overflow vulnerability present in the windows RPC Service. The RPC service provides remote procedure calls between objects executing on two remote machines running the Windows operating system.
An attacker can exploit this vulnerability by crafting a specifically malformed RPC packet and sending it to a vulnerable server. The attacker will need access to the vulnerable server RPC interface that is located at port 135.
A malicious attacker may use this vulnerability to execute code of his choice on the victim machine. Since the RPC service executes with SYSTEM privileges an attacker executing code as the result of this attack can fully compromise the vulnerable server
VERSIONS AFFECTEDApply the MS03-039 patch (includes MS03-026 patch) Please refer to:
Windows NT 4.0 - All service packs
Windows 2000 - All service packs
- Microsoft Security Bulletin MS03-026 for more information: http://www.microsoft.com/technet/treeview/default.asp? url=/technet/security/bulletin/MS03-026.asp
- Microsoft Security Bulletin MS03-039 for more information: http://www.microsoft.com/technet/treeview/default.asp? url=/technet/security/bulletin/MS03-039.asp
2. Block port 135 when RPC service is not required
W32.Blaster.Worm is a worm that exploits the DCOM RPC vulnerability (first described in Microsoft Security Bulletin MS03-026)(users are recommended to patch this vulnerability by applying Microsoft Security Bulletin MS03-039) using TCP port 135. The worm targets only Windows 2000 and Windows XP machines. While Windows NT and Windows 2003 Server machines are vulnerable to the aforementioned exploit (if not properly patched), the worm is not coded to replicate to those systems. This worm attempts to download the msblast.exe file to the %WinDir%\system32 directory and then execute it. W32.Blaster.Worm does not have a mass-mailing functionality.
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least
Copyright © 1996-2018 by Dr. Nikolai Bezroukov. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) in the author free time and without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info|
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: September 12, 2017