Skip to content

Commit

Permalink
Update fbash rules to use proc.sname.
Browse files Browse the repository at this point in the history
Update fbash rules to use proc.sname instead of proc.aname and to rely
on sessions instead of process ancestors.

I also wanted to add details on the address/port being listened to but
that's blocked on falcosecurity/falco#86.

Along with this change, there are new positive trace files
installer-bash-starts-network-server.scap and
installer-bash-starts-session.scap that test these updated rules.
  • Loading branch information
mstemm committed Jun 1, 2016
1 parent 81546ad commit 44ff6b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rules/falco_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@

# fbash is a small shell script that runs bash, and is suitable for use in curl <curl> | fbash installers.
- rule: installer_bash_starts_network_server
desc: an attempt by any program that is a child of fbash to start listening for network connections
condition: evt.type=listen and proc.aname=fbash
output: "Unexpected listen call by a child process of fbash (command=%proc.cmdline)"
desc: an attempt by any program that is in a session led by fbash to start listening for network connections
condition: evt.type=listen and proc.sname=fbash
output: "Unexpected listen call by a process in a fbash session (command=%proc.cmdline)"
priority: WARNING

- rule: installer_bash_starts_session
desc: an attempt by any program that is a child of fbash to start a new session (process group)
condition: evt.type=setsid and proc.aname=fbash
output: "Unexpected setsid call by a child process of fbash (command=%proc.cmdline)"
desc: an attempt by any program that is in a session led by fbash to start a new session
condition: evt.type=setsid and proc.sname=fbash
output: "Unexpected setsid call by a process in fbash session (command=%proc.cmdline)"
priority: WARNING

###########################
Expand Down

0 comments on commit 44ff6b7

Please sign in to comment.