Case 5
Linux rootkit compromise: trojanized utilities and boot persistence
Reconstructed a rootkit installation on a Honeynet Linux root partition with Autopsy and a read-only EXT2 block parser. Installation confirmed; entry vector and mail delivery not proven.
Kit
Confirmed
Deleted /lk.tgz holds the last/ rootkit package: 23 entries.
Shown in figures 1
Replaced
Confirmed
ps, netstat and ifconfig match the kit's hashes; the originals are orphaned.
Hidden
Confirmed
Tools staged in /dev/ida/.drag-on; tcp.log names FTP and Telnet.
Installer
Confirmed
The script unsets HISTFILE, swaps utilities and builds the hidden stage.
Persistence
Confirmed
rc.sysinit changed at 04:45:03 AST and carries the kit's lsattr line.
Shown in figures 8
Inventory
Confirmed
A host profile addressed to two mailboxes, recovered from blocks 90417–90418.
Delivery
Not proven
No mail or network log shows it sent; /var was not in the image.
Case LIN-001: Linux rootkit compromise
Honeynet Scan of the Month #15 · Confirmed: post-compromise rootkit installation
| Item | Value |
|---|---|
| Case ID | LIN-001 |
| Evidence | Linux EXT2 root partition image |
| Prepared by | Turki Adnan Abbas · تركي عدنان عباس |
| Scope | Independent examination of a public training image |
Assessment. Rootkit installation is confirmed through matching system-binary hashes, hidden staging artifacts, boot-script modification and recovered deleted files. The initial intrusion vector and successful outbound email delivery remain unproven.
Evidence provenance: public Honeynet training dataset. No live compromised host was examined.
01. Executive determination
The supplied forensic image (honeypot.hda8.dd) contains convergent evidence that an attacker installed a Linux rootkit. The archive /lk.tgz was identified in deleted-space records; rootkit-specific executables were present at their target system paths, hidden components were recovered under /dev/ida/.drag-on, and a startup command consistent with the recovered installer was visible in /etc/rc.d/rc.sysinit.
| Question | Assessment | Basis |
|---|---|---|
| Was a rootkit installed? | CONFIRMED | Executable hashes, hidden copies, boot modification |
| Were system utilities replaced? | CONFIRMED | ps, netstat, ifconfig; matching archive and allocated hashes |
| Was persistence configured? | CONFIRMED | Injected startup entry in rc.sysinit |
| Was system inventory created? | CONFIRMED | Recovered plaintext in unallocated blocks 90417–90418 |
| Were credentials stolen? | NOT ESTABLISHED | Sniffer/parsing capability; no proven stolen credential set |
| Was email delivered outside? | NOT ESTABLISHED | Messages prepared; mail or network delivery logs unavailable |
| How did the intruder first enter? | UNDETERMINED | Initial access/authentication evidence unavailable |
02. Scope, source and integrity
Scope: file-system-level examination of the public Honeynet Scan of the Month #15 root partition only, with corroboration from the investigator’s Autopsy screenshots, exported orphan-file CSV, recovered file-content views and a read-only extraction of two unallocated EXT2 blocks. The image represents /dev/hda8 mounted at /. The separate /var volume (/dev/hda7) was not included in the examined material.
| Item | Value |
|---|---|
| Primary image | honeypot.hda8.dd — EXT2 root partition; Red Hat-era Linux |
| MD5 (image) | 5a8ebf5725b15e563c825be85f2f852e |
| Reference image MD5 | 5a8ebf5725b15e563c825be85f2f852e (Honeynet) |
| Data examined | Allocated files, unallocated inodes, deleted archive, recovered blocks |
| Tooling | Autopsy 4.23.1; Timeline Explorer; PowerShell; Python read-only block parser; VS Code Restricted Mode |
| Time basis | Autopsy values transcribed as displayed (AST). No conversion to other time zones. |
Integrity caveat. The image MD5 is supported by a terminal screenshot and the public reference. An independently computed SHA-256 of the primary image was not available in the evidence package; this report is not a complete chain-of-custody record.
03. Examination methodology
- Established image identity against the public reference; reviewed allocated and deleted areas in Autopsy.
- Identified the deleted
/lk.tgzarchive and inspected its 23 recovered components without executing the files. - Compared the SHA/MD5 artifacts provided by Autopsy and an exported orphan-file inventory with the allocated Linux binaries.
- Examined hidden directories,
tcp.log, the installation script, network service files andrc.sysinit. - Searched indexed and unallocated material for system-reconnaissance remnants; read EXT2 blocks 90417–90418 without writing to the image.
- Examined root shell history and account records as contextual checks; explicitly separated findings from unverified hypotheses.
04. Detailed findings
F01. Deleted rootkit archive and contents
An unallocated/deleted /lk.tgz archive was identified. The archive contains a last/ directory and 23 entries, including install, cleaner, linsniffer, logclear, mkxfs, ps, netstat, ifconfig, top, inetd.conf, services, ssh and supporting SSH/CGI tools. The recovered installer is a shell script; no direct execution was performed during this examination.
Evidence: E01–E02; Figure 01.
F02. Trojanized system binaries and recovered originals
Allocated paths /bin/ps, /bin/netstat and /sbin/ifconfig match the hashes of the corresponding rootkit archive binaries. Separate orphaned inode records identify older executable bodies with different hashes. The 04:45:02 AST change-time cluster is consistent with installer-driven file replacement, and the recovered shell script includes explicit remove-and-replace commands.
| Utility | Installed / rootkit MD5 | Unallocated inode / MD5 |
|---|---|---|
/bin/ps |
7728c15d89f27e376950f96a7510bf0f |
30191 / 5e1725f2734365fef9e55398785f3033 |
/bin/netstat |
2b07576213c1c8b942451459b3dc4903 |
30188 / f174e862d00d0998c3fa4ccd632019b5 |
/sbin/ifconfig |
086394958255553f6f38684dad97869e |
48284 / b52af438845c776cde94f67e19cd037a |
The local CSV directly supports the unallocated status, timestamps and hashes. The hashes above are MD5 for artifact correlation, not a claim of modern cryptographic collision resistance.
F03. Hidden staging and network-monitoring artifacts
Autopsy shows an allocated /dev/ida/.drag-on/ directory containing linsniffer, logclear, mkxfs, sense, sl2, s, SSH material and tcp.log. The installer creates the staging folder and copies those components to it. The tcp.log text view contains entries referring to ports 21 (FTP) and 23 (Telnet), with a timeout marker. This supports deployed network-monitoring capability and possible observed traffic, but does not prove credential capture or exfiltration.
Evidence: E05–E06; Figures 03–04. Classification: malicious staging and potential network sniffing.
F04. Persistence and anti-forensic installation logic
The recovered install script contains unset HISTFILE, replacement of /bin/ps, /bin/netstat, /sbin/ifconfig and /usr/bin/top, startup-file modification, CGI placement attempts, and deletion of last, lk.tgz and computer. The currently allocated rc.sysinit includes a rootkit-related /usr/bin/lsattr command at its end. Therefore the boot-time persistence configuration is established; an actual later reboot and execution are not independently demonstrated.
Evidence: E07–E09; Figures 05–08. Script behavior is intent unless independently corroborated on the imaged system.
Installer code analysis: what the recovered shell script actually does
The recovered last/install file is a privileged Bourne-shell installer, not merely a collection of suspicious file names. It performs a scripted sequence intended to replace trusted administration commands with attacker-supplied binaries, conceal selected activity, prepare network-monitoring tools, retain access at boot, and collect host inventory for email. Its first lines clear the display and unset HISTFILE to discourage command-history retention; it then changes package-file ownership to root and checks for build/SSH prerequisites. Those checks print status messages but do not themselves establish that the prerequisites were present.
| Lines | Observed code / action | Operational purpose and interpretation |
|---|---|---|
| 31–39 | rm -rf then mv: ifconfig, netstat, ps, top; copy mkxfs |
Removes installed utilities and places kit binaries at standard command paths. ps/netstat/ifconfig replacements were independently corroborated by hashes. |
| 44–65 | Writes process-name patterns to /dev/rpm and IP/port entries to /dev/last |
Creates configuration lists consistent with filtering or hiding processes and network information; the precise rule semantics were not independently reverse-engineered. |
| 69–76 | Creates /dev/ida/.drag-on; copies linsniffer, logclear, sense, sl2, mkxfs and SSH material; touches tcp.log |
Stages monitoring/maintenance components in a concealed directory and initializes log-file placeholders. The hidden directory and tcp.log are present in the image. |
| 78–80 | Copies inetd.conf and services into /etc; sends HUP to inetd |
Overwrites network-service configuration and asks inetd to reload it. Installed files match the kit; this alone does not prove a particular backdoor service ran. |
| 85–91 | Replaces /usr/bin/lsattr; appends invocation to rc.sysinit; chmod 500; chattr +i; invokes lsattr |
Installs a masquerading binary, sets an automatic boot-time invocation and makes that binary harder to change or delete using the immutable attribute. The added rc.sysinit line is independently present. |
| 95–118 | Moves last.cgi into existing web-server cgi-bin folders, if found | Attempts to expose a CGI component through whichever listed web-server directory exists; the script does not itself prove that a reachable CGI endpoint was deployed. |
| 120–132 | Collects uname, hostname, interface IP, uptime, CPU and disk details in computer; pipes to mail twice |
Builds host-reconnaissance output and prepares two outbound messages. Recovered unallocated blocks contain the resulting addressed message bodies; successful delivery is unverified. |
| 139–140 | Changes to / and removes last, lk.tgz, computer and lk.tar.gz |
Deletes installer material and the temporary inventory file to reduce local traces; deleted-image artifacts support cleanup activity. |
Causality and confidence. Finding these commands in a recovered installer proves the kit was designed to perform these operations, not that every branch succeeded. Independent image artifacts confirm replacement of three system binaries, the hidden staging path, the changed /etc files, a persistence line in rc.sysinit, and recovered reconnaissance text. No evidence establishes execution of last.cgi, a later successful reboot, captured passwords, or completion of email delivery. Figures 05–07 show the command sequence; Figure 08 documents the startup file’s change time.
F05. Network-service configuration replacement
The allocated /etc/inetd.conf and /etc/services files match the respective recovered archive and orphan-file MD5 values. Both show metadata-change timestamps at approximately 04:45:03 AST, consistent with the installer. Examination of inetd.conf revealed active Telnet and POP3 entries but did not establish that either service was maliciously introduced. The separate identd.conf file is not an earlier copy of inetd.conf.
| File | Allocated MD5 | Matching deleted inode |
|---|---|---|
/etc/inetd.conf |
b63485e42035328c0d900a71ff2e6bd7 |
2044 |
/etc/services |
54e41f035e026f439d4188759b210f07 |
2046 |
F06. System reconnaissance and attempted email exfiltration
The installer builds a file named computer using uname, hostname, ifconfig, uptime, /proc/cpuinfo and df; it passes this output to mail twice. A read-only extraction of EXT2 data blocks 90417 and 90418 recovered plaintext message bodies with Linux kernel 2.2.14-5.0, host asdf1, internal IP 172.16.1.108, CPU details and filesystem usage. The extracted messages identify subjects placinte and roote and recipients last@linuxmail.org and bidi_damm@yahoo.com respectively. Actual mail transmission and receipt were not established.
Evidence: E12; Figure 11. The available image omits the separately mounted /var partition where mail and authentication logs might have resided.
F07. Additional root-account context is not an entry vector
The 211-byte /root/.bash_history lists ftp ftp.home.ro, unpacking and compiling emech-2.8, ./mech and editing ftpaccess. The history has no per-command timestamps. A zero-byte /etc/ftpaccess was observed with a 17:52:45 AST modification time; /etc/passwd and passwd- are hash-identical and do not show an added UID-0 account. These artifacts cannot be attributed to the initial intruder with the examined data and are not used to infer an initial access vector.
Evidence: E13–E14; Figures 10 and 12. Finding scope: contextual activity, no definitive actor attribution.
05. Reconstructed file-system timeline
Times as displayed by Autopsy (AST). Metadata timestamps indicate file-system changes, not directly the execution time of a specific command.
| Date / time (AST) | Observed event | Evidence |
|---|---|---|
| 2001-03-15 14:20:27 | passwd and passwd- show matching content and metadata. | E14 |
| 2001-03-16 04:45:02 | Trojanized ps / netstat / ifconfig; hidden rootkit content timestamps; orphaned originals show related change times. | E03–E05, E10 |
| 2001-03-16 04:45:03 | inetd.conf, services and rc.sysinit modified; startup entry observed. | E09, E11 |
| 2001-03-16 04:45:05 | Deleted installer/configuration inodes show change times. | E10 |
| 2001-03-16 17:52:45 | Zero-byte ftpaccess file metadata last modified. | E13 contextual |
| 2001-03-16 17:53:00 | root/.bash_history last modified. | E13 contextual |
| 2001-03-16 19:28:30 | tcp.log last modified. | E06 |
06. Conclusions and confidence
- High confidence. The rootkit was installed, system utilities were replaced, hidden components were staged, and a startup persistence entry was present.
- Moderate confidence. The rootkit’s network monitoring functionality was positioned to process traffic; a
tcp.logexists, but the scope of any captured content is unproven. - High confidence (preparation), no delivery proof. System profiling data and addressed email message bodies were produced; receipt or successful transmission was not established.
- Unresolved. Initial intrusion vector, source IP and exploit path cannot be supported by the available
/partition alone. No additional account with UID 0 was identified.
The evidence supports an attacker-controlled, root-privileged post-exploitation sequence in which a deleted kit was installed, standard system utilities were substituted, hidden monitoring components were positioned, persistence was configured, and host inventory was prepared for outbound email. The analysis does not claim a particular vulnerability, initial-login method, attacker identity or confirmed data delivery.
07. Limitations and integrity statement
- Only the root EXT2 partition (
/dev/hda8) was provided;/var(/dev/hda7) and network/IDS packet captures were not examined. - No comprehensive original acquisition log, custody chain or primary image SHA-256 manifest was available.
- A file-system change time is not necessarily a user command-execution time. No conclusion here relies solely on created-date fields rendered as 0000-00-00.
- Non-executed malware analysis only. The installer and potentially hostile binaries were not run on the analysis system.
08. Evidence register
| ID | Source / artifact | Disposition |
|---|---|---|
| E01 | /lk.tgz — deleted archive |
Primary |
| E02 | last/ rootkit package (23 entries) |
Primary |
| E03 | /bin/ps; /bin/netstat — installed hashes |
Primary |
| E04 | /sbin/ifconfig — installed hash |
Primary |
| E05 | /dev/ida/.drag-on — hidden rootkit tools |
Primary |
| E06 | /dev/ida/.drag-on/tcp.log |
Primary, bounded inference |
| E07 | last/install — replacement commands |
Primary script |
| E08 | last/install — persistence, email and cleanup |
Primary script |
| E09 | /etc/rc.d/rc.sysinit — injected entry |
Primary |
| E10 | OrphanFiles CSV — 26 records + 3 original binaries | Primary exported metadata |
| E11 | /etc/services; /etc/inetd.conf hashes |
Primary |
| E12 | Unallocated blocks 90417–90418 — system inventory | Primary recovered content |
| E13 | /root/.bash_history; /etc/ftpaccess |
Context; not attributed |
| E14 | /etc/passwd vs /etc/passwd- |
Context; not malicious |
09. Indicators and pivot references
| Indicator type | Value | Meaning |
|---|---|---|
| Directory | /dev/ida/.drag-on/ |
Hidden staging location |
| Original archive | /lk.tgz (deleted) |
Recovered rootkit distribution |
| Startup file | /etc/rc.d/rc.sysinit |
Configured persistence |
| Monitoring | /dev/ida/.drag-on/linsniffer |
Network sniffer component |
| Network-log file | /dev/ida/.drag-on/tcp.log |
Observed FTP/Telnet log references |
| Email recipient | last@linuxmail.org |
From script and recovered message body |
| Email recipient | bidi_damm@yahoo.com |
From script and recovered message body |
| Local IP | 172.16.1.108 | Imaged host network interface |
| Hostname | asdf1 | Imaged host |
| Source image MD5 | 5a8ebf5725b15e563c825be85f2f852e |
Dataset integrity reference |
10. Selected evidence figures
Screenshots are cropped for readability. Screenshots of software errors, repeated views and unrelated cases are excluded.
Figure 1
Recovered rootkit archive lk.tar\last: file names, sizes and timestamps, including ps, netstat and ifconfig

Figure 2
Autopsy /sbin: ifconfig changed 2001-03-16 04:45:02 AST, 19,840 bytes, the size of the kit's ifconfig

Figure 3
Hidden directory /dev/ida/.drag-on: linsniffer, logclear, mkxfs, s, sense, sl2, SSH material and tcp.log

Figure 4
tcp.log strings: connections to asdf1 on ports 21 and 23, and a [Timed Out] marker
![tcp.log strings: connections to asdf1 on ports 21 and 23, and a [Timed Out] marker](/work/honeynet-linux-rootkit/04-tcp-log.png)
Figure 5
Installer, lines 1–36: unset HISTFILE, then rm -rf and mv over ifconfig, netstat and ps (user name redacted)

Figure 6
Installer, lines 46–80: hiding lists in /dev/rpm and /dev/last, the .drag-on stage, inetd.conf and services (user name redacted)

Figure 7
Installer, lines 104–138: last.cgi placement, the computer inventory, and mail to last@linuxmail.org and bidi_damm@yahoo.com

Figure 8
/etc/rc.d/rc.sysinit: modified and changed 2001-03-16 04:45:03 AST, in the installer's time cluster

Figure 9
$OrphanFiles: the deleted kit inodes 2039–2061, and the original binaries at inodes 30188, 30191 and 48284

Figure 10
/etc: passwd and passwd- with the same size and timestamps; no added account

Figure 11
Read-only extraction of EXT2 blocks 90417–90418: the host profile addressed to two recipients (user name redacted)

Figure 12
/root/.bash_history: ftp ftp.home.ro, emech-2.8 built and ./mech run; no timestamps
