<div dir="ltr">For Bro 2.5, I&#39;d like to add some more functionality to the Windows Portable Executable analyzer. I think there&#39;s a lot of valuable data that could be extracted, but the format is rather challenging to work with. Some protocol pseudocode would be:<div><br></div><div>&gt; 0000: import_address_table is at 0010</div><div>&gt; 0010: entry #1 is at 0030</div><div>&gt; 0020: entry #2 is at 0050</div><div>&gt; 0030: entry #1 address is at 0100</div><div>&gt; 0040: entry #1 name is at 0110</div><div>&gt; 0050: entry #2 address is at 0140</div><div>&gt; 0060: entry #2 name is at 0120</div><div><br></div><div>Much of the data is simply pointers to offsets in the file where the actual data resides. My thought for parsing this is to write two helper functions in C++:</div><div><br></div><div>&gt; jump_to_next_interesting_offset()<br></div><div>&gt; // Skips to the offset of the next thing I would like to parse</div><div><br></div><div>&gt; get_data_context_at_current_offset()<br></div><div><div>&gt; // Get contextual information for how to parse the current data</div><div>&gt; // (e.g. this is the the address of entry #1 in the import address table).</div></div><div><br></div><div>Does anyone have suggestions for what data structures I should use to store the necessary data? Storing the offsets shouldn&#39;t be very difficult, but each offset will need context associated with it in order to know how to parse it once the analyzer gets there, and how to associate the data residing there with data that&#39;s already been parsed.</div><div><br></div><div>Thanks,</div><div><br></div><div>  --Vlad</div><div><br></div><div><br></div></div>