# new Bro pre-release available - 0.7a90

**URL:** <https://community.zeek.org/t/new-bro-pre-release-available-0-7a90/177>\
**Category:** Zeek\
**Created:** [September 6, 2001, 8:08pm UTC](https://community.zeek.org/t/new-bro-pre-release-available-0-7a90/177 "2001-09-06T20:08:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vern](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/vern/32/630_2.png) [@Vern](https://community.zeek.org/u/Vern)\
**Post date:** [September 6, 2001, 8:08pm UTC](https://community.zeek.org/t/new-bro-pre-release-available-0-7a90/177/1 "2001-09-06T20:08:07Z")

</div>

A new Bro pre-release is now available from:

&nbsp;&nbsp;ftp://ftp.ee.lbl.gov/.vp-bro-pub-0.7a90.tar.gz

The main theme of this release is better state management, especially for  
use in high-volume sites. There are now a number of ways to track the  
resources consumed by Bro while it runs, and to reduce the amount of memory  
Bro consumes. Adding

&nbsp;&nbsp;@load print-resources

will log a summary of the resources consumed by Bro when it exits, and

&nbsp;&nbsp;@load reduce-memory

will change a number of default values in order to significantly diminish  
the amount of memory Bro requires.

Other ways to lower the required memory:

&nbsp;&nbsp;- The global "maintain\_http\_sessions" now controls whether  
&nbsp;&nbsp;&nbsp;&nbsp;http.bro tracks multiple HTTP connections between the same  
&nbsp;&nbsp;&nbsp;&nbsp;hosts as a single HTTP session. Doing so costs a considerable  
&nbsp;&nbsp;&nbsp;&nbsp;amount of state (so set to F for reducing the memory impact  
&nbsp;&nbsp;&nbsp;&nbsp;of HTTP analysis).

&nbsp;&nbsp;- The global "suppress\_scan\_checks", if true, turns off address  
&nbsp;&nbsp;&nbsp;&nbsp;and port scan detection. (You can't achieve this by simply  
&nbsp;&nbsp;&nbsp;&nbsp;not @load'ing scan.bro, because it's loaded by some of the  
&nbsp;&nbsp;&nbsp;&nbsp;default policy scripts.) Turning it off can save a lot of memory.

&nbsp;&nbsp;- Note, the ident.bro is also expensive in terms of state-holding.

A summary of other changes with respect to the last snapshot:

&nbsp;&nbsp;- New library functions:

&nbsp;&nbsp;&nbsp;&nbsp;- resource\_usage() returns a record detailing real time,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPU time, memory, other getrusage info, and the current  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and maximum number of TCP/UDP/ICMP connections, and  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timers and fragments.

&nbsp;&nbsp;&nbsp;&nbsp;- val\_size() returns the size in bytes needed to represent  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a given value (which can be a record, a table, or a  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;simple constant, for example). It's not fully accurate  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but is in the right ballpark.

&nbsp;&nbsp;&nbsp;&nbsp;- global\_sizes() return a table mapping every global  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;variable to its size (per val\_size()). Useful for  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tracking which ones are growing large over time.

&nbsp;&nbsp;- You can now control a number of timers related to Bro's connection  
&nbsp;&nbsp;&nbsp;&nbsp;management. Setting them to lower values generally decreases the  
&nbsp;&nbsp;&nbsp;&nbsp;amount of state Bro has to keep (see reduce-memory.bro), though  
&nbsp;&nbsp;&nbsp;&nbsp;this can also make it easier for an attacker to evade detection:

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_SYN\_timeout: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Controls how long Bro waits after seeing the  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beginning of a connection (whether due to a SYN  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;or not; the timer is misnamed) before checking  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;whether it elicited any reply.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_session\_timer: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;After a connection has closed, wait this long for  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;further activity before checking whether to time  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;out its state.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_connection\_linger: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When checking a closed connection for further  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activity, Bro should consider it inactive if there  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hasn't been any for this long. It also complains  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if the connection is reused before this much time  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;has elapsed.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_attempt\_delay: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bro waits this long upon seeing an initial SYN  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;before timing out the connection attempt.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_close\_delay: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upon seeing a normal connection close, Bro flushes  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state after this much time.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_reset\_delay: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Upon seeing a RST, Bro flushes state after this  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;much time.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_partial\_close\_delay: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bro generates a connection\_partial\_close event this  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;much time after one half of a partial connection  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;closes, assuming there has been no subsequent  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activity.

&nbsp;&nbsp;&nbsp;&nbsp;non\_analyzed\_lifetime: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If a connection belongs to an application that you  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;aren't analyzing, Bro times it out after this  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interval. If 0 secs (default), then it doesn't  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time it out.

&nbsp;&nbsp;&nbsp;&nbsp;dns\_session\_timeout: interval  
&nbsp;&nbsp;&nbsp;&nbsp;ntp\_session\_timeout: interval  
&nbsp;&nbsp;&nbsp;&nbsp;rpc\_timeout: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bro waits this long before timing out a DNS/NTP/RPC  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request.

&nbsp;&nbsp;&nbsp;&nbsp;max\_timer\_expires: count  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of timers to expire after  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processing each new packet. The value trades off  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;spreading out the timer expiration load with  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;possibly having to hold state longer. A value of 0  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;means "process all expired timers with each new  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;packet".

&nbsp;&nbsp;- Two new flags control other facets of Bro's connection management,  
&nbsp;&nbsp;&nbsp;&nbsp;and thus state-holding:

&nbsp;&nbsp;&nbsp;&nbsp;partial\_connection\_ok: bool  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Whether Bro should analyze connections for which  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;it doesn't see the beginning, only the middle.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This can be very expensive to do in the face of  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stealth-scanning, which looks like a bunch of  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;partial connections.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note, the HTTP analyzer has been modified to  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;now always skip partial connections. This should  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;instead be user controllable.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_SYN\_ack\_ok: bool  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If true, Bro instantiates connection state when  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;it sees a SYN ack but not the initial SYN (even  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if partial\_connection\_ok is false). The intent  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;behind this knob (which is not well tested) is  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to allow you to filter out initial SYNs and only  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;react to SYN acks. This keeps Bro from holding  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;state during SYN scans and SYN flooding, except  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for when the destination responds.

&nbsp;&nbsp;- Some other miscellaneous thresholds that you can now modify  
&nbsp;&nbsp;&nbsp;&nbsp;from your policy script:

&nbsp;&nbsp;&nbsp;&nbsp;heartbeat\_interval: count  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;How often to generate net\_stats\_update() events.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This timer really isn't needed any more, since  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;you can use "schedule" to achieve the same effect.

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_storm\_thresh: count  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If Bro sees this many FINs/RSTs in a row, it  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flags them as a "storm".

&nbsp;&nbsp;&nbsp;&nbsp;tcp\_storm\_interarrival\_thresh: interval  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The FINs/RSTs must come with this much time or less  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;between them.

&nbsp;&nbsp;- The state management for line-oriented applications like HTTP  
&nbsp;&nbsp;&nbsp;&nbsp;requests has been improved.

&nbsp;&nbsp;- The HTTP analyzer now expands %hex sequences. If anyone has  
&nbsp;&nbsp;&nbsp;&nbsp;a Unicode expander to contribute, that'd be terrific.

&nbsp;&nbsp;- The Code Red detection is more robust (fewer false positives).

&nbsp;&nbsp;- A new redefinable variable, skip\_services, lists applications  
&nbsp;&nbsp;&nbsp;&nbsp;that should not be analyzed for purposes of detecting scans.  
&nbsp;&nbsp;&nbsp;&nbsp;(Default: ident) The point of having this (poorly named) hook  
&nbsp;&nbsp;&nbsp;&nbsp;is so that code-red.bro can add "http" to it, to avoid reporting  
&nbsp;&nbsp;&nbsp;&nbsp;the zillions of Code Red scans that a site can see.

&nbsp;&nbsp;- Bro now matches regular expressions using lazy DFA evaluation.  
&nbsp;&nbsp;&nbsp;&nbsp;The upshot of this is (1) it no longer maintains .bro-RE-cache.v1,  
&nbsp;&nbsp;&nbsp;&nbsp;(2) it starts up fast regardless of whether you've added new  
&nbsp;&nbsp;&nbsp;&nbsp;regular expressions, (3) you can afford to add lots of regular  
&nbsp;&nbsp;&nbsp;&nbsp;expressions, and (4) it's actually a bit faster.

&nbsp;&nbsp;- The list of "hot\_ids" has been expanded with a number of other  
&nbsp;&nbsp;&nbsp;&nbsp;common root-privileged accounts.

- Vern

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:36pm UTC](https://community.zeek.org/t/new-bro-pre-release-available-0-7a90/177/2 "2022-05-06T15:36:21Z")

</div>


