Executive Summary
Our threat research analysis of Quasar Linux (QLNX) found a previously undocumented, full-featured Linux Remote Access Trojan. Despite sharing the "Quasar" name with the well-known open-source Windows RAT (C#/.NET), QLNX is an entirely separate native Linux implant purpose-built for one mission: compromising developer and DevOps workstations to enable software supply chain attacks.
- Fileless execution — Copies itself into RAM via memfd_create, deletes the original binary, re-executes from memory. No on-disk footprint.
- Dual-layer rootkit — Userland LD_PRELOAD hooks + kernel-level eBPF program. Hides processes, files, and network ports from standard tools.
- PAM backdoor with master password — Intercepts authentication in plaintext. Hardcoded bypass: O$$f$QtYJK
- Supply chain credential theft — Steals NPM tokens, PyPI upload keys, AWS credentials, Kubernetes configs, Docker auth, GitHub CLI tokens, SSH keys, Vault tokens, Terraform credentials, and .env files.
- 58 C2 commands — Shell access, file management, process injection, keylogging, screenshots, SOCKS proxy, TCP tunneling, BOF/COFF execution, and P2P mesh networking.
- 7 persistence methods — Systemd, crontab, init.d, XDG autostart, .bashrc injection, LD_PRELOAD, and PAM backdoor — deployed based on privilege level.
- Compiles its own rootkit on-target — Embedded C source code compiled with the host's gcc. No pre-built binaries to signature-match.
- 4/70 AV detection rate — Multiple vendors score it as "Legit File" or misclassify it entirely.
The Threat at a Glance
| Field | Detail |
|---|---|
| Name | Quasar Linux (QLNX) |
| Type | Full-featured Linux RAT with rootkit, PAM backdoor, credential harvester |
| Binary | quasar-implant — ELF 64-bit x86_64, 148 KB |
| Version | 1.4.1 |
| Target | Developer / DevOps workstations (supply chain pivot) |
| C2 Protocol | Magic: QLNX (0x514C4E58) — TCP/TLS, HTTPS, HTTP + P2P mesh |
| Commands | 58 registered handlers |
| Persistence | 7 methods (Types 0–6) — selected by privilege level |
| Detection | 4/70 AV engines at time of publication |
| AV Signature | HEUR:Backdoor.Linux.Quazar.a |
| Delivery | HTA dropper files (invoice/financial-themed phishing) |
| First Seen | April 2026 (static analysis); May 2026 (public reporting) |
Technical Architecture: Seven Functional Blocks
QLNX packs seven distinct functional modules into a single 148 KB dynamically-linked ELF binary. It links against libc, libssl, libpthread, and libdl — leveraging the host's own libraries to keep the binary small. The LD_PRELOAD rootkit and PAM backdoor are shipped as embedded C source code and compiled on-target using gcc.
| # | Block | Description |
|---|---|---|
| 1 | RAT Core | 58-command framework: shell, file/process management, system control, network ops. Custom TCP/TLS or HTTP/S C2. |
| 2 | Rootkit | Dual-layer: userland LD_PRELOAD hooks + kernel-level eBPF. Hides files, processes, network ports. |
| 3 | Credential Access | SSH keys, browser data, cloud configs, /etc/shadow, PAM backdoors for plaintext auth interception. |
| 4 | Surveillance | Keylogger, screenshots, clipboard monitoring. |
| 5 | Lateral Movement | TCP tunneling, SOCKS proxy, port scanning, SSH pivoting, P2P mesh. |
| 6 | Execution Engine | Process injection (ptrace, /proc/pid/mem), in-memory BOF/COFF execution. |
| 7 | Filesystem Monitoring | Real-time inotify-based file change tracking. |
Fileless Execution Chain
Persistence Mechanisms: 7 Methods, Privilege-Aware
QLNX selects persistence methods dynamically based on privilege level and system capabilities. The C2 triggers persistence via command opcode 0x72 with parameters: name, path, and type ID. Multiple methods can be deployed simultaneously.
| Type | Method | Path | Requires |
|---|---|---|---|
| 0 | Systemd system service | /etc/systemd/system/ | Root (UID 0) |
| 1 | .bashrc injection | Append nohup line | Any user |
| 2 | Crontab | @reboot entry | Any user |
| 3 | Systemd user service | ~/.config/systemd/user/ | Any user |
| 4 | init.d script | /etc/init.d/ | Root (UID 0) |
| 5 | LD_PRELOAD rootkit | /etc/ld.so.preload | Root + gcc |
| 6 | XDG Autostart | ~/.config/autostart/ | Desktop session |
Dual-Layer Rootkit
Layer 1: Userland — LD_PRELOAD
The rootkit source code is stored as C string literals inside the binary. On deployment: source is written to /tmp/.pcs_XXXXXX via mkstemp, compiled with gcc to produce /usr/lib/.libpam_cache.so, and installed via /etc/ld.so.preload — loading into every dynamically linked process on the system. Hooked libc functions: readdir, open, stat, lstat, access.
Layer 2: Kernel — eBPF
| BPF Map | Key | Max | Hides from |
|---|---|---|---|
| PID map | 4 bytes (PID) | 64 | ps, top, htop |
| File map | 256 bytes (path) | 64 | ls, find, stat |
| Port map | 2 bytes (port) | 32 | ss, netstat |
C2 Protocol and P2P Mesh
Every session begins with the 4-byte magic QLNX (0x514C4E58). The packet format uses a 6-byte header: 4-byte little-endian payload length + 2-byte command ID. Three channels are supported:
| Channel | Encryption | Details |
|---|---|---|
| Raw TCP | TLS (cert validation disabled) | Default. 4-step handshake, persistent command loop. |
| HTTPS | TLS | POST for Base64 data, GET polling every 5 seconds. |
| HTTP | None | Plaintext fallback. |
The initial beacon (Command ID 0x01) transmits: malware version (1.4.1), OS version, privilege level, geolocation (via ip-api.com), machine fingerprint (SHA256 of MAC or /etc/machine-id), username, hostname, and active IPv4 interfaces.
Credential Harvesting and PAM Backdoors
Targeted Files
| File | Impact if Stolen |
|---|---|
| .npmrc | Push trojanized packages to npm registry |
| .pypirc | Upload malicious Python packages |
| .git-credentials | Commit backdoors to repositories |
| .aws/credentials | Full cloud infrastructure access |
| .kube/config | Container orchestration takeover |
| .docker/config.json | Push poisoned container images |
| .vault-token | Secret management access |
| Terraform credentials, GitHub CLI tokens, SSH keys, .env files, Firefox profiles, /etc/shadow | Infrastructure manipulation, lateral movement, session hijacking, password hash theft |
PAM Backdoor #1 (Primary)
Embedded C source → /tmp/.pcs_XXXXXX → compiled to /usr/lib/.libpam_cache.so → installed via /etc/ld.so.preload. Intercepts PAM authentication, captures plaintext credentials. Contains master password bypass: O$$f$QtYJK. XOR-encrypts stolen credentials to /var/log/.ICE-unix (SSH) and /var/log/.Test-unix (SSH/SCP/SU/sudo).
PAM Backdoor #2 (Lightweight)
Loads into dynamically linked processes. Extracts service name, username, and authentication token. Stored in plaintext to /tmp/.pam_cache.
Supply Chain Attack Path
Indicators of Compromise
File Hashes
| Type | Hash |
|---|---|
| SHA256 (primary) | ea1d34b21b739a6bbf89b3f7e67978005cf7f3eda612cefc7eac1c8ead7c5545 |
| SHA1 | b0f2c668cbdd63a871c90592b6c93e931115872e |
| MD5 | 70f70743f287a837d17c56933152a8a6 |
| SSDEEP | 3072:SQL8Wfof3Ji3d2t77bc+R4PJUxv6UumQgxzLwze+1Nro:BeJ82Nb/R4Cxv6UQ6aN0 |
Additional Related Hashes
42d0c420eb5fe181388f2e4f0b7d7c0d302971e7a06fdc1bec481b68c8ccae1f
82daa93219ba40a6e41cdf3174ba57eb5d3383d1cd805584e9954eb0200182a1
c99cf0dc1ef1057d713cb082acaf42e4df4656809c91741752bddcab39bbfaca
d55549d5655e2f202e215676f4bdb0994ea08a93d15ec4ded413f64cfa7facc8
ea89caab82181881d971be312412795051f6322b105c8b9d29cfb5729fab8d33
Network IOCs
| Indicator | Type | Context |
|---|---|---|
| 38.210.209.142 | IPv4 | C2 server (US, AS174) |
| http://38.210.209.142:8181/login | URL | C2 operator panel |
| 208.95.112.1 / ip-api.com | IPv4 | Geolocation beacon (NOT C2) |
Host-Based IOCs
| Artifact | Value |
|---|---|
| Lock file | /tmp/.X752e2ca1-lock |
| PAM source temp | /tmp/.pcs_XXXXXX |
| PAM compiled SO | /usr/lib/.libpam_cache.so |
| Rootkit config | /etc/ld.so.preload (modified) |
| Cred log (SSH) | /var/log/.ICE-unix |
| Cred log (multi) | /var/log/.Test-unix |
| PAM #2 log | /tmp/.pam_cache |
| Env variable | _MFD_RE=1 |
| Process names | kworker, ksoftirqd |
| Protocol magic | QLNX / 0x514C4E58 |
| DJB2 hash | 0x752e2ca1 |
| PAM master password | O$$f$QtYJK |
MITRE ATT&CK Mapping
| Tactic | ID | QLNX Implementation |
|---|---|---|
| Execution | T1059.004 | Unix shell, popen/system calls |
| Persistence | T1037.004 | RC scripts, systemd services, crontab |
| Persistence | T1574 | LD_PRELOAD hijack via /etc/ld.so.preload |
| Priv Escalation | T1548.004 | sudo, pkexec |
| Defense Evasion | T1564.010 | argv0 masquerade as kworker/ksoftirqd |
| Defense Evasion | T1014 | LD_PRELOAD + eBPF dual-layer rootkit |
| Defense Evasion | T1055.003 | ptrace-based thread injection |
| Credential Access | T1552.001 | .npmrc, .pypirc, .aws/credentials, .env |
| Credential Access | T1555 | PAM backdoor plaintext credential interception |
| Credential Access | T1003.008 | /etc/passwd and /etc/shadow dumping |
| Collection | T1115 | Clipboard monitoring |
| Exfiltration | T1041 | Encrypted TLS/HTTPS exfiltration over C2 |
| Lateral Movement | T1210 | SSH with harvested keys to remote hosts |
Detection and Hunting Guidance
Quick Triage Script
# QLNX Quick Triage — run as root
echo "=== QLNX Indicator Check ==="
echo "[*] Lock file..."
ls -la /tmp/.X752e2ca1-lock 2>/dev/null && echo " FOUND!" || echo " Clean"
echo "[*] ld.so.preload..."
cat /etc/ld.so.preload 2>/dev/null && echo " CHECK ABOVE" || echo " Clean"
echo "[*] PAM backdoor SO..."
ls -la /usr/lib/.libpam_cache.so 2>/dev/null && echo " FOUND!" || echo " Clean"
echo "[*] Credential logs..."
ls -la /var/log/.ICE-unix /var/log/.Test-unix /tmp/.pam_cache 2>/dev/null && echo " FOUND!" || echo " Clean"
echo "[*] Memfd processes..."
ls -la /proc/*/exe 2>/dev/null | grep -i memfd && echo " FOUND!" || echo " Clean"
echo "[*] eBPF maps..."
bpftool map list 2>/dev/null | head -20
echo "[*] _MFD_RE env variable..."
grep -rl "_MFD_RE" /proc/*/environ 2>/dev/null && echo " FOUND!" || echo " Clean"
echo "=== Done ==="
Remediation
- Remove entries from /etc/ld.so.preload
- Delete /usr/lib/.libpam_cache.so
- Remove all persistence: systemd, crontab, init.d, .bashrc, XDG autostart
- Kill memfd-backed processes
- Unload eBPF programs: bpftool prog list and remove
- Rotate ALL credentials — npm tokens, PyPI keys, AWS creds, SSH keys, K8s configs, Docker auth, Vault tokens, GitHub tokens, .env secrets
- Audit package registries for unauthorized publishes
- Check CI/CD pipelines for injected steps
- Consider full reimaging — the dual-layer rootkit makes partial cleanup unreliable
Conclusion
QLNX is not a retooled Windows RAT or a noisy botnet agent. It is a purpose-built developer workstation implant designed from the ground up for supply chain compromise. The combination of fileless execution, dual-layer rootkit, PAM authentication interception, and targeted credential harvesting creates a threat that is both difficult to detect and devastating in impact.
The fact that it was detected by only 4 AV engines — and that some vendors score it as "Legit File" — tells us that traditional signature-based detection is insufficient. Defenders need behavioral monitoring: watch for memfd-backed processes, LD_PRELOAD modifications, unexpected eBPF programs, and gcc compiling shared objects from temp files.
QLNX doesn't need to compromise a build server or CI pipeline directly — it compromises the human whose credentials have access to those systems. One developer laptop becomes a gateway to every package registry, container repo, and cloud environment they touch.
Check your ld.so.preload. Run the triage script. Rotate credentials. The supply chain clock is ticking.
Vulnerability Assessment
Deep technical analysis of vulnerabilities affecting your infrastructure — beyond CVSS scores to real-world exploitability and impact.
Attack Surface Intelligence
Passive mapping of your external presence — every exposed service, endpoint, and piece of infrastructure visible to the public internet.
Threat Hunting
Proactive detection of compromise indicators, APT activity, and post-exploitation artifacts across your email and identity infrastructure.
Dark Web Monitoring
Continuous surveillance of stolen credential markets, threat actor forums, and data leak channels. Know when you're being targeted before it becomes an incident.