Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected handling of multiple content fields #101

Open
tweedge opened this issue Jan 1, 2025 · 0 comments
Open

Unexpected handling of multiple content fields #101

tweedge opened this issue Jan 1, 2025 · 0 comments

Comments

@tweedge
Copy link

tweedge commented Jan 1, 2025

Looking through some ET rules, there are rules with multiple content fields (ex. ... dns.query; content:"ipfs"; content:".translate.goog"; ...), but when parsed by idstools only one is returned:

Ex:

from idstools import rule

input = """alert dns $HOME_NET any -> any any (msg:"ET PHISHING Suspicious IPFS Domain Rewritten with Google Translate"; dns.query; content:"ipfs"; content:".translate.goog"; distance:0; endswith; fast_pattern; reference:url,vadesecure.com/en/blog/new-phishing-attack-leverages-google-translate-and-ipfs-decentralized-network; classtype:credential-theft; sid:2046638; rev:1; metadata:attack_target Client_Endpoint, created_at 2023_06_23, deployment Perimeter, confidence Medium, signature_severity Major, tag Phishing, updated_at 2023_06_23;)"""

parsed_rule = rule.parse(input)
print(parsed_rule.content)

prints only ".translate.goog". Would a more accurate result be to print an array containing both "ipfs" and ".translate.goog"? That would be a breaking change though... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant