[Bro-Dev] [JIRA] (BIT-1240) TCP gaps inserted in wrong place

Jimmy Jones (JIRA) jira at bro-tracker.atlassian.net
Wed Sep 10 08:02:07 PDT 2014

    [ https://bro-tracker.atlassian.net/browse/BIT-1240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18007#comment-18007 ] 

Jimmy Jones commented on BIT-1240:

Yes, my math was a bit off! Have tested it with my samples and it works great, thanks!

My use case, where I stumbled across the issue, was where I was receiving http_entity_data events and also content_gap events so I could reconstruct a POST or response, and punch the holes in the right place. However the content_gap event didn't occur "in order" with http_entity_data (in this case before the content_gap occurred before all of the http_entity_data). Would you like me to raise a separate issue for this, or keep it here?

> TCP gaps inserted in wrong place
> --------------------------------
>                 Key: BIT-1240
>                 URL: https://bro-tracker.atlassian.net/browse/BIT-1240
>             Project: Bro Issue Tracker
>          Issue Type: Problem
>          Components: Bro
>    Affects Versions: git/master, 2.3
>         Environment: CentOS 6
>            Reporter: Jimmy Jones
>             Fix For: 2.4
>         Attachments: get-hole1.trace
> Using attached test file, I tried using the file analysis framework to extract out the payload, which is a copy of one of the bro testcases but with a packet removed.
> However the extracted file has nulls padded at the beginning, but they should be at offset 1448. Looking at what happens, the gap is signalled to File::Gap before the data is received in File::DataIn, which calculates the offset to write the payload by adding the seen bytes to the missing byte count. Should gaps always be signalled in order with the data - this also affects users of content_gap, who would receive the data and hole "out of order"?
> Used the following bro script:
> event file_new(f: fa_file)
> {
>   Files::add_analyzer(f, Files::ANALYZER_EXTRACT, [$extract_filename=f$id]);
> }

This message was sent by Atlassian JIRA

More information about the bro-dev mailing list