From cca48c1a1029685672e1c25e39e8be2be947238f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 1 Feb 2019 18:51:53 +0100 Subject: docs: Document DCEPRC binding string for rpcclient Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Mon Feb 4 02:03:56 CET 2019 on sn-devel-144 --- docs-xml/manpages/rpcclient.1.xml | 74 +++++++++++++++++++++++++++++++++++---- librpc/binding-strings.txt | 53 +--------------------------- 2 files changed, 68 insertions(+), 59 deletions(-) diff --git a/docs-xml/manpages/rpcclient.1.xml b/docs-xml/manpages/rpcclient.1.xml index 1e167f8437c..93983ad8388 100644 --- a/docs-xml/manpages/rpcclient.1.xml +++ b/docs-xml/manpages/rpcclient.1.xml @@ -29,7 +29,7 @@ -U username[%password] -W workgroup -I destinationIP - server + BINDING-STRING|HOST @@ -52,12 +52,72 @@ - server - NetBIOS name of Server to which to connect. - The server can be any SMB/CIFS server. The name is - resolved using the line from smb.conf - 5. - + BINDING-STRING|HOST + + When connecting to a dcerpc service you need to + specify a binding string. + + The format is: + + TRANSPORT:host[options] + + where TRANSPORT is either ncacn_np (named pipes) for SMB or + ncacn_ip_tcp for DCERPC over TCP/IP. + + "host" is an IP or hostname or netbios name. If the binding + string identifies the server side of an endpoint, "host" may be + an empty string. See below for more details. + + "options" can include a SMB pipe name if using the ncacn_np + transport or a TCP port number if using the ncacn_ip_tcp transport, + otherwise they will be auto-determined. + + Examples: + + + ncacn_ip_tcp:samba.example.com[1024] + ncacn_ip_tcp:samba.example.com[sign,seal,krb5] + ncacn_ip_tcp:samba.example.com[sign,spnego] + ncacn_np:samba.example.com + ncacn_np:samba.example.com[samr] + ncacn_np:samba.example.com[samr,sign,print] + ncalrpc:/path/to/unix/socket + //SAMBA + + + The supported transports are: + + + ncacn_np - Connect using named pipes + ncacn_ip_tcp - Connect over TCP/IP + ncalrpc - Connect over local RPC (unix sockets) + + + The supported options are: + + + sign - Use RPC integrety autentication level + seal - Enable RPC privacy (encryption) autentication level + connect - Use RPC connect level authentication (auth, but no sign or seal) + packet - Use RPC packet authentication level + + spnego - Use SPNEGO instead of NTLMSSP authentication + ntlm - Use plain NTLM instead of SPNEGO or NTLMSSP + krb5 - Use Kerberos instead of NTLMSSP authentication + schannel - Create a schannel connection + + smb1 - Use SMB1 for named pipes + smb2 - Use SMB2/3 for named pipes + + validate - Enable the NDR validator + print - Enable debug output of packets + padcheck - Check reply data for non-zero pad bytes + bigendian - Use big endian for RPC + ndr64 - Use NDR64 for RPC + + + + diff --git a/librpc/binding-strings.txt b/librpc/binding-strings.txt index 5503da107b4..ca3d1b65972 100644 --- a/librpc/binding-strings.txt +++ b/librpc/binding-strings.txt @@ -1,55 +1,4 @@ DCERPC binding strings ---------------------- -When connecting to a dcerpc service you need to specify a binding -string. - -The format is: - - TRANSPORT:host[flags] - -where TRANSPORT is either ncacn_np for SMB or ncacn_ip_tcp for RPC/TCP - -"host" is an IP or hostname or netbios name. If the binding string -identifies the server side of an endpoint, "host" may be an empty -string. - -"flags" can include a SMB pipe name if using the ncacn_np transport or -a TCP port number if using the ncacn_ip_tcp transport, otherwise they -will be auto-determined. - -other recognised flags are: - - sign : enable ntlmssp signing - seal : enable ntlmssp sealing - spnego : use SPNEGO instead of NTLMSSP authentication - krb5 : use KRB5 instead of NTLMSSP authentication - connect : enable rpc connect level auth (auth, but no sign or seal) - validate : enable the NDR validator - print : enable debugging of the packets - bigendian : use bigendian RPC - padcheck : check reply data for non-zero pad bytes - - -Here are some examples: - - ncacn_np:myserver - ncacn_np:myserver[samr] - ncacn_np:myserver[\pipe\samr] - ncacn_np:myserver[/pipe/samr] - ncacn_np:myserver[samr,sign,print] - ncacn_np:myserver[sign,spnego] - ncacn_np:myserver[\pipe\samr,sign,seal,bigendian] - ncacn_np:myserver[/pipe/samr,seal,validate] - ncacn_np: - ncacn_np:[/pipe/samr] - ncacn_ip_tcp:myserver - ncacn_ip_tcp:myserver[1024] - ncacn_ip_tcp:myserver[sign,seal] - ncacn_ip_tcp:myserver[spnego,seal] - - -IDEA: Maybe extend UNC names like this? - - smbclient //server/share - smbclient //server/share[sign,seal,spnego] +Please consult the rpcclient(1) manpage for binding string details. -- cgit v1.2.1