Re: Wow, that's no script kiddie
the malware “integrates deeply into the authentication stack, survives system updates, and leaves almost no forensic traces. Combined with layered obfuscation and environment tampering, this makes it exceptionally hard to detect using traditional tools."
That statement sounds almost breathless yet doesn't actually make a lot of sense based on the article. Disassembling it a bit:
- It's a PAM module, so obviously it is integrated into the Pluggable Authentication Module stack.
- It only survives system updates if the update doesn't reconfigure the PAM stack. Same as any other bit of malware that uses a modified configuration file somewhere.
- It definitely leaves forensic traces, in the form of [1] entries in the PAM configuration and [2] `.so`s in unexpected locations. It doesn't seem to leave much in the way of traces *when activated*, though you'll still get the audit records which should ring alarm bells.
- Where is the "layered obfuscation"? There is obfuscation by means of the `.so` names, but I didn't notice any _layering_ involved.
- "Leaves almost no forensic traces" appears to be a reference to the "environment tampering", i.e. getting rid of the SSH_* environment variables and redirecting history to `/dev/null`. Which I'd suggest is more related to self-protection by avoiding little things like the IP address of the SSH client (read: malicious actor) being logged than to hiding forensic traces. The traces should still be pretty visible if you know what you're looking for, unless there's more going on than the article suggests.
Given that installing the malware requires root access to do PAM reconfiguration then far from needing a bunch of knowledge to envision this hack it actually seems rather overblown. I'd imagine it'd be easy enough to configure standard PAM modules to have the same effect. For example,`pam_succeed_if` should do the job quite nicely.