Showing posts with label development. Show all posts
Showing posts with label development. Show all posts

Thursday, April 23, 2020

Snort++ beta available now

The final beta version of Snort 3 is available now. Due to some internal constraints, the version is 3.0.1, but it is not the first official 3.0 release. The 3.0 release candidate is planned for later this year.

There are many changes since the last update. Here are a few highlights:

  • Several tweaks files are available to quickly configure your security posture relative to the default configuration.
  • The C++ compiler supported feature set requirement is now C++14.
  • A new VXLAN codec is available.
  • Improved content literal searches with updated Boyer-Moore and Hyperscan alternatives.
  • The HTTP/2 inspector is nearly complete.
  • Faster startup by using multiple threads to compile rule groups (Hyperscan only).
  • A new Talos logger is available.
  • More robust Lua error detection and whitelisting.
  • Numerous updates to enable on the fly reloading of most configurations.
  • A new network awareness inspector is added (RNA).
  • snort_config.lua and SNORT_LUA_PATH are eliminated for simpler configuration.

There are many other updates not mentioned. Check the ChangeLog for a summary of changes including new features, build and bug fixes and performance enhancements.

There are still lots of enhancements and new features planned for Snort++, some of which are already in development. As always, new downloads are posted to snort.org periodically. You can also get the latest updates from GitHub. Watch these repos to keep up with the latest:

  • snort3 – main codebase.
  • snort3_extra – plugin examples, experimental, and test code.
  • snort3_demo – a test suite demonstrating key features and including a performance analysis suite.
  • libdaq – the latest, greatest DAQ which is required for Snort 3.

You will also want to grab the latest registered Talos rule set.

Please submit bugs, questions, and feedback to Bugs or the Snort-Users mailing list.

Happy Snorting!
The Snort Release Team

Wednesday, August 29, 2018

Snort 3 beta available now!

We know our customers and community members have been waiting a while for this — so we are thrilled to announce that Snort 3 (build 247) is available in beta now. Snort 3 is a redesign of Snort 2 with a number of significant improvements.

Here are some highlights you should know about before downloading:
  • Configuration — We use LuaJIT for configuration. The config syntax is simple, consistent, and executable. LuaJIT plugins for rule options and loggers are supported, too.
  • Detection — We have worked closely with Cisco Talos to update rules to meet their needs, including a feature they call "sticky buffers." With the use of the Hyperscan search engine, regex fast patterns make rules faster and more accurate.
  • HTTP — We have a new and stateful HTTP inspector that currently handles 99 percent of the HTTP Evader cases, and will soon cover all of them. There are many new features, as well, including new rule options. HTTP/2 support is under development.
  • Performance — We have substantially increased performance for deep packet inspection.  Snort 3 supports multiple packet-processing threads, and scales linearly with a much smaller amount of memory required for shared configs, like rule engines.
  • JSON event logging — These can be used to integrate with tools such as the Elastic Stack.  See this blog post for more details.
  • Plugins — Snort 3 was designed to be extensible and there are over 225 of plugins of various types. It is easy to add your own codec, inspector, rule action, rule option, or logger.  SO rules are plugins, too, and it is much easier to add your own.
You can get Snort 3 from snort.org or from GitHub.

These packages / repositories are available:
  • snort3 — The main engine source code and plugins
  • snort3_extra — Other experimental and example plugins
  • snort3_demo — A test suite with working examples
We push updates to GitHub multiple times per week, and the master branch is always stable.

In addition to the cool new features, Snort 3 also supports all the capabilities of Snort 2.9.11, but we aren't done. Coming soon, we have:
  • Next generation DAQ
  • Connection events
  • Search engine acceleration
  • ... and much more.
Please submit bugs, questions, and feedback to bugs@snort.org or the Snort-Users mailing list.

Happy Snorting!
The Snort Release Team

Thursday, May 24, 2018

Snort++ Github Changes

The Snort++ project has moved to an organization account on github.  Please update your remote to pull directly from the new repo:

    https://github.com/snort3/snort3.git

Note that the old remote will be forwarded to the new repo automatically until you switch over.

In addition, there are now two new repos:

    https://github.com/snort3/snort3_demo.git
    https://github.com/snort3/snort3_extra.git

The demo repo provides a BATS test suite to validate and demonstrate various use cases.  It currently has over 50 tests and will continue to grow.  It is also a great way to report bugs with everything required for reproduction.  If you have other uses cases to contribute, please open a pull request.

The extra repo has the code that was in snort3/extra/.  It was split into a separate repo to make it easier to manage and completely optional.  This is a great place to add plugins you would like to contribute to the community.

Questions or suggestions about these repos should go to snort-devel@lists.snort.org.
 


Friday, March 16, 2018

Snort++ Update

Pushed build 244 to github (snortadmin/snort3:
  • appid: unit-tests for http detector plugins
  • build: address compiler warnings, spell check and static analyzer issues
  • build: extirpate autotools usage
  • build: fix compilation issue on FreeBSD with extra
  • byte_jump: updated byte_jump post_offset option to support variable
  • cmake: update CMake config to use GNUInstallDirs and match automake
  • daq: hext DAQ can generate start of flow and end of flow meta events
  • doc: add documentation for ftp telnet
  • doc: fix including config_changes.txt when ruby is not present
  • doc: update ftp time format link
  • doc: updates for HTTP/2
  • http_inspect: handle white space before chunk length
  • inspectors: probes run regardless of active policy
  • logger: update Hext Logger to subscribe and log DAQ Meta Packets
  • main: reload hosts while reloading config
  • memory: override C++14 delete operators as well
  • packet tracer: added ability to direct logging to file
  • perf_monitor: fixed flow_ip outputting erroneous values
  • perf_monitor: query modules for stats only after they have all loaded
  • snort: --rule-to-text [<delim>] raw string output
  • snort: allow colon separated directories for --daq-dir
  • snort: wrap SO_PUBLIC APIs (classes, functions exported public from snort) in the 'snort' namespace
Note that autotools support has been removed so you must use cmake to build.  If you have been using autotools, there is a configure_cmake.sh script available that functions similar to configure.

Tuesday, February 13, 2018

Snort++ Build 243 Available Now on Snort.org

A new release of Snort++ (build 243) is now available on snort.org which includes lots of new functionality and important bug fixes.  Here is an overview of the updates since the prior release:

Important changes since the last release:


  • build: dropping automake support - only cmake tarballs provided
    (automake files are still included but will be removed soon)

Issues reported by the community:

  • alert_json: various fixes
    thanks to Noah Dietrich for reporting the issues
  • appid: gracefully handle failed Lua state instantiation
    thanks to Noah Dietrich for reporting the issue
  • build: add STATIC to add_library call of port_scan to build it statically
    thanks to Fabrice Fontaine
  • cd_pbb: initial version of codec for 802.1ah
    thanks to jan hugo prins  for reporting the issue
  • cd_pflog: fix comments
    thanks to Markus Lude for the 2X patch
  • http_inspect: handle borked reassembly gracefully
    thanks to João Soares for reporting the issue
  • ips options: error if lookup fails due to bad case, typos, etc.
    thanks to Noah Dietrich   for reporting the issue

New Features:

  • alert_json: added json event logger
  • arp_spoof: added wlan support
  • binder: added zones, network policy selection
  • daq: add support for DAQ_VERDICT_RETRY
  • daq: add support for packet trace
  • daq: add support tunnel bypass for IP 4IN4, IP 6IN6, GRE and MPLS by config and flags
  • dce_smb: added unicode filename support
  • file policy: add support for file event logging
  • http_inspect: added http_raw_buffer rule option
  • inspectors: added peg count for max concurrent sessions
  • loggers: added base64 encoder based on libb64 from devolve
  • modules: add usage designating global, context, inspect, or detect policy applicability
  • mss: add extra rule option to check mss
  • port_scan: add alert_all to make alerting on all events in window optional
  • snort2lua: --bind-wizard will add a trailing binding to the default wizard in each binder
  • snort2lua: convert file_magic.conf to Lua format.
  • snort2lua: bindings now merge and propagate to top level of corresponsing policy
  • snort2lua: '# alert' rules and pass comments in *.rules files
  • snort: -T does not compile mpse; --mem-check does
  • snort: add --dump-msg-map
  • snort: add warnings count to -T ouptut
  • target: add rule option to indicate target of attack
  • unified2: add legacy_events bool for out-of-date barnyard2
  • wscale: add extra rule option to check tcp window scaling

Bug Fixes:

  • byte_test: fixed string bounds check
  • content: fixed relative loop condition
  • dce: use service names from rules (dce_smb = netbios-ssn; dce_tcp / ce_udp = dcerpc)
  • detection: fixed option tree looping issue
  • detection: use detection limit (alt_dsize)
  • http_inspect: HTTP headers no longer avoid detection when message unexpectedly ends after status line or headers
  • http_inspect: apply request/response depth to packet data
  • pcre: fixed relative search with ^
  • shell: fixed --pause to accept control commands while in paused state
  • snort2lua: no sticky buffer for relative pcre
  • snort: fixed --dump-builtin-rules to accept optional module prefix
  • u2spewfoo: fixed build on FreeBSD
There are many other updates not mentioned.  Check the ChangeLog for a summary of changes including new features and build and bug fixes.

There are lots of enhancements and new features planned for Snort++, some of which are already in development.  As always, new downloads are posted to snort.org periodically.  You can also get the latest updates from github (snortadmin/snort3) which is updated weekly.

Please submit bugs, questions, and feedback to bugs@snort.org or the Snort-Users mailing list.

Happy Snorting!
The Snort Release Team

Friday, December 15, 2017

Snort++ Update

Pushed build 241 to github (snortadmin/snort3).  Another big list:
  • alert_csv: various fixes to match alert_json
  • alert_json: tcp_ack, tcp_seq, and tcp_win are (base 10) integers
  • alert_json: various fixes
    thanks to Noah Dietrich <noah_dietrich@86penny.org> for reporting the issues
  • appid: close all Lua states when thread exits
  • appid: gracefully handle failed Lua state instantiation
    thanks to Noah Dietrich <noah_dietrich@86penny.org> for reporting the issue.
  • appid: only update session flags and discovery state if service id actually set to http
  • appid: patch to update the appid discovery state when an http event results in setting of the      service id for a flow
  • appid: return false from is_third_party_appid_available when no third party module is available.
  • appid: tweak warnings and errors
  • binder: activate profiler support
  • binder: add FIXIT re creating default bindings when the wizard is not configured
  • binder: fix ingress / egress test
  • binder: minor perf and readability tweaks
  • build: fixed build issues on OSX with clang with cd_pbb, alert_json
  • build: fixed several dyanmic modules on OSX / clang
  • build: suppress appid warnings for valid case statement fall throughs
  • byte_test: fix string bounds check
  • catch: Update to Catch v2.0.1
  • cmake: add --define to configure_cmake.sh for arbitrary defines
  • codec: added wlan support for arp_spoof
  • codec: updated MIPv6 and merged cd_pim.cc, cd_swpie.cc and cd_sun_ud.cc to cd_bad_proto.cc
    thanks to schrx3b6 for reporting the issue
  • conf: remove OPTIONS from SIP and HTTP spells to avoid confusion with RTSP
  • conf: remove client to server spells for FTP, IMAP, POP, and SMTP to avoid false pickups
  • control: must execute from default policy only
  • control: process flow first
  • cppcheck: More miscellaneous fixes, mostly for new Catch
  • daq: explicitly initialize more fields in SFDAQInstance constructor
  • daq: handle real IP and port
  • data_bus: also publish to default policy
  • data_bus: refactor basic access for pub / sub
  • dce: use service names from rules (dce_smb = netbios-ssn; dce_tcp / dce_udp = dcerpc)
  • detection: fix option tree looping issue
  • detection: rename ServiceInfo to SignatureServiceInfo
  • doc: fix type in style section
  • doc: update default manuals
  • file api: move file verdict enforcement out of file policy
  • file api: support file verdict delay during signature lookup
  • file policy and file config update to allow user define customized file policy through file api
  • file policy: add support for file event logging
  • file_api: Set the FileContext verdict, not a local verdict
  • file_id: add back the ref count for file config
  • file_id: add interface to access file info from file capture
  • file_id: support groups
  • hash: Rename SFGHASH, SFXHASH, SFHASHFCN to something resonable
  • http_inspect: add profiler support
  • http_inspect: fix bugs related to stream interaction
  • http_inspect: use configured max_pdu as base target reassembly size
  • inspection: default policy mode depends on adaptor mode
  • ips options: error if lookup fails due to bad case, typos, etc.
    thanks to Noah Dietrich <noah_dietrich@86penny.org> for reporting the issue
  • memory: no stats output unless configured
  • normalizer: added test mode
  • normalizer: fix enable checks
  • parsing: resolve paths from the current config directory instead of process directory
  • policy: added inspection policy config.
  • port_scan: add alert_all to make alerting on all events in window optional
  • port_scan: fix flow checks
  • profiler: fix focus of eventq
  • reputation: tweak warning message
  • rules: default msg = "no msg in rule"
  • sfrt: remove cruft and reformat header
  • shell: fixed crash when issuing control commands
  • sip: use log splitter for tcp
  • snort2lua: --bind-wizard will add a trailing binding to the default wizard in each binder
  • snort2lua: Convert file_magic.conf to Lua format.
  • snort2lua: added inspection uuid
  • snort2lua: added na_policy_mode. added ability amend tables if created.
  • snort2lua: added normalize_tcp: ftp
  • snort2lua: fix stream_size: to_client, to_server conversion
  • snort2lua: future proof --bind-wizard binding order
  • snort2lua: no sticky buffer for relative pcre
  • snort2lua: remove when udp from binding to support tcp too
  • snort2lua: tweak const name for clarity (internal)
  • snort2lua: urilen:<> --> bufferlen:<=>
  • snort: do not dlclose plugins at shutdown during REG_TEST to avoid borked backtraces from LeakSanitizer
  • soid: allow stub to contain any or all options
  • --rule-to-*: use whole soid arg as suffix to rule and len identifiers; make static
  • stream: change tcp idle timeout to 3600 to match 2.X nominal timeout
  • stream_*: separate session profiler data from flow cache profiler data
  • stream_ip: fix non-frag counting
  • stream_size: fix eval packet checks
  • stream_tcp: delete superfluous memsets to zero
  • stream_tcp: ignore flush requests on unitialized sessions (early abort condition)
  • stream_tcp: instantiate wizard only when needed
  • stream_tcp: remove empty default state action
  • stream_user: clear splitter properly
  • target_based: Install header
  • wizard: abort if no match
  • wizard: activate profiler support
  • wizard: usage is inspect

Friday, November 3, 2017

Snort 3.0 with ElasticSearch, LogStash, and Kibana (ELK)

The Elastic Stack, consisting of Elasticsearch with Logstash and Kibana, commonly abbreviated "ELK", makes it easy to enrich, forward, and visualize log files.  ELK is especially good for getting the most from your Snort 3.0 logs.  This post will show you how to create a cool dashbaord:



The dashboard shows the following:
  • bring_da_heat - a heat map that plots event priority vs classification
  • apple_pie - a pie chart that shows total bytes transferred by app
  • greatest_hits - a data table that shows the rules generating the most events
  • global_hot_spots - a geo plot of the event source address*
  • size_o_gram - a histogram of logged packet / buffer sizes

Get Started

To get started, you will need to install the following:
Go ahead and get Snort 3.0 and ELK installed now if you haven't done so already.  There is plenty of help for that available elsewhere.  Some things to note:
  • The github repo is updated multiple times per week and the master branch is always clean so that is the best way to get Snort 3.0.
  • The base appid module is built into Snort 3.0 but you will need Open App ID to get the Lua detector plugins.
  • You can use the community rules in 3.0 format or translate other 2.X rules with snort2lua.

Run Snort

The next step is to get Snort running and generating events and app stats.  Add the following to the default config file (after the -c argument below):

appid =
{
    log_stats = true,
    app_detector_dir = 'ODP'
}

alert_json =
{
    fields = 'timestamp pkt_num proto pkt_gen pkt_len dir src_addr src_port dst_addr dst_port service rule priority class action b64_data'
}

The tokens in bold above and below are as follows:
  • ODP is the path where you installed Open App ID.  Note this path does not include the trailing /odp.
  • INSTALL is the install prefix you used when configuring your Snort 3.0 build.
  • RULES is the path containing the community rules.
  • PCAP is your favorite pcap.  You could use -i <iface> instead. 
This command will process your pcap and generate alerts.json and app_stats.log files in your current directory:

INSTALL/bin/snort \
-c INSTALL/etc/snort/snort.lua \
-R RULES/snort3-community.rules \
--plugin-path INSTALL/lib \
-r PCAP \
-A json -y -q > alerts.json

The JSON events are determined by the configured fields to look like this:

{ "timestamp" : "03/08/01-04:21:07.583700", "pkt_num" : 737, "proto" : "UDP", "pkt_gen" : "raw", "pkt_len" : 161, "dir" : "C2S", "src_addr" : "192.168.16.222", "src_port" : 3076, "dst_addr" : "239.255.255.250", "dst_port" : 1900, "service" : "unknown", "rule" : "1:1917:15", "priority" : 3, "class" : "Detection of a Network Scan", "action" : "allow", "b64_data" : "TS1TRUFSQ0ggKiBIVFRQLzEuMQ0KSG9zdDoyMzkuMjU1LjI1NS4yNTA6MTkwMA0KU1Q6dXJuOnNjaGVtYXMtdXBucC1vcmc6ZGV2aWNlOkludGVybmV0R2F0ZXdheURldmljZToxDQpNYW46InNzZHA6ZGlzY292ZXIiDQpNWDozDQoNCg==" }

The app stats are in csv format with Unix timestamp, app, bytes to client, and bytes to server:

1059733200,FTP Data,4441712,185694921

Run ELK

Now lets process these logs with the elastic stack.  Start by running elasticsearch and kibana as follows:

cd elasticsearch-5.5.1/
bin/elasticsearch -v &

cd kibana-5.5.1-darwin-x86_64
bin/kibana &

I've got version 5.5.1 of ELK installed on OS X.  Adjust your paths as needed for your install of ELK.  We are using the default ports of 9200 for elasticsearch and 5601 for kibana.  You may need to adjust on your system.

Now we are ready to send the logs to elasticsearch using logstash.  Get the config files here.  Edit alert_json.txt and alert_apps.txt and set the path on the 3rd line to point to your log files.  Then you can run logstash like this:

cd logstash-5.5.1/
bin/logstash -f snort_json.txt &
bin/logstash -f snort_apps.txt &

Visualize

The logstash commands will populate the logstash-snort3j and logstash-snort3a indexes in elasticsearch.  At this point we can start working on the dashboard using kibana.  Point your browser to http://localhost:5601/ and follow these steps:
  1.   Click on the gear (Management), Index Patterns, + Create Index Pattern, set the name logstash-snort3j, and then click Create.
  2.   Edit b64_data (click pencil on right), set Format = String and Transform = Base64 Decode, and then click Update Field.
  3.   Click on the gear (Management), Index Patterns, + Create Index Pattern, set the name logstash-snort3a, and then click Create.
  4.   Click the scripted fields tab, + Add Scripted Field, set Name = app_total_bytes and Script = doc['bytes_to_client'].value+doc['bytes_to_server'].value and then click Create Field.
At this point you can click on the icons on the left for Discover, Visualize, and Dashboard to view the raw data, create tables, charts, etc., and build a dashboard.  This is really best done by just exploring and experimenting, however you can import the dashboard shown above by clicking Management, Saved Objects, Import and selecting snort_dash.json.  Tip: base your visualizations off saved searches so that you don't lose them when the data is deleted.

snort_csv.txt is also provided for use with snort -A csv if you want to process alerts in csv format.  The index name for that is logstash-snort3.

* Snort 3.0 supports the target rule option, so use that instead of source address if your rules have targets.  That gets the attacker correct for shellcode, etc.










Wednesday, November 1, 2017

Snort++ Update

Pushed build 240 to github (snortadmin/snort3).  It's been a while since posting so this is a big list!
  • active: fix packet modify vs resize handling
  • alert_csv: rename dgm_len to pkt_len
  • alert_csv: add b64_data, class, priority, service, vlan, and mpls options
  • alert_json: initial json event logger
  • alerts: add log_references to store and log rule references with alert_full
  • appid: enable SSL certificate pattern matching
  • appid: fix build with LuaJIT 2.1
  • appid: reorganize AppIdHttpSession to minimize padding
  • appid: add count for applications detected by port only
  • appid: create exptected flow immediately after ftp PORT command for active mode
  • appid: handle sip events before packets
  • appid: overhaul peg counting for discovered appids
  • appid: use ac_full search method since it supports find_all; force enable dfa flag
  • binder: added network policy selection
  • binder: added zones
  • binder: allow src and dst specifications for ports and nets
  • binder: check interface on packet instead of flow
  • binder: fixed nets check falling through on failure
  • build: clean up a few ICC 2018 and GCC 7 warnings
  • build: fix linking against external libiconv with autotools
  • build: fix numerous analyzer errors and leaks
  • build: fix numerous clang-tidy warnings
  • build: fix numerous cppcheck warnings
  • build: fix numerous valgrind errors
  • build: fixed issues on OSX
  • catch: update to Catch v1.10.0
  • cd_icmp6: fix encoded cksum calculation
  • cd_pbb: initial version of codec for 802.1ah; thanks to jan hugo prins <jhp@jhprins.org> for      reporting the issue
  • cd_pflog: fix comments; thanks to Markus Lude <markus.lude@gmx.de> for the 2X patch
  • content: fix relative loop condition
  • control: delete the old binder while reloading inspector
  • control: update binder with new inspector
  • daq: add support for DAQ_VERDICT_RETRY
  • daq: add support for packet trace
  • daq: add support tunnel bypass for IP 4IN4, IP 6IN6, GRE and MPLS by config and flags
  • data_log: update to new http_inspect
  • dce_rpc: remove connection-oriented rules from dce_smb module
  • dce_smb: unicode filename support
  • doc: add module usage and peg count type
  • doc: add POP, IMAP and SMTP to user manual features
  • doc: add port scan feature
  • flow key: support associating router solicit/reply packets to a single session
  • http_inspect: HTTP headers no longer avoid detection when message unexpectedly ends after status  line or headers
  • http_inspect: add random increment to message body division points
  • http_inspect: added http_raw_buffer rule option
  • http_inspect: create message sections with body data that has been dechunked and unzipped but not otherwise nortmalized
  • http_inspect: handle borked reassembly gracefully; thanks to João Soares <joaopsys@gmail.com> for reporting the issue
  • http_inspect: support for u2 extra data logging
  • http_inspect: test tool improvements
  • http_inspect: true IP enhancements
  • inspectors: add control type and ensure appid is run ahead of other controls
  • inspectors: add peg count for max concurrent sessions
  • ips: add uuid
  • loggers: add base64 encoder based on libb64 from devolve
  • loggers: use standard year/mon/day format
  • main: fix potential memory leak when queuing analyzer commands
  • memory: align allocator metadata such that returned memory is also max_align_t-aligned
  • memory: output basic startup heap stats
  • messages: output startup warnings and errors to stderr instead of stdout
  • messages: redirect stderr to syslog as well
  • modules: add usage designating global, context, inspect, or detect policy applicability
  • mss: add extra rule option to check mss
  • parser: disallow invalid port range !:65535 (!any)
  • parser: tweak performance
  • pcre: fix relative search with ^
  • pop: service name is pop3
  • replace: fix activation sequence
  • rules: warn only once per gid:sid of no fast pattern
  • search_engine: port the optimized port table compilation from 2.9.12
  • search_engines: Fix case sensitive ac_full DFA matching
  • shell: delete inspector from the default inspection policy
  • shell: fix --pause to accept control commands while in paused state
  • sip: sip_method can use data from any sip inspector of any inspection policy
  • snort.lua: align default conf closer to 2.X
  • snort.lua: expand default conf for completeness and clarity
  • snort_defaults.lua: update default servers and ports
  • snort2lua: correctly identify ftpbounce and sameip as unsupported rule options
  • snort2lua: added XFF configuration to unsupported list
  • snort2lua: added config protected_content to deleted list
  • snort2lua: added config_na_policy_mode to unsupported list
  • snort2lua: added dynamicoutput to deleted list
  • snort2lua: added firewall to unsupported list
  • snort2lua: added nap.rules zone translation
  • snort2lua: added nap_selector support
  • snort2lua: added nap_selector to unsupported list
  • snort2lua: added sf_unified2 to unsupported list and matching log/alert to deleted.
  • snort2lua: bindings now merge and propagate to top level of corresponsing policy
  • snort2lua: config policy_id converts to when ips_policy_id
  • snort2lua: convert dsize:a<>b to dsize:a<=>b for consistency with other rule options
  • snort2lua: do not convert sameip; handle same as ftpbounce (no longer supported)
  • snort2lua: enforced ordering to bindings in binder table
  • snort2lua: fix null char in -? output
  • snort2lua: fixed extra whitespace generation
  • snort2lua: logto is not supported
  • snort2lua: removed port dce proxy bindings to fix http_inspect conflicts
  • snort2lua: search_engine.split_any_any now defaults to true
  • snort: -T does not compile mpse; --mem-check does
  • snort: add warnings count to -T ouptut
  • snort: add --dump-msg-map
  • snort: exit with zero from usage
  • snort: fix --dump-builtin-rules to accept optional module prefix
  • stdlog: support snort 3> log for text alerts
  • target: add rule option to indicate target of attack
  • thread: add logging directory ID offset controlled by --id-offset option
  • u2spewfoo: fix build on FreeBSD
  • unified2: add legacy_events bool for out-of-date barnyard2
  • unified2: log buffers as cooked packets with legacy events
  • wscale: add extra rule option to check tcp window scaling

Friday, July 28, 2017

Snort++ Build 239 Available Now on Snort.org

A new release of Snort++ is now available on Snort.org which includes lots of new functionality and important bug fixes.  Here is an overview of the updates since the prior release:

Important changes since the last release:
  • DAQ: version 2.2.2 now required
  • rules: removed sample.rules; Talos now publishes Snort 3 community rules on snort.org
  • rules: promoted metadata:service to a separate option since it is not metadata
  • mpse: removed Intel Soft CPM support (use Hyperscan!)
  • unified2: deprecated ip4 and ip6 specific events and added a single event for both
  • http_server: removed old inspector (use new http_inspect instead)
  • hyperscan: now require version >= 4.4.0
  • loggers: removed units options; all limits expressed in MB
Issues reported by the community:
  • logging: fixed handling of out of range timeval
    thanks to kamil@frankowicz.me for reporting the issue
  • rules: tolerate spaces in positional parameters
    thanks to Joao Soares for reporting the issue
  • search_engine: set range for max_queue_events parameter
    thanks to Navdeep.Uniyal@neclab.eu for reporting the issue
  • packet manager: ensure ether type proto ids don't masquerade as ip proto ids
    thanks to Bhargava Shastry  for reporting the issue
  • codec manager: fixed off-by-1 mapping array size
    thanks to Bhargava Shastry for reporting the issue
  • hyperscan: check runtime support
    thanks to justin.viiret@intel.com for submitting the patch
  • mpse: fixed issue with empty pattern database
    thanks to justin.viiret@intel.com for reporting the issue

New Features:
  • perf_monitor: added FlatBuffers output and JSON formatter
  • also added tool to convert FlatBuffers files to yaml
  • alerts: improved -A cmg formatting
  • numerous control socket and shell updates
  • byte_math and bitmask: ported rule option from 2X
  • regex: added fast_pattern; do not use for fast pattern unless explicitly indicated
  • detection: added new trace capability to debug rules
  • output: added packet trace feature
  • port_scan: now fully configurable
There are many other updates not mentioned.  Check the ChangeLog for a summary of changes including new features and build and bug fixes.

There are lots of enhancements and new features planned for Snort++, some of which are already in development.  As always, new downloads are posted to snort.org periodically.  You can also get the latest updates from github (snortadmin/snort3) which is updated weekly.

Please submit bugs, questions, and feedback to bugs@snort.org or the Snort-Users mailing list.

Happy Snorting!
The Snort Release Team

Thursday, July 13, 2017

Snort++ Update

Pushed build 237 to github (snortadmin/snort3):

  • build: add support for appending EXTRABUILD to the BUILD string
  • build: clean up some ICC 2017 warnings
  • build: clean up some GCC 7 warnings
  • build: support OpenSSL 1.1.0 API
  • build: clean up some cppcheck warnings
  • appid: port some missing 2.9.X FEAT_OPEN_APPID code
  • appid: fix thread-unsafe sharing of HTTP pattern tables
  • DAQ: fix leaking instance memory when configure fails
  • daq_hext and daq_file: pass PCI via query method
  • icmp6: reject non-ip6, raise 116:474
  • http_inspect: header normalization improvements
  • http_inspect: port fixes for UTF decoding
  • http_inspect: added 119:87 - 119:90 for expect / continue issues
  • http_inspect: added 119:91 for Transfer-Encoding header not valid for HTTP 1.0
  • http_inspect: added 119:92 for Content-Transfer-Encoding
  • http_inspect: added 119:93 for issues with chunked message trailers
  • PDF decompression: fix missing reset in state machine transition
  • ftp_server: implement splitter to improve EOF processing
  • port_scan: merge global settings into main module and other improvements
  • perf_monitor: add JSON formatter
  • ssl: add splitter to improve PDU processing
  • detection: fix segfault in DetectionEngine::idle sans thread_init
  • rules: tolerate spaces in positional parameters
    thanks to Joao Soares for reporting the issue
  • ip and tcp options: fix max length handling and clean up logging
  • cmg: improved alert formatting
  • doc: updates re control channel
  • snort2lua: added line number and file name to error output
  • snort2lua: fix removal of ignore_ports in stream_tcp.small_segments
  • snort2lua: fix heap-use-after-free for preprocessors and configs with no arguments
  • snort2lua: update for port_scan
 It's been a while since posting here but we have been pushing to github multiple times per week.  :)

Thursday, June 15, 2017

Snort++ Update

Pushed build 236 to github (snortadmin/snort3):
  • appid: clean up shutdown stats
  • appid: fix memory leak
  • conf: update defaults
  • decode: updated ipv6 valid next headers
  • detection: avoid superfluous leaf nodes in detection option trees
  • http_inspect: improved handling of badly terminated chunks
  • http_inspect: improved transfer-encoding header processing
  • ips options: add validation for range check types such as dsize
  • perf_monitor: add more tcp and udp peg counts
  • perf_monitor: update cpu tracker output to thread_#.cpu_*
  • port_scan: alert on all scan attempts so blocking is possible
  • port_scan: make fully configurable
  • sip: fix get body buffer for fast patterns
  • ssl: use stop-and-wait splitter (protocol aware splitter is next)
  • stream_ip: fix 123:7

Monday, June 5, 2017

Snort++ Update

Pushed build 235 to github (snortadmin/snort3):
  • http_inspect: improve handling of improper bare \r separator
  • appid: fix bug where TNS detector corrupted the flow data object
  • search_engine: set range for max_queue_events parameter
    thanks to Navdeep.Uniyal@neclab.eu for reporting the issue
  • arp_spoof: reject non-ethernet packets
  • stream_ip: remove dead code and tweak formatting
  • ipproto: remove unreachable code
  • control_mgmt: add support for daq module reload
  • control_mgmt: add support for unix sockets
  • doc: update default manuals
  • doc: update differences section
  • doc: update README

Tuesday, May 23, 2017

Snort++ Update

Pushed build 234 to github (snortadmin/snort3):
  • byte_math: port rule option from 2X and add feature documentation
  • pgm: don't calculate checksum if header length is not divisible by 4
  • appid: fix sip event handling, http pattern lists, thread locals
  • build: fix issues with OpenSolaris and FreeBSD builds
  • cmake: fix issues with libpcap and miscellaneous
  • offload: refactor for initial (experimental) version of regex offload to other threads
  • cmg: revamp hex buffer dump format with 16 or 20 bytes per line
  • rules: reject positional parameters containing spaces

Friday, May 12, 2017

Snort++ Vulnerabilities Found

Thanks go to Bhargava Shastry, who reported several issues to the Snort Team on Github for which two CVEs will be created.  Links to the issues on github are given at the end.  Fixes are on github now, tagged BUILD_233.  The bugs afflict all prior versions so please pull the latest.  Here is a description of the problems:

Ether Type Validation (CVE-2017-6657)

Since valid ether type and IP protocol numbers do not overlap, Snort++ stores all protocol decoders in a singe array.  That makes it possible to craft packets that have IP protocol numbers in the ether type field which will confuse the Snort++ decoder.   For example, an eth:llc:snap:icmp6 packet will cause a crash because there is no ip6 header with which to calculate the icmp6 checksum.  Affected decoders include gre, llc, trans_bridge, ciscometadata, linux_sll, and token_ring.  The fix adds a check in the packet manager to validate the ether type before indexing the decoder array.  An out of range ether type will will raise 116:473.

Buffer Overread (CVE-2017-6658)

Another problem with the decoder array was also discovered.  The size was off by one making it possible read past the end of array with an ether type of 0xFFFF.  Increasing the array size solves this problem.

The links to the github issues are given below.  Thanks again to Bhargava for reporting the issues.

https://github.com/snortadmin/snort3/issues/22
https://github.com/snortadmin/snort3/issues/23
https://github.com/snortadmin/snort3/issues/24
https://github.com/snortadmin/snort3/issues/25
https://github.com/snortadmin/snort3/issues/26
https://github.com/snortadmin/snort3/issues/27


Thursday, May 11, 2017

Snort++ Update

Pushed build 233 to github (snortadmin/snort3):
  • packet manager: ensure ether type proto ids don't masquerade as ip proto ids
    thanks to Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> for reporting the issue
  • codec manager: fix off-by-1 mapping array size
    thanks to Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> for reporting the issue
  • codec: fix extraction of ether type from cisco metadata
  • appid: add new unit tests to the cmake build, fix missing lib reference to sfip
  • sfghash: clean up and add unit tests
  • http: fix 119:38 false positive
  • main: fix compiler warnings when SHELL is not enabled
  • perf_monitor: fix flatbuffers handling of empty strings
  • modbus: port fix for false positives on length field
  • http: port simple UTF decoding w/o byte order mark
  • build: updated code to resolve cppcheck warnings
  • cleanup: fix typos in source code string literals and comments
  • doc: fix typos

Friday, April 28, 2017

Snort++ Update

Pushed build 232 to github (snortadmin/snort3):
  • build: clean up Intel compiler warnings and remarks
  • build: fix FreeBSD compilation issues
  • cmake: fix building with and without flatbuffers present 
  • autoconf: check for lua.hpp as well as luajit.h to ensure C++ support 
  • shell: make commands non-blocking 
  • shell: allow multiple remote connections 
  • snort2lua: fix generated stream_tcp bindings 
  • snort2lua: fix basic error handling with non-conformant 2.X conf 
  • decode: fix 116:402 
  • dnp3:  fix 145:5 
  • appid: numerous fixes and cleanup 
  • http_server: removed (use new http_inspect instead) 
  • byte_jump: add bitmask and from_end (from 2.9.9 Snort) 
  • byte_extract: add bitmask (from 2.9.9 Snort) 
  • flatbuffers: add version to banner if present 
  • loggers: build alert_sf_socket on all platforms

Friday, April 7, 2017

Snort++ Update

Pushed build 231 to github (snortadmin/snort3):
  • add decode of MPLS in IP
  • add 116:171 and 116:173 cases (label 0 or 2 in non-bottom of stack)
  • cleanup: remove dead code

Monday, March 27, 2017

Snort++ Update

Pushed build 230 to github (snortadmin/snort3):
  • require hyperscan >= 4.4.0, check runtime support; thanks to justin.viiret@intel.com for submitting the patch 
  • fix search tool issue with empty pattern database; thanks to justin.viiret@intel.com for reporting the issue
  • fix sip_method to error out if sip not instantiated
  • major appid overhaul to address lingering concerns: refactor, cleanup, simplify
  • major detection overhaul to address lingering concerns: refactor, cleanup, release memory ASAP
  • add FlatBuffers output format to perf_monitor; also added tool to convert FlatBuffers files to yaml
  • add regex.fast_pattern; do not use for fast pattern unless explicitly indicated
  • update copyrights to 2017

Thursday, March 2, 2017

Snort++ Alpha 4 Available Now!

The fourth alpha release of Snort++ is now available on snort.org.  If you haven't tried Snort++ yet, now is a good time to do so as this pig sports a superset of Snort 2.9.8.3 functionality:
  • Support for multiple packet processing threads 
  • Improved throughput and latency performance
  • Improved detection 
  • Modular design 
  • Plugin framework with over 200 plugins
  • More scalable memory profile
  • A brand new HTTP inspector
  • Service rules like alert http
  • Rule "sticky" buffers
  • LuaJIT configuration, loggers, and rule options
  • Auto-detect common services for portless configuration
  • Rewritten TCP handling
  • New rule parser and syntax
  • New performance monitor
  • New time and space profiling
  • New latency monitoring and enforcement
  • Automake or Cmake - your choice
  • Builtin help and generated reference documentation
The first beta release is expected around midyear at which point Talos will provide 3.0 rule downloads.  In the meantime, you can use the snort2lua utility packaged with Snort++ to convert 2.X rules and confs.

There are lots of enhancements and new features planned for Snort++, some of which are already in development.  As always, new downloads are posted to snort.org monthly.  You can also get the latest  updates from github (snortadmin/snort3) which is updated weekly.

Please submit bugs, questions, and feedback to bugs@snort.org or the Snort-Users mailing list.

Happy Snorting!
The Snort Release Team

Friday, February 24, 2017

Snort++ Update

Pushed build 227 to github (snortadmin/snort3):
  • allow arbitrary / unused gids in text rules
  • support DAQs w/o explicit sources (nfq, ipfw)
  • fix up peg help (remove _)
  • fix u2 logging of PDUs