A client just asked for info on *nix commands that are most often run by attackers vs. legitimate users that we can find with auditd. Some things I thought of:
ssh tunneling params
stunnel
nc
cat/head/tail/more/less <critical config files>
What else? Any cheat sheets out there?
50
32
3
180
Interesting question: will auditd log the leading spaces if the attacker tries to put space at the beginning of a command-line to avoid history?
2
10
Auditd logs from the kernel audit framework at the syscall level. It will log the command executed. It also has a lot to do with the config.
1
9
I’m not sure if it will catch the leading space itself, but it should catch the actual executable depending on your auditd config. The CIS auditd rules usually target syscalls generated after the command line is parsed.
github.com/major/cis-rhel-an…
2
2
thanx for the clarification. sounds like a test is in order. those leading spaces would be a dead give away for malicious intent. i can't think of a legitimate use for them. there may be one though.
1
I think that’d be a noisy signal because of typos, depending on the amount of time your admins spend on the command line.
1
i would rather alert on the few times it was a mistake rather than letting a great indicator slip by unnoticed. i make plenty of mistakes typing, but have never put a leading space in on accident. not that it can't, just not that prevalent i would imagine.
1
I’d like to see more work around turning audit events into actionable intel. Translate a stream of raw audit logs into “pane of glass” alerts like “webshell executed” or “unexpected/unauthorized privilege escalation” etc.
Sep 14, 2020 · 11:25 PM UTC
1



