Skip to content

Commit

Permalink
added detections for reading/writing shadow file, password database
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmndt committed Oct 23, 2024
1 parent 125419b commit 65ceee3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nursery/get-password-database-entry-on-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ rule:
namespace: host-interaction/session
authors:
- [email protected]
- [email protected]
scopes:
static: basic block
dynamic: call
Expand All @@ -17,3 +18,8 @@ rule:
- api: getpwuid_r
- api: getpwnam
- api: getpwnam_r
- api: getpwent
- api: fgetpwent
- api: getpwent_r
- api: fgetpwent_r

21 changes: 21 additions & 0 deletions nursery/get-shadow-password-file-entry-on-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
rule:
meta:
name: get shadow password file entry on linux
namespace: collection
authors:
- [email protected]
scopes:
static: function
dynamic: call
references:
- https://manpages.ubuntu.com/manpages/noble/man3/getspent.3.html
features:
- and:
- os: linux
- or:
- api: getspent
- api: getspent_r
- api: fgetspent
- api: fgetspent_r
- api: getspnam
- api: getspnam_r
16 changes: 16 additions & 0 deletions nursery/set-shadow-password-file-entry-on-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
rule:
meta:
name: set shadow password file entry on linux
namespace: host-interaction/file-system/write
authors:
- [email protected]
scopes:
static: function
dynamic: call
references:
- https://manpages.ubuntu.com/manpages/noble/man3/putspent.3.html
features:
- and:
- os: linux
- or:
- api: putspent

0 comments on commit 65ceee3

Please sign in to comment.