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

Php os execution rules #206

Merged
merged 11 commits into from
May 11, 2020
Merged

Conversation

DiabloHorn
Copy link
Contributor

@DiabloHorn DiabloHorn commented May 10, 2020

Hello,

I'm unsure about the process of submitting rules, so I'm trying this pull request. Let me know if it has to be done in a different manner. This rules is to detect some of the PHP dynamic execution functions. I also ran the rule verification command after having made the changes.

dotnet ./ApplicationInspector.CLI.dll verifyrules -r /home/dev/tools/ApplicationInspector/AppInspector/rules/default/os/dynamic_execution.json Verify Rules command running Results succeeded Rule status Ruleid: AI034800, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI034900, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035000, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035100, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035200, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035300, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035400, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035500, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035510, Rulename: OS: Dynamic Execution, Status: True Ruleid: AI035520, Rulename: OS: Dynamic Execution, Status: True Verify Rules command completed

@msftclas
Copy link

msftclas commented May 10, 2020

CLA assistant check
All CLA requirements met.

@gfs
Copy link
Contributor

gfs commented May 10, 2020

Hello,
Thanks for your contribution! This is the right way to go about submitting new rules.

These look pretty promising. I went ahead and made some inline suggestions to improve the rules you suggested.

DiabloHorn and others added 9 commits May 10, 2020 19:02
Yes, agreed. I was unsure at first if the regex should also try to account for the function call, including the '('. Thank you.

Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
I will also take this into account if I submit future rules.

Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
Co-authored-by: Gabe Stocco <98900+gfs@users.noreply.github.com>
@DiabloHorn
Copy link
Contributor Author

I think I accepted all proposed changes correctly, let me know if I missed something or have to accept your proposed changes in a different way.

@gfs
Copy link
Contributor

gfs commented May 10, 2020

LGTM. @guyacosta I'll allow you to merge.

@gfs
Copy link
Contributor

gfs commented May 10, 2020

@DiabloHorn Have you confirmed that the rules still work on your test data after my updates?

@DiabloHorn
Copy link
Contributor Author

@gfs yes, I just confirmed. Your proposed improvements work great.

@guyacosta guyacosta merged commit bc9d74c into microsoft:master May 11, 2020
@guyacosta
Copy link
Contributor

Thanks @DiabloHorn and @gfs

@DiabloHorn DiabloHorn deleted the php-os-execution-rules branch May 11, 2020 19:04
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

Successfully merging this pull request may close these issues.

4 participants