Snort mailing list archives
Re: byte_test and buffer cursor
From: Alex McDonnell <amcdonnell () sourcefire com>
Date: Thu, 9 Feb 2017 16:34:23 -0500
I'm pretty sure that's in the Snort Manual, byte_test does not move the cursor, byte_extract does. You could also test for the value you expect in your second test to verify ;) Alex McDonnell TALOS On Thu, Feb 9, 2017 at 4:30 PM, Y M <snort () outlook com> wrote:
Does a byte_test move the cursor into a buffer the number of bytes it tests? Does is depend on the buffer against which the byte_test is operating? In essence, I am trying to use byte_test to validate that the decimal value of X number of bytes fall within a decimal range. Something similar to: http_raw_header; byte_test:3,>,160,0,relative; byte_test:3,<,170,0,relative; If the first byte_test above moves the cursor 3 bytes into the buffer, how can I reset the cursor back to the beginning of the buffer of the last/relative content match (http_raw_header)? Or am I just doing it all wrong? YM ------------------------------------------------------------ ------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Snort-sigs mailing list Snort-sigs () lists sourceforge net https://lists.sourceforge.net/lists/listinfo/snort-sigs http://www.snort.org Please visit http://blog.snort.org for the latest news about Snort! Visit the Snort.org to subscribe to the official Snort ruleset, make sure to stay up to date to catch the most <a href=" https://snort.org/downloads/#rule-downloads">emerging threats</a>!
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________ Snort-sigs mailing list Snort-sigs () lists sourceforge net https://lists.sourceforge.net/lists/listinfo/snort-sigs http://www.snort.org Please visit http://blog.snort.org for the latest news about Snort! Visit the Snort.org to subscribe to the official Snort ruleset, make sure to stay up to date to catch the most <a href=" https://snort.org/downloads/#rule-downloads">emerging threats</a>!
Current thread:
- byte_test and buffer cursor Y M (Feb 09)
- Re: byte_test and buffer cursor Alex McDonnell (Feb 09)
- Re: byte_test and buffer cursor Y M (Feb 09)
- Re: byte_test and buffer cursor Alex McDonnell (Feb 09)
- Re: byte_test and buffer cursor Y M (Feb 09)
- Re: byte_test and buffer cursor Y M (Feb 09)
- Re: byte_test and buffer cursor Alex McDonnell (Feb 09)