Project

General

Profile

Actions

Documentation #5030

open

Documentation bugs for endswith, distance, within

Added by Gianni Tedesco almost 3 years ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

Documentation says: "endswith cannot be mixed with offset, within or distance for the same pattern."

Looks untrue, dozens of ET rules do this, for example:

alert dns $HOME_NET any -> any any (msg:"ET MALWARE DNS Query for DNSpionage CnC Domain"; dns.query; content:".microsoftonedrive.org"; distance:0; nocase; fast_pattern; endswith; reference:url,blog.talosintelligence.com/2018/11/dnspionage-campaign-targets-middle-east.html; classtype:command-and-control; sid:2026680; rev:4; metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, attack_target Client_Endpoint, created_at 2018_11_29, deployment Perimeter, former_category MALWARE, performance_impact Low, signature_severity Major, tag DNSpionage, tag DNS_tunneling, updated_at 2020_09_16;)

Should it also be specified that distance/within are perfectly valid even for the first content match in a rule, in which case I guess they are relative to the start of the buffer (ie.are noops)? Or does that have some other expected behaviour? I mean, is it just an oversight that these are in some rules, or does it do something?


Files

39_bytes.pcap (413 Bytes) 39_bytes.pcap Brandon Murphy, 02/02/2022 02:24 AM
35_bytes.pcap (408 Bytes) 35_bytes.pcap Brandon Murphy, 02/02/2022 02:25 AM
Actions

Also available in: Atom PDF