Scanned Then Logged In
One source sets off a Suricata scan signature and logs in to Cowrie within the same hour: reconnaissance and initial access from the same address, joined across the two sensors by src_ip. Most scanners never log in, and most bots that log in never trip a scan signature, so the pair is rarer and more deliberate than either half. Buckets are fixed hours, so a pair that straddles a boundary is missed.
Tested
Fires on 2 attack events in match.jsonl (1 group) and stays silent on 14 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 68 alerts covering 5,672 sessions, first on 2026-11-10 and last on 2026-12-04.
False positives
- An administrator who port-scans a host and then logs in to it
Sigma
title: Suricata Scan Alert
name: suricata_scan
id: bfe7080d-ad52-40b8-b3de-251d5684267a
status: experimental
description: Base rule for the scan-then-login correlation. Any ET SCAN signature.
author: Estul Lachin
date: 2026-11-10
logsource:
product: suricata
detection:
selection:
signature|startswith: 'ET SCAN '
condition: selection
level: informational
---
title: Cowrie Successful Login (Scan Correlation)
name: cowrie_login_success
id: 2b3d71da-f012-41c6-abaf-3857ce2f0e51
status: experimental
description: |
Base rule for the scan-then-login 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-10
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: Scanned Then Logged In
id: c3d1c2e7-602e-4cb4-a4c8-52a99b66c1e5
status: experimental
description: |
One source sets off a Suricata scan signature and logs in to Cowrie within the same hour:
reconnaissance and initial access from the same address, joined across the two sensors by
src_ip. Most scanners never log in, and most bots that log in never trip a scan signature,
so the pair is rarer and more deliberate than either half. Buckets are fixed hours, so a pair
that straddles a boundary is missed.
references:
- https://attack.mitre.org/techniques/T1595/
- https://attack.mitre.org/techniques/T1078/
author: Estul Lachin
date: 2026-11-10
tags:
- attack.reconnaissance
- attack.t1595
- attack.initial-access
- attack.t1078
correlation:
type: temporal
rules:
- suricata_scan
- cowrie_login_success
group-by:
- src_ip
timespan: 1h
falsepositives:
- An administrator who port-scans a host and then logs in to it
level: medium
Splunk SPL
``` Scanned Then Logged In. Generated from rules/scan_then_login.yml by tools/build.py; do not edit. ```
| multisearch
[ search index=honeypot sourcetype=suricata:alert signature="ET SCAN *" | eval event_type="suricata_scan" ]
[ 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" ]
| bin _time span=1h
| stats dc(event_type) as event_type_count by _time src_ip
| search event_type_count >= 2
Microsoft Sentinel KQL
// Scanned Then Logged In. Generated from rules/scan_then_login.yml by tools/build.py; do not edit.
union
(Suricata_CL | where signature startswith "ET SCAN " | extend event_type = "suricata_scan"),
(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")
| summarize event_type_count = dcount(event_type) by bin(TimeGenerated, 1h), src_ip
| where event_type_count >= 2