~ / honeypot / sigma-vs-a-week-of-attacks
26 November 2026 · Updated 27 November · Detection engineering · 12 min read

109 public Sigma rules, a week of attacker commands: one medium alert, and the six rules I wrote for the rest

sigmadetection-engineeringoutlawcowrieattack

I replayed a week of attacker commands through 109 public Sigma rules. The Outlaw botnet ran the same script from 24 addresses and drew one medium alert, on the line that empties /etc/hosts.deny. On the steps that lock the owner out, nothing public fired above informational. These are the six rules I wrote for what the public set missed, and the variant that got past my first five.

TL;DR

What I did Replayed every command typed in 133 honeypot sessions from 83 addresses (seven days to 26 Nov 2026) through 109 SigmaHQ Linux rules (commit 876eb7b, 25 Nov) and through the rules I had written by then
Public rules 6 of the 109 fired: one medium, two low, three informational. None of the set's 32 high-level rules fired
The Outlaw script 24 addresses ran the same 19-command script. The steps that lock the owner out (unlock ~/.ssh, swap the keys, change the password) drew one informational File Deletion hit from the public set between them. Its one medium alert is on a different line, the one that empties /etc/hosts.deny
My rules Five rules written from one captured session fired on 20 to 24 of those addresses. A sixth exists because the first five missed four of the 24: they changed the password with passwd, not chpasswd
Not covered 55 distinct command shapes matched no rule at all. Most are ordinary admin commands that only mean something as a sequence; the rest are router and IoT markers that matter on a honeypot, not on a server
Limits These are typed lines from an emulated shell, not endpoint telemetry. They show that a rule matches the text, not that your pipeline would have alerted. My rules are marked experimental
Verdict The public set says little about this botnet at the steps that matter, and behaviour rules written from a captured session close most of the gap. Medium confidence that this generalizes: it is one botnet, one week, one sensor

Update, 27 Nov: I ran the same replay at 17:22 CST on 27 Nov, over 185 sessions from 115 addresses. Everything below is as of 26 Nov. The Outlaw script now accounts for 57 sessions from 47 addresses, up from 28 and 24. The password change splits 37 addresses with chpasswd and 10 with passwd, so the variant that got past my first five rules is 10 of 47 (21%), up from 4 of 24 (17%). That replay had five of the six rules loaded, and the passwd rule is not among the ones that fired, so the 10 come from the command text. Command shapes that no rule covers: 61, up from 55. The CPU, memory and which ls shapes went from 24 to 47 addresses, matching the Outlaw count, which fits them being the script's own checks; the router-console shapes grew by only three addresses (config terminal from 23 to 26). The counts and the guess-list fingerprint are in 24 addresses became 47 in twenty hours.

Update, 27 Nov, 23:10 CST: I ran the replay again, this time with all six of my rules loaded, over 200 sessions from 129 addresses. The Outlaw script is now 66 sessions from 56 addresses. The chpasswd rule fires on 44 of them and the passwd rule on 12, and 44 and 12 make 56. So the variant my first five rules missed is 12 of 56 (21%) and is now counted by the rule I wrote for it, not from the command text. The counts, with the guess-list fingerprint, are in the follow-up.

How I ran the check

My hunt tool can replay what attackers type into the honeypot through Sigma rules. Honeypot input is not process telemetry, so the mapping is explicit. A typed line is split into the commands a shell would start (on ;, &&, ||, pipes and sh -c). Each becomes a process event whose Image is its first word and whose CommandLine is the command, and the whole typed line is also tested as a CommandLine. Rules that need a parent process, a user or other fields a honeypot cannot supply were left out when I compiled the set. 109 SigmaHQ Linux process-creation rules remained, and my own rules sit in the same set.

A hit means a rule written by a detection engineer would have fired on this text. It is evidence about coverage, not about intent. The run was at about 21:40 CST on 26 Nov, over the 133 sessions with typed commands that the sensor logged in the previous seven days.

What fired

Rule Written by Level Sessions Addresses ATT&CK
Outlaw Botnet mdrfckr SSH Key Written mine high 28 24 T1098.004
SSH Directory Wiped and Authorized Key Written in One Command mine high 28 24 T1070.004, T1098.004
Immutable Attribute Removed From SSH Files or Directory With Combined Chattr Flags mine medium 28 24 T1222.002
Potential Suspicious Change To Sensitive/Critical Files SigmaHQ (@d4ns4n_, Wuerth-Phoenix) medium 24 20 T1565.001
Root Password Set Non-Interactively Through an Echo Pipe mine medium 24 20 T1098
TCP Wrappers Deny List Emptied mine medium 24 20 T1686
Crontab Enumeration SigmaHQ (Joseliyo Sanchez) low 28 24 T1007
Curl Usage on Linux SigmaHQ (Nasreddine Bencherchali, Nextron Systems) low 2 2 T1105
System Information Discovery SigmaHQ (Ömer Günal, oscd.community) informational 71 40 T1082
File Deletion SigmaHQ (Ömer Günal, oscd.community) informational 29 25 T1070.004
System Network Discovery - Linux SigmaHQ (Ömer Günal and remotephone, oscd.community) informational 2 2 T1016

Six public rules fired: one medium, two low and three informational. The public set holds 32 high-level and 47 medium-level rules, and none of the high ones fired. Both high-level hits and three of the four medium-level hits above are rules I wrote from this botnet's own session, so that comparison flatters them. What is worth reading is how little the public set said about those particular steps.

The Outlaw script, step by step

24 addresses ran the same script in this window. The full command list is in the Outlaw write-up. This is what each step looks like to the two rule sets. I ran every line below through both, one line at a time.

Step What it does Public rules (SigmaHQ) My rules
1 cd ~; chattr -ia .ssh; lockr -ia .ssh: unlocks ~/.ssh none Immutable Attribute Removed… (medium)
2 cd ~ && rm -rf .ssh && mkdir .ssh && echo "ssh-rsa …mdrfckr">>.ssh/authorized_keys && …: wipes the directory, writes one key File Deletion (informational) SSH Directory Wiped… (high); Outlaw Botnet mdrfckr SSH Key Written (high)
4 echo "root:<password>"|chpasswd|bash: sets the root password (20 of the 24 addresses) none Root Password Set… (medium)
4, variant echo "<current>\n<new>\n<new>\n"|passwd: the same lock-out through passwd (the other 4 addresses) none none, until the sixth rule (below)
5 rm -rf /tmp/secure.sh; … pkill -9 auth.sh; echo > /etc/hosts.deny; …: removes rival scripts, empties the TCP-wrappers deny list File Deletion (informational); Potential Suspicious Change To Sensitive/Critical Files (medium) TCP Wrappers Deny List Emptied (medium)
10 crontab -l Crontab Enumeration (low) none
12, 15, 16, 18 uname -m, uname, uname -a, lscpu | grep Model System Information Discovery (informational) none
3, 6–9, 11, 13, 14, 17, 19 CPU counts, free -m, which ls, ls -lh $(which ls), w, top, whoami, df -h none none

In short: the public set noticed that something was deleted, that someone read the crontab and the kernel version, and it raised one medium on the line that empties /etc/hosts.deny. On the unlock and the password change it said nothing, and on the key swap it said File Deletion and nothing else. Those are the steps that lock the owner out.

The one medium. Potential Suspicious Change To Sensitive/Critical Files fires on echo > /etc/hosts.deny. I tested the pieces of step 5 separately: that command alone fires it, and rm -rf /tmp/secure.sh alone fires only File Deletion. It is a reasonable catch. It just is not the step an analyst would most want flagged.

A flag that slips past. SigmaHQ's Remove Immutable File Attribute rule fires on chattr -i .ssh and does not fire on chattr -ia .ssh, the form this script uses. I ran both. My rule matches any flag group that contains i and requires a .ssh or authorized_keys path, so it is narrower than the public one on purpose.

The rules

The five rules that fired are behaviour rules except one: they keep working when the attacker changes the key, the password or the file names. The mdrfckr rule is an indicator rule. It is precise, but it only finds this one key. The sixth rule is below, after the story of why it exists. All six are under the Detection Rule License 1.1, the licence SigmaHQ uses; if you reuse them, keep the author line. Each carries status: experimental: none has run on telemetry that is not mine.

1. Immutable attribute removed from SSH files (medium)

title: Immutable Attribute Removed From SSH Files or Directory With Combined Chattr Flags
id: 158a4e33-b884-4121-b410-764286af605a
status: experimental
description: |
    Detects chattr removing the immutable (and append-only) attribute from a path under .ssh or from authorized_keys.
    Attackers do this before replacing the SSH directory, because a previous infection or an administrator may have locked it.
    The generic SigmaHQ rule for removing the immutable attribute looks for the literal ' -i ', so combined flags such as
    '-ia' (used by the Outlaw script) and '-Ri' slip past it; this rule matches any flag group that contains i.
references:
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
    - https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_chattr_immutable_removal.yml
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.defense-impairment
    - attack.t1222.002
logsource:
    product: linux
    category: process_creation
detection:
    selection_tool:
        CommandLine|contains: 'chattr '
    selection_flag:
        CommandLine|re: '(^|\s)-[a-zA-Z]*i[a-zA-Z]*(\s|$)'
    selection_path:
        CommandLine|contains:
            - '.ssh'
            - 'authorized_keys'
    condition: selection_tool and selection_flag and selection_path
falsepositives:
    - An administrator unlocking an SSH directory they locked themselves
level: medium

2. SSH directory wiped and authorized key written in one command (high)

title: SSH Directory Wiped and Authorized Key Written in One Command
id: 6320caee-9ca4-4ebc-b5c3-0e3aaac62bdc
status: experimental
description: |
    Detects one shell command line that deletes the ~/.ssh directory and then writes a new authorized_keys file.
    Removing the directory first erases every existing key, so the attacker's key becomes the only way in and
    administrators who log in with keys are locked out. Seen in the first stage of the Outlaw (Dota) SSH botnet,
    which has run the same line since 2018. A key added with a plain append (no deletion) does not match.
references:
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.persistence
    - attack.t1098.004
    - attack.stealth
    - attack.t1070.004
logsource:
    product: linux
    category: process_creation
detection:
    selection_wipe:
        CommandLine|contains:
            - 'rm -rf .ssh'
            - 'rm -rf ~/.ssh'
            - 'rm -rf $HOME/.ssh'
            - 'rm -rf /root/.ssh'
    selection_write:
        CommandLine|contains: 'authorized_keys'
    condition: all of selection_*
falsepositives:
    - Provisioning scripts that rebuild a user's ~/.ssh from configuration management (rare in a single command line; review the account and the key written)
level: high

3. The mdrfckr key (high, indicator)

title: Outlaw Botnet mdrfckr SSH Key Written
id: bf80785b-cbd0-4274-9ce1-1c109f3e0ae0
status: experimental
description: |
    Detects the public key used by the Outlaw (Dota) SSH botnet since 2018, by its comment 'mdrfckr' or by the first
    characters of the key. An indicator rule: it is precise but it only finds this one key. The behaviour rules in this
    folder find the same intrusion if the key changes.
references:
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.persistence
    - attack.t1098.004
logsource:
    product: linux
    category: process_creation
detection:
    selection_comment:
        CommandLine|contains: ' mdrfckr'
    selection_key:
        CommandLine|contains: 'AAAAB3NzaC1yc2EAAAABJQAAAQEArDp4cun2lhr4KUhBGE7VvAcwdli2a8db'
    condition: 1 of selection_*
falsepositives:
    - Security teams that echo the indicator into a search or a rule
level: high

4. Root password set through an echo pipe (medium)

title: Root Password Set Non-Interactively Through an Echo Pipe
id: 5346ec86-8a30-464c-80a1-71675d15becf
status: experimental
description: |
    Detects 'echo "root:<password>" | chpasswd' in a command line. Setting the root password from a pipe is a common step
    after a brute-force login: the guessed password stops working, so rival bots and the owner are locked out.
    Provisioning scripts do the same thing, so this is a lead to check, not a verdict.
references:
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.persistence
    - attack.t1098
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        CommandLine|re: 'echo\s+["'']?root:[^|]*\|\s*chpasswd'
    condition: selection
falsepositives:
    - Image and container build scripts, cloud-init style provisioning
level: medium

5. TCP wrappers deny list emptied (medium)

title: TCP Wrappers Deny List Emptied
id: 100136ee-19c8-4b66-999c-56d3708af790
status: experimental
description: |
    Detects a command line that empties /etc/hosts.deny (the TCP-wrappers deny list) with a redirect or truncate.
    Clearing it removes any host-based block an administrator or a tool such as fail2ban's hosts.deny action added.
    The Outlaw SSH botnet does this early in its first stage, right after it removes rival bot scripts.
references:
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.defense-impairment
    - attack.t1686
logsource:
    product: linux
    category: process_creation
detection:
    selection_redirect:
        CommandLine|contains:
            - 'echo > /etc/hosts.deny'
            - 'echo >/etc/hosts.deny'
            - ': > /etc/hosts.deny'
            - 'cat /dev/null > /etc/hosts.deny'
    selection_truncate:
        CommandLine|contains|all:
            - 'truncate'
            - '/etc/hosts.deny'
    condition: 1 of selection_*
falsepositives:
    - An administrator resetting the deny list by hand
level: medium

The rule I got wrong

I wrote the root-password rule from one captured session, which used echo "root:<password>"|chpasswd|bash. Across the week, 20 of the 24 addresses did exactly that. Four did not: 113[.]125[.]88[.]13, 137[.]97[.]24[.]235, 62[.]234[.]183[.]80 and 78[.]135[.]111[.]65 answered the three prompts of passwd from a pipe instead: echo "<current>\n<new>\n<new>\n"|passwd. The first line is the password that had just worked, so this changes the password of the account they logged in as. For two of the four that account was a user named backdoor or team2, not root.

None of the five rules I had written, and none of the public ones, fires on those lines. I tested all four. The counts show it too: 24 addresses for the unlock and key rules, 20 for the chpasswd rule. The hosts.deny rule also shows 20, and I have not opened the four sessions to see why. The sensor's command log also holds a line from four addresses that reads Enter new UNIX password:, which is the prompt text recorded as a command (I saw it in the report lines for two of the four passwd addresses). My guess is that the emulated passwd asked for input and the script's next line went to the prompt instead of the shell. That is a guess about how Cowrie behaves, not something I verified.

6. Password changed by piping echo into passwd (medium)

title: Password Changed Non-Interactively By Piping Echo Into passwd
id: 9e70014d-e843-4ba6-bda4-8dbaab802a15
status: experimental
description: |
    Detects 'echo "<old>\n<new>\n<new>" | passwd', which answers passwd's three prompts from a pipe. Bots use it right
    after a brute-force login to change the password of the account they logged in as, which locks out the owner and rival bots.
    The chpasswd rule in this folder only matches 'echo root:<pw> | chpasswd', so this variant slipped past it: four of the
    24 addresses that ran the Outlaw script in one week used it. A printf pipe is not matched.
references:
    - https://tonyjucha.com/honeypot/sigma-vs-a-week-of-attacks.html
    - https://tonyjucha.com/honeypot/outlaw-mdrfckr-key-planter.html
author: Anthony Jucha
date: 2026-11-26
tags:
    - attack.persistence
    - attack.t1098
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        CommandLine|re: 'echo\s+(-e\s+)?["'']?[^|]*\\n[^|]*\\n[^|]*\|\s*passwd\b'
    condition: selection
falsepositives:
    - Container image builds and provisioning scripts that set a password with echo -e "pw\npw" | passwd
level: medium

The sixth rule matches that shape. I tested it against four new command lines (two must fire, two look-alikes must stay quiet) together with the earlier 24: all 28 pass in pySigma's own SQLite backend, and the Sigma validator reports no issues. It has not been run over a week of sessions, because my sensor's rule set is compiled ahead of time and I have not rebuilt it. It will also fire on image builds that set a password with echo -e "pw\npw" | passwd; the false-positive note says so.

The lesson is the usual one for rules written from a single sample: a behaviour rule is only as general as the sample it came from. A week of traffic showed the variant.

What no rule covers

55 distinct command shapes (digits normalised) matched no rule at all, public or mine. The most widespread:

Shape Addresses Why no rule fires, and whether one should
cat /proc/cpuinfo | grep name | wc -l 24 An ordinary admin command. It only means something as part of a sequence
free -m | grep Mem | awk … 24 The same
which ls, ls -lh $(which ls) 24 The same. The Outlaw write-up reads these as a check for an emulated shell
df -h | head -n 2 | awk … 23 The same
linuxshell 24 Not a Linux command. I read it as a word these bots try at a router or IoT command-line prompt to reach a real shell; meaningless on a server
config terminal 23 A Cisco-style CLI command, the same router-console escape
>/var/run/.x&&cd /var/run;… then a BusyBox command 23 Creates a file in each of seven directories, then runs a BusyBox command with a random marker. See the BusyBox write-up
cat /proc/mounts; /bin/busybox … 6 The same family
echo 'check_H_small_control|check_H' and its siblings 4 A honeypot-fingerprinting probe. See Caught checking

Most of this list should stay uncovered. A rule for free -m would alert on every administrator. Their value is as a sequence from one session in a few seconds, and a single-event Sigma rule cannot say that. Sigma's correlation rules (event count, temporal) can, and I have not written one. The router and IoT markers only mean something on a router or a honeypot; on a Linux server such a rule would never fire. The one shape here I would consider is the writable-directory probe. I have not written it, because I do not know how that line would reach a real host's logs.

What this does not show

Assessment

Detection ideas (for real systems)

MITRE ATT&CK

ID Technique Evidence
T1098.004 Account Manipulation: SSH Authorized Keys Step 2: the directory is wiped and one key written
T1070.004 Indicator Removal: File Deletion rm -rf .ssh, and the rival scripts deleted in step 5
T1222.002 File and Directory Permissions Modification: Linux and Mac Permissions chattr -ia .ssh
T1098 Account Manipulation chpasswd (20 addresses) or passwd fed from echo (4 addresses)
T1686 Disable or Modify System Firewall echo > /etc/hosts.deny, with TCP wrappers as a loose match
T1565.001 Data Manipulation: Stored Data Manipulation The tag the public rule carries for the same line

IOCs

ipv4    113[.]125[.]88[.]13     passwd variant: echo "<current>\n<new>\n<new>\n"|passwd
ipv4    137[.]97[.]24[.]235     passwd variant
ipv4    62[.]234[.]183[.]80     passwd variant
ipv4    78[.]135[.]111[.]65     passwd variant
sha256  a8460f446be540410004b1a8db4083773fa46f7fe76fa84219c93daa1669f8f2   mdrfckr authorized_keys file
key     ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEArDp4cun2lhr4KUhBGE7VvAcwdli2a8db…   comment: mdrfckr
cmd     cd ~; chattr -ia .ssh; lockr -ia .ssh
text    Enter new UNIX password:     prompt text recorded as a command, from four addresses
id      bf80785b-cbd0-4274-9ce1-1c109f3e0ae0  6320caee-9ca4-4ebc-b5c3-0e3aaac62bdc  158a4e33-b884-4121-b410-764286af605a
id      5346ec86-8a30-464c-80a1-71675d15becf  100136ee-19c8-4b66-999c-56d3708af790  9e70014d-e843-4ba6-bda4-8dbaab802a15

References

Captured on a deliberately exposed honeypot. All indicators are defanged; do not visit them. Sensor location and addressing are withheld. Attribution is limited to what the evidence supports.

← All honeypot investigationstonyjucha.com