Skip to content

feat(probes): add isUnsafeSpawn #327

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

feat(probes): add isUnsafeSpawn #327

wants to merge 1 commit into from

Conversation

tony-go
Copy link
Member

@tony-go tony-go commented May 27, 2025

I would like to introduce isUnsafeSpwan probe.

I had the idea earlier in the day reading a book on macOS malware where authors try to detect if SIP is enabled (csrutil).

I noticed a bunch of commands that could be suspicious if passed in spawn/exec.

I imaged something where we could have a bunch of specific commands we could mark as suspicious.

My concerns is "What about false positives?" Maybe we would like to have a probe that could take a list of commands and add warnings only for these cases.

@fraxken
Copy link
Member

fraxken commented May 27, 2025

I don't worry much about false positive (we could still see in the real world if there is a lot or not). And CLI settings still propose to disable them (I think I will push to make experimental warning disable by default).

@fraxken
Copy link
Member

fraxken commented May 27, 2025

Opened an issue in CLI: NodeSecure/cli#493

}

const command = commandArg.value;
if (typeof command === "string" && command.includes("csrutil")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you can create an Array or Set as constants if we have additional values in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah for sure! The code is still garbage haha :)

@fraxken fraxken mentioned this pull request Jun 2, 2025
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.

2 participants