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
…949)

* added detections for reading/writing shadow file, password database
  • Loading branch information
jlmndt authored Oct 30, 2024
1 parent b325cf8 commit f880b13
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nursery/get-password-database-entry-on-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ rule:
namespace: host-interaction/session
authors:
- [email protected]
- [email protected]
scopes:
static: basic block
static: instruction
dynamic: call
features:
- and:
Expand All @@ -17,3 +18,7 @@ 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: instruction
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: instruction
dynamic: call
references:
- https://manpages.ubuntu.com/manpages/noble/man3/putspent.3.html
features:
- and:
- os: linux
- or:
- api: putspent

0 comments on commit f880b13

Please sign in to comment.