Skip to content

Commit

Permalink
feat(attack1): add rule to detect nsenter
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarapuce committed Jan 5, 2024
1 parent 3408ae6 commit df31fad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Release Rulesfile
on: push
name: Release Rulesfile for scenario 1
on:
push:
branches:
- feat/attack1

jobs:

Release-Rulesfile:
Expand Down
2 changes: 0 additions & 2 deletions custom_falco_rules.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions custom_rules1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- macro: container
condition: container.id != host

- macro: spawned_process
condition: evt.type = execve and evt.dir=<

- rule: run_nsenter
desc: nsenter is executed in a container
condition: container and proc.name = nsenter and spawned_process and proc.pname exists and not proc.pname in (bash, docker)
output: "nsenter used in container (user=%user.name container_id=%container.id container_name=%container.name shell=%proc.name parent=%proc.pname cmdline=%proc.cmdline)"
priority: WARNING

0 comments on commit df31fad

Please sign in to comment.