Snort mailing list archives

byte_test and buffer cursor


From: Y M <snort () outlook com>
Date: Thu, 9 Feb 2017 21:30:58 +0000

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>!

Current thread: