1 # Conformance file for EVENTLOG
4 HF_FIELD hf_eventlog_Record "Record" "eventlog.Record" FT_NONE BASE_NONE NULL 0 "" "" ""
5 HF_FIELD hf_eventlog_Record_length "Record Length" "eventlog.Record.length" FT_UINT32 BASE_DEC NULL 0 "" "" ""
6 HF_FIELD hf_eventlog_Record_source_name "Source Name" "eventlog.Record.source_name" FT_STRING BASE_NONE NULL 0 "" "" ""
7 HF_FIELD hf_eventlog_Record_computer_name "Computer Name" "eventlog.Record.computer_name" FT_STRING BASE_NONE NULL 0 "" "" ""
8 HF_FIELD hf_eventlog_Record_string "string" "eventlog.Record.string" FT_STRING BASE_NONE NULL 0 "" "" ""
10 MANUAL eventlog_dissect_element_ReadEventLogW_data_
11 MANUAL eventlog_dissect_element_Record_sid_length
12 MANUAL eventlog_dissect_element_Record_sid_offset
13 MANUAL eventlog_dissect_element_Record_source_name
14 MANUAL eventlog_dissect_element_Record_computer_name
15 MANUAL eventlog_dissect_element_Record_num_of_strings
16 MANUAL eventlog_dissect_element_Record_stringoffset
17 MANUAL eventlog_dissect_element_Record_strings
19 NOEMIT eventlog_dissect_element_Record_strings_
20 NOEMIT eventlog_dissect_element_ReadEventLogW_data__
22 # policyhandle tracking
23 # This block is to specify where a policyhandle is opened and where it is
24 # closed so that policyhandles when dissected contain nice info such as
25 # [opened in xxx] [closed in yyy]
27 # Policyhandles are opened in these functions
28 PARAM_VALUE eventlog_dissect_element_OpenEventLogW_handle_ PIDL_POLHND_OPEN
29 PARAM_VALUE eventlog_dissect_element_OpenBackupEventLogW_handle_ PIDL_POLHND_OPEN
30 # Policyhandles are closed in these functions
31 PARAM_VALUE eventlog_dissect_element_CloseEventLog_handle_ PIDL_POLHND_CLOSE
33 TYPE lsa_String "offset=dissect_ndr_counted_string(tvb, offset, pinfo, tree, di, drep, @HF@, @PARAM@);" FT_STRING BASE_NONE 0 NULL 4
39 eventlog_dissect_element_ReadEventLogW_data_(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
44 if(di->conformant_run){
45 /*just a run to handle conformant arrays, nothing to dissect */
49 offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep,
50 hf_eventlog_Record_length, &len);
52 /* Create a new tvb so that we know that offset==0 is the beginning
53 * of the record. We need to know this since the data is not really
54 * NDR encoded at all and there are byte offsets into this buffer
57 record_tvb=tvb_new_subset_length_caplen(tvb, offset, MIN((int)len, tvb_captured_length_remaining(tvb, offset)), len);
58 eventlog_dissect_struct_Record(record_tvb, 0, pinfo, tree, di, drep, hf_eventlog_Record, 0);
65 /* sid_length and sid_offset handled by manual code since this is not NDR
66 and we want to dissect the sid from the data blob */
67 static uint32_t sid_length;
69 eventlog_dissect_element_Record_sid_length(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
72 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_sid_length,&sid_length);
77 eventlog_dissect_element_Record_sid_offset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
79 uint32_t sid_offset=0;
80 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_sid_offset,&sid_offset);
82 if(sid_offset && sid_length){
85 /* this blob contains an NT SID.
86 * tvb starts at the beginning of the record.
88 sid_tvb=tvb_new_subset_length_caplen(tvb, sid_offset, MIN((int)sid_length, tvb_captured_length_remaining(tvb, offset)), sid_length);
89 dissect_nt_sid(sid_tvb, 0, tree, "SID", NULL, -1);
96 eventlog_dissect_element_Record_source_name(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, dcerpc_info *di _U_, uint8_t *drep _U_)
100 len=tvb_unicode_strsize(tvb, offset);
101 proto_tree_add_item(tree, hf_eventlog_Record_source_name, tvb, offset, len, ENC_UTF_16|ENC_LITTLE_ENDIAN);
108 eventlog_dissect_element_Record_computer_name(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, dcerpc_info *di _U_, uint8_t *drep _U_)
112 len=tvb_unicode_strsize(tvb, offset);
113 proto_tree_add_item(tree, hf_eventlog_Record_computer_name, tvb, offset, len, ENC_UTF_16|ENC_LITTLE_ENDIAN);
120 eventlog_dissect_element_Record_num_of_strings(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info* di, uint8_t *drep, uint16_t *num_of_strings)
123 offset = dissect_ndr_uint16(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_num_of_strings,num_of_strings);
128 static uint32_t string_offset;
131 eventlog_dissect_element_Record_stringoffset(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, uint8_t *drep)
134 offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, di, drep, hf_eventlog_eventlog_Record_stringoffset,&string_offset);
140 eventlog_dissect_element_Record_strings(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, dcerpc_info* di _U_, uint8_t *drep _U_, uint16_t *num_of_strings)
142 while(string_offset && *num_of_strings){
145 len=tvb_unicode_strsize(tvb, string_offset);
146 proto_tree_add_item(tree, hf_eventlog_Record_string, tvb, string_offset, len, ENC_UTF_16|ENC_LITTLE_ENDIAN);