View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Yee Man Chan > DCE-RPC > DCE::RPC



Annotate this POD

View/Report Bugs
Module Version: 0.11   Source  


DCE::RPC - Perl extension for DCE RPC protocol composer/parser


use DCE::RPC; use Authen::Perl::NTLM qw(lm_hash nt_hash);

use constant DCOM_IREMOTEACTIVATION => pack("H32", "B84A9F4D1C7DCF11861E0020AF6E7C57");

use constant DCOM_IF_VERSION => 0x00;

use constant DCOM_XFER_SYNTAX => pack("H32", "045D888AEB1CC9119FE808002B104860");

use constant DCOM_XFER_SYNTAX_VERSION => 0x02;

    $passwd = "passwd";
    $lm_hpw = lm_hash($passwd);
    $nt_hpw = nt_hash($passwd);
    $ntlm = new_client Authen::Perl::NTLM($lm_hpw, nt_hpw);
    $rpc_host = "";
    $rpc_port = 135;
    $rpc = new DCE::RPC($rpc_host, $rpc_port, $ntlm);
    $bind_msg = $rpc->rpc_bind_ack_resp(1, DCOM_IREMOTEACTIVATION, DCOM_IF_VERSION,
        ({'interface' => DCOM_XFER_SYNTAX, 'version' => DCOM_XFER_SYNTAX_VERSION}));
    $request_msg = $rpc->rpc_co_request("Hi, there! This is Stub!", 1, 0x0e, DCOM_IREMOTEACTIVATION, "Authentication Credentials");
    $response_msg = $rpc->rpc_request_response($request_msg);
    $alt_ctx_msg = $rpc->rpc_alt_ctx(1, DCOM_IREMOTEACTIVATION . DCOM_IF_VERSION
        ({'interface' => DCOM_XFER_SYNTAX, 'version' => DCOM_XFER_SYNTAX_VERSION}));


The DCE RPC protocol is an application level protocol from OpenGroup that allows applications to do Remote Procedure Calls. It is the underlying wire protocol for DCOM (Distributed Common Object Model) by Microsoft.

This module was motivated by an reverse-engineering effort on a DCOM client. Therefore, functions that are implemented gear more toward client side implementation. Also, the initial version only supports Connection Oriented version of DCE RPC. It also assumes NTLMSSP as the underlying authentication protocol. This can change based on the input of the users of this modules.


In general, it depends on the authentication module. Since we only support NTLM, you have to install it first to use it. Currently, it requires Authen-Perl-NTLM-0.10.


1) The version of DCE RPC Connection Oriented protocol supported is 5.0.

2) NTLM is the only supported authentication scheme.

3) AUTH_LEVEL_CONNECT is the authentication level of choice.

4) Network Data Representation (NDR) is assumed to be ASCII for characters, little endian for integers and IEEE for floating points.

5) Call Id is always zero. It seems to me my client works regardless of the value of call id.


1) Support fragmented CO Requests.

2) Implement Connection Oriented server side functions.

3) Implement Connection-less functions.

4) Implement the module in C.


Nothing known.


This implementation was written by Yee Man Chan ( Copyright (c) 2002 Yee Man Chan. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


Authen::Perl::NTLM(3), perl(1), m4(1).

syntax highlighting: