Login Followed By Tool Transfer
A session logs in and transfers a tool within the same five-minute window: the automated dropper chain of IoT and Linux botnets. Commands only exist after a login in Cowrie, so grouping by session gives the order without an ordered correlation (which the Splunk backend doesn't support). Buckets are fixed, so a chain that straddles a bucket boundary is missed; widen the timespan to trade precision for recall.
Tested
Fires on 4 attack events in match.jsonl (2 groups) and stays silent on 7 events in nomatch.jsonl. See the test events.
Seen on the honeypot
In the last 30 days (as of 2026-12-05 00:23:53 UTC) this rule raised 847 alerts covering 847 sessions, first on 2026-11-08 and last on 2026-12-04.
Most common matching command (URLs and IP addresses in it are defanged; the attackers' source IPs are never published):
echo -e "\x47\x41\x59\x46\x47\x54"
False positives
- Administrators who log in and immediately download software
Sigma
title: Cowrie Successful Login
name: cowrie_login_success
id: e2755e10-e7f4-4ea1-b0be-1627e577ccbe
status: experimental
description: |
Base rule for the login-then-transfer correlation.
Excludes logins that aren't credentials: a scanner sending HTTP, SIP or RTSP to the Telnet port,
whose request line Cowrie records as the username, and an empty username, which is how Cowrie records
a Telnet login bypass (USER=-f root; telnet_exploit_attempt covers that). Evidence: the Honeypot #1
backlog cleanup of 2026-11-14 closed 11 incidents raised on such logins as false positives; over the
14 days before, 83 probe and 22 empty-username logins, none with a credential-like pair.
author: Estul Lachin
date: 2026-11-08
logsource:
product: cowrie
detection:
selection:
eventid: cowrie.login.success
probe_method:
username|re: '^(GET|POST|HEAD|PUT|DELETE|OPTIONS|CONNECT|PATCH) '
probe_version:
username|contains:
- 'HTTP/1.'
- 'SIP/2.0'
- 'RTSP/1.'
# Three forms, so the evaluator, Splunk and KQL agree: Splunk's rex can't capture an empty
# string (so "" needs its own value), and a missing username is null in the evaluator and Splunk.
empty_username:
- username|re: '^\s*$'
- username: ''
- username: null
condition: selection and not (probe_method or probe_version or empty_username)
level: informational
---
title: Cowrie Tool Transfer Command
name: cowrie_tool_transfer
id: eb6b0dea-d89b-4072-8fff-dc734e9aec17
status: experimental
description: Base rule for the login-then-transfer correlation. Download tools, /dev/tcp, or a hex-echo write.
author: Estul Lachin
date: 2026-11-08
logsource:
product: cowrie
detection:
command:
eventid: cowrie.command.input
input|re: '\b(wget|curl|tftp|ftpget|scp)\b|/dev/tcp/|echo\s+-[a-z]*e[a-z]*\s+["'']?(\\x[0-9a-fA-F]{2}){4}'
download_event:
eventid:
- cowrie.session.file_download
- cowrie.session.file_download.failed
condition: command or download_event
level: informational
---
title: Login Followed By Tool Transfer
id: e0fd1b5d-fea0-406c-8f3e-2a527feea7b0
status: experimental
description: |
A session logs in and transfers a tool within the same five-minute window: the automated dropper
chain of IoT and Linux botnets. Commands only exist after a login in Cowrie, so grouping by session
gives the order without an ordered correlation (which the Splunk backend doesn't support). Buckets
are fixed, so a chain that straddles a bucket boundary is missed; widen the timespan to trade
precision for recall.
references:
- https://attack.mitre.org/techniques/T1078/
- https://attack.mitre.org/techniques/T1105/
author: Estul Lachin
date: 2026-11-08
tags:
- attack.initial-access
- attack.t1078
- attack.command-and-control
- attack.t1105
correlation:
type: temporal
rules:
- cowrie_login_success
- cowrie_tool_transfer
group-by:
- session
timespan: 5m
falsepositives:
- Administrators who log in and immediately download software
level: high
Splunk SPL
``` Login Followed By Tool Transfer. Generated from rules/login_then_tool_transfer.yml by tools/build.py; do not edit. ```
| multisearch
[ search index=honeypot sourcetype=cowrie:json
| rex field=username "(?<usernameMatch>^(GET|POST|HEAD|PUT|DELETE|OPTIONS|CONNECT|PATCH) )"
| eval usernameCondition=if(isnotnull(usernameMatch), "true", "false")
| rex field=username "(?<usernameMatch2>^\\s*$)"
| eval usernameCondition2=if(isnotnull(usernameMatch2), "true", "false")
| search eventid="cowrie.login.success" NOT (usernameCondition="true" OR username IN ("*HTTP/1.*", "*SIP/2.0*", "*RTSP/1.*") OR usernameCondition2="true" OR username="" OR NOT username=*) | eval event_type="cowrie_login_success" ]
[ search index=honeypot sourcetype=cowrie:json
| rex field=input "(?<inputMatch>\\b(wget|curl|tftp|ftpget|scp)\\b|/dev/tcp/|echo\\s+-[a-z]*e[a-z]*\\s+[\"']?(\\\\x[0-9a-fA-F]{2}){4})"
| eval inputCondition=if(isnotnull(inputMatch), "true", "false")
| search (eventid="cowrie.command.input" inputCondition="true") OR eventid IN ("cowrie.session.file_download", "cowrie.session.file_download.failed") | eval event_type="cowrie_tool_transfer" ]
| bin _time span=5m
| stats dc(event_type) as event_type_count by _time session
| search event_type_count >= 2
Microsoft Sentinel KQL
// Login Followed By Tool Transfer. Generated from rules/login_then_tool_transfer.yml by tools/build.py; do not edit.
union
(Cowrie_CL | where eventid =~ "cowrie.login.success" and (not((username matches regex "^(GET|POST|HEAD|PUT|DELETE|OPTIONS|CONNECT|PATCH) " or (username contains "HTTP/1." or username contains "SIP/2.0" or username contains "RTSP/1.") or (username matches regex "^\\s*$" or username =~ "" or isnull(username))))) | extend event_type = "cowrie_login_success"),
(Cowrie_CL | where (eventid =~ "cowrie.command.input" and input matches regex "\\b(wget|curl|tftp|ftpget|scp)\\b|/dev/tcp/|echo\\s+-[a-z]*e[a-z]*\\s+[\"']?(\\\\x[0-9a-fA-F]{2}){4}") or (eventid in~ ("cowrie.session.file_download", "cowrie.session.file_download.failed")) | extend event_type = "cowrie_tool_transfer")
| summarize event_type_count = dcount(event_type), src_ip = take_any(src_ip) by bin(TimeGenerated, 5m), session
| where event_type_count >= 2