Bug 14120 - rpcclient binding string ignores transport and port
Summary: rpcclient binding string ignores transport and port
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.10.8
Hardware: All All
: P5 minor (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-09 14:33 UTC by Karim Kanso
Modified: 2019-09-09 14:38 UTC (History)
1 user (show)

See Also:


Attachments
Image of connection issue (519.04 KB, image/png)
2019-09-09 14:33 UTC, Karim Kanso
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karim Kanso 2019-09-09 14:33:37 UTC
Created attachment 15463 [details]
Image of connection issue

Bug related to changes in bug 11428 [1] - "dcerpc binding string options are nowhere documented".

The binding strings as documented in the man page for rpcclient do not work.

Namely, I have been attempting to use "ncacn_ip_tcp:x.x.x.x[135]" to connect directly to the MS-RPC service using DCERPC. Instead, rpcclient attempts to connect on port 445 and then on port 139 using SMB. I.e., it behaves if the binding string specified was "ncacn_np:x.x.x.x".

Please see attached image of a Wireshark capture next to the command execution.

I have taken preliminary look over the code of rpcclient.c [2] and it does appear that both the transport and port from when the binding string is parsed are not passed into cli_full_connection function call. Instead the port can be specified using the command line option '-p'.

Probably the easiest course of action is to clarify in the man page that the transport ncacn_ip_tcp is not supported.

[1]. https://bugzilla.samba.org/show_bug.cgi?id=11428
[2]. https://github.com/samba-team/samba/blob/v4-11-stable/source3/rpcclient/rpcclient.c