Last active
August 3, 2026 13:08
-
-
Save ysf/e86defbb81ee167bcdfe682c7a9aef28 to your computer and use it in GitHub Desktop.
aur malware auditd rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # install. | |
| sudo pacman -S audit # if not installed | |
| sudo systemctl enable --now auditd.service | |
| sudo auditctl -s | |
| sudo auditctl -l | |
| # put here for persistent rules: /etc/audit/rules.d/70-aur-malware.rules: | |
| ## archlinux Stage-1/Stage-2 malware IOCs | |
| -a always,exit -F arch=b64 -F dir=/dev/shm/ -F perm=wxa -F key=aurmalware_shm | |
| -a always,exit -F arch=b32 -F dir=/dev/shm/ -F perm=wxa -F key=aurmalware_shm | |
| ## /tmp activity | |
| -a always,exit -F arch=b64 -F dir=/tmp/ -F perm=x -F key=aurmalware_tmp_exec | |
| -a always,exit -F arch=b32 -F dir=/tmp/ -F perm=x -F key=aurmalware_tmp_exec | |
| ## only if you're using postfix: | |
| -a always,exit -F arch=b64 -F dir=/var/lib/postfix/ -F perm=wxa -F key=aurmalware_postfix | |
| -a always,exit -F arch=b32 -F dir=/var/lib/postfix/ -F perm=wxa -F key=aurmalware_postfix | |
| ## systemd- and cron | |
| -a always,exit -F arch=b64 -F dir=/etc/systemd/system/ -F perm=wa -F key=aurmalware_systemd | |
| -a always,exit -F arch=b32 -F dir=/etc/systemd/system/ -F perm=wa -F key=aurmalware_systemd | |
| -a always,exit -F arch=b64 -F dir=/etc/cron.d/ -F perm=wa -F key=aurmalware_cron | |
| -a always,exit -F arch=b32 -F dir=/etc/cron.d/ -F perm=wa -F key=aurmalware_cron | |
| ## loginctl enable-linger | |
| -a always,exit -F arch=b64 -S execve -F exe=/usr/bin/loginctl -F key=aurmalware_loginctl | |
| -a always,exit -F arch=b64 -F dir=/var/lib/systemd/linger/ -F perm=wa -F key=aurmalware_linger | |
| ## more pesistancy: | |
| -a always,exit -F arch=b64 -F path=/run/utmp -F perm=a -F key=aurmalware_xattr | |
| -a always,exit -F arch=b32 -F path=/run/utmp -F perm=a -F key=aurmalware_xattr | |
| -a always,exit -F arch=b64 -F path=/etc/resolv.conf -F perm=a -F key=aurmalware_xattr | |
| -a always,exit -F arch=b32 -F path=/etc/resolv.conf -F perm=a -F key=aurmalware_xattr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment