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

BUG: Rule is matched on HTML comments #91

Open
IlluminatiFish opened this issue Oct 8, 2022 · 2 comments
Open

BUG: Rule is matched on HTML comments #91

IlluminatiFish opened this issue Oct 8, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@IlluminatiFish
Copy link
Collaborator

It appears that the implementation for the html modifier matches on anything found in the DOM response from URLScan which leads to rules being flagged incorrectly.

unkdhtfjynown

In the example above both the base64-encoded-body & hex-encoded-body get matched however, the latter is nested within a HTML comment

@bradleyjkemp
Copy link
Member

Hmm that's a tricky one.

There's definitely a slight bug here where the html matcher actually uses the URLScan DOM (not quite the same) but in general some amount of false positives are inevitable.

HTML can't be properly parsed using the simple regex based language IOK uses and so while we could try to filter out some false positives, we'd never get all of them

@IlluminatiFish
Copy link
Collaborator Author

IlluminatiFish commented Oct 11, 2022

Hmm that's a tricky one.

There's definitely a slight bug here where the html matcher actually uses the URLScan DOM (not quite the same) but in general some amount of false positives are inevitable.

HTML can't be properly parsed using the simple regex based language IOK uses and so while we could try to filter out some false positives, we'd never get all of them

Yeah, definitely a tricky problem, not sure if it could be solved

@IlluminatiFish IlluminatiFish added the bug Something isn't working label Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants