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

[Rule Tuning] Fix Interactive Terminal Spawned via Perl bypasses #1654

Closed
wants to merge 4 commits into from

Conversation

yougharta
Copy link

hello there i am youghourta ghennai from Octodet .
i wanted to share some bypasses about this rule 'Interactive Terminal Spawned via Perl' .

##Problem :

this rule is supposed to detect shell spawning via perl .
the shell spawning could be done by using this command perl -e 'exec "/bin/sh";'
in your old rule you are only detecting the exact command like that :
event.category:process and event.type:(start or process_started) and process.name:perl and process.args:("exec \"/bin/sh\";" or "exec \"/bin/dash\";" or "exec \"/bin/bash\";")

here this could be bypassed by using one of this tricks :
perl -e 'exec "/bin/sh"'
perl -e 'exec "/bin/////sh";'

and also : perl -e 'exec "/bin/zsh";'
and this is what i present as a solution :

process where event.type in ("start" , "process_started") and process.name :("perl*") and process.args regex("exec*/*sh*")

Thanks for your time .

@cla-checker-service
Copy link

❌ Author of the following commits did not sign a Contributor Agreement:
29bb7e6, 96357a0, 87701ea

Please, read and sign the above mentioned agreement if you want to contribute to this project

@w0rk3r w0rk3r self-assigned this Dec 7, 2021
@brokensound77 brokensound77 added the Rule: Tuning tweaking or tuning an existing rule label Jan 26, 2022
@brokensound77 brokensound77 changed the title Fix Interactive Terminal Spawned via Perl bypasses [Rule Tuning] Fix Interactive Terminal Spawned via Perl bypasses Jan 26, 2022
@w0rk3r
Copy link
Contributor

w0rk3r commented Mar 23, 2022

Closing this one due to limitations on rule type changes, I'll resume this one once we get alternatives.
More details on #1854

@w0rk3r w0rk3r closed this Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants