20 Jan 2007 08:46
[Devel]: TDR layer decoding in ndrdump
Julien Kerihuel <j.kerihuel <at> openchange.org>
2007-01-20 07:46:54 GMT
2007-01-20 07:46:54 GMT
Morning all, I've been working on a way to include TDR layer decoding in ndrdump. Here's a reminder on how we currently decode EcDoRpc packets: NDR layer: EcDoRpc subcontext with obfuscation: MAPI_DATA TDR layer: MAPI_DATA content (uint8 *) Until now when running ndrdump on known EcDoRpc packets when had a blob of data displayed rather than the decoded structure implemented in the IMAPISession idl. In order to add TDR layer, I have modified ndr_mapi.c and the function ndr_print_MAPI_DATA - casted the uint8_t *content + other fields to fit in a MAPI_REQ or MAPI_REPL structure. The only real problem I had was how to keep the inout state at ElementLevel. At first I based the inout check on the EcDoRpc_action value, but this naming is wrong and Fabien provided me rpcsniff reports where we have 0x0 both for in and out packets. So we can't rely on this field and we'll need to change the IDL. Finally I modified the Samba4/NDR/Parser.pm to add the NDR_IN and NDR_OUT flags to the ndr->flags field (patch in attachment). There's maybe a better way to proceed and the patch may induce unwanted side effects I didn't notice. Jelmer do you see another way to handle this or is the current one correct?(Continue reading)
RSS Feed