Skip to content

Linux LKM rootkit

Adore-ng LKM Rootkit: Traces and Offline Checks

Adore-ng is a 2004 open-source Linux kernel rootkit that hooks the VFS instead of the syscall table. Its design lives on in Syslogk. Traces, checks, recovery.

Kind
Linux LKM rootkit · Kernel layer
Platforms
Linux
First seen
2004
Status
Historical
Checked by
Linux kernel

Overview

Adore-ng ("next generation") is an open-source loadable kernel module rootkit for Linux 2.4 and 2.6 kernels. The author's release archive lists versions 0.41 (July 2004) to 0.56 (February 2007). A mirror on GitHub adapted the code for 2.6 and 3.x kernels in 2014–2015. The source header carries a "BSDish" licence and an educational-use notice.

Elastic's taxonomy calls it "once-popular". No current vendor report of stock Adore-ng in an intrusion was found for this page, hence the "historical" status.

Its design is still in use. In 2022 Avast found Syslogk, a rootkit "heavily based on Adore-Ng", in the wild. In 2026, AhnLab ASEC described a Syslogk build that hooks the same kernel functions Adore-ng does. Knowing Adore-ng's traces helps with its descendants.

It does not build on current kernels. The readdir file operation it replaces was removed in 3.11 in favour of iterate, and many internal functions it relies on have since changed.

How it loads and hides

Adore-ng is an ordinary module, loaded with insmod and kept across reboots by whatever the intruder adds to the boot sequence. It does not patch the syscall table. Elastic calls it a VFS hooker: it swaps function pointers in the kernel's file system structures. In the mirrored source:

MechanismWhat it hides
Replaces the directory-reading operation (readdir or iterate) of the root file systemFiles and directories owned by one specific UID and GID pair, chosen at build time
Replaces the same operation and the lookup operation of /procHidden PIDs; lookup also carries the control channel
Replaces tcp4_seq_show behind /proc/net/tcpConnections on chosen ports
Replaces recvmsg on Unix datagram sockets, for processes named syslog…Messages from hidden processes never reach the syslog daemon
Replaces the write operation of /var/run/utmp, /var/log/wtmp and /var/log/lastlogWrites from hidden processes are silently dropped
Removes its /sys/module kobject and unlinks itself from the module listAbsent from lsmod, /proc/modules and /sys/module

A userland client, ava, talks to the module by looking up special names under /proc. A build-time key authenticates a shell, after which it can get root and hide or unhide PIDs.

The release also offered to link the rootkit into another module's object file, so that it would load under a legitimate module's name. Only digest checks against the distribution's packages catch that.

Traces on disk

ItemWhatSource
Files owned by a numeric UID and GID that no account usesHidden by ownership. The mirror's example build uses very large values (2618748389 and 4063569279)Mirror source
The module, as adore-ng.ko or under any name; for 2.4 kernels, adore-ng.oLoaded rootkitMirror source
ava, or another small client binaryControl toolMirror source
A legitimate module whose file differs from its packageA relinked rootkitMirror source (relink option)
Gaps in wtmp and lastlog that match other evidence of loginsDropped recordsMirror source
Syslog with no entries for a period of known activityFiltered messagesMirror source
Boot-time module loading: /etc/modules, /etc/modules-load.d/, /etc/rc.local, /etc/rc.d/, /etc/sysconfig/modules/Persistence added by the intruderGeneral

The UID and GID hiding is the most useful offline lead. On a clean analysis machine the files are visible, and their owner matches no account.

How to check a host

Live, with caution. Every tool on the host goes through the replaced VFS operations. Static tools are hidden from too.

cat /proc/sys/kernel/tainted
unhide brute proc                                  # PIDs that answer but are missing from /proc listings
ss -tan; cat /proc/net/tcp                         # compare with a capture or flow log taken outside the host
  • Because Adore-ng also removes its /sys/module entry, comparing /sys/module with /proc/modules does not catch it.
  • On the old kernels it runs on, the memory route is the dependable one. Volatility's check_fop and check_afinfo plugins verify file and network operation pointers, which is exactly what Adore-ng replaces. In Volatility 3 they are linux.malware.check_afinfo; the file-operations check exists only in Volatility 2 (linux_check_fop). See memory forensics.

Offline.

R=/mnt/evidence
find "$R" -xdev \( -nouser -o -nogroup \) -printf '%U:%G %TY-%Tm-%Td %p\n' 2>/dev/null | sort | head -50
find "$R" -xdev -type f \( -name '*.ko' -o -name '*.o' \) -path '*/lib/modules/*' -newer "$R"/etc/hostname 2>/dev/null
strings -a /path/to/suspect.ko | grep -iE 'adore|ava|ELITE|fullprivs|hide-|unhide-'
rpm --root "$R" -Va 2>/dev/null | grep '/lib/modules/'      # RHEL family; on Debian: debsums --root="$R" -c
last -f "$R"/var/log/wtmp | head -40
  • -nouser -nogroup lists files whose numeric owner has no entry in the image's passwd and group. find resolves names through the analysis machine's account database, so treat the output as a lead and confirm against the image's /etc/passwd and /etc/group.
  • Many legitimate tarball extractions also leave unknown owners. Look for a cluster sharing one unusual pair.

What the checker looks for

The linuxkernel module can see:

  • A module file under lib/modules/: "Unsigned module among signed modules" and "Module unknown to the kernel build and to every package". Hook-target names such as tcp4_seq_show raise "Names kernel functions that rootkits hook"; /proc/net/tcp appears among the module's notable strings.
  • "Module built for another kernel", when its version magic does not match the folder it sits in.
  • Taint warnings in kern.log or messages, on kernels recent enough to print them.
  • A boot entry for such a module: "Boot configuration loads a flagged module", and, with the collect script's _live/ outputs, "Set to load at boot, missing from the live module list" when it is configured and on disk but absent from /proc/modules.

It cannot see:

  • a rootkit relinked into a legitimate module that keeps its name, since it does not verify package digests. If the relinking dropped the module's appended signature, "Unsigned module among signed modules" still shows it;
  • files hidden by ownership;
  • the /proc control channel.

Because Adore-ng hides from both module views, "Loaded module missing from /proc/modules" will not fire.

Removal and recovery

  1. Capture memory and image the disk. Adore-ng's pointer swaps exist only in memory. They are the proof of compromise, and they reveal which operations were replaced.
  2. Find every file owned by the hiding UID and GID pair, the client, the module and its loader. Verify every module and boot-time binary against the distribution's packages, to catch a relinked module.
  3. Rebuild. Any process could be given root, and logs were filtered at the source, so the host's own records cannot be trusted for the period of infection. Rebuild from known-good media on a supported kernel.
  4. Rotate every credential used on the host. Use logs kept elsewhere (central syslog, network devices) to scope the activity, since the local logs may be incomplete.
  5. Harden. A supported kernel with module signature enforcement refuses an unsigned module like this one. Ship logs off the host in real time.

Syslogk is the current descendant to know. Diamorphine shows the other classic design, syscall-table hooking.

Sources

Primary public reports, newest first.

  1. 2026-03-05Hooked on Linux: Rootkit Taxonomy, Hooking Techniques and TradecraftElastic Security Labs
  2. 2022-06-13Linux Threat Hunting: 'Syslogk' a kernel rootkit found under development in the wildGen Digital (Avast)
  3. 2014-09-26adore-ng, adapted for 2.6 and 3.x kernels (source mirror)GitHub

See also

Related families