diff --git a/rules/0685-cowrie_rules.xml b/rules/0685-cowrie_rules.xml new file mode 100644 index 000000000..e836ac896 --- /dev/null +++ b/rules/0685-cowrie_rules.xml @@ -0,0 +1,47 @@ + + + + + + + json + ^cowrie + cowrie messages grouped. + + + + 90000 + cowrie.login.failed + cowrie login failed + cowrie, + + + + 90000 + cowrie.login.success + cowrie login success + cowrie, + + + + 90000 + cowrie.command.input + cowrie command input + cowrie, + + + + 90000 + cowrie.client.version + cowrie client version + cowrie, + + + + diff --git a/tools/rules-testing/tests/cowrie_rules.ini b/tools/rules-testing/tests/cowrie_rules.ini new file mode 100644 index 000000000..6991a576a --- /dev/null +++ b/tools/rules-testing/tests/cowrie_rules.ini @@ -0,0 +1,30 @@ +[Cowrie login failed] + +log 1 pass = {"eventid": "cowrie.login.failed", "username": "raspberry", "timestamp": "2018-09-05T13:52:42.584350Z", "message": "login attempt [raspberry/admin] failed", "src_ip": "193.201.224.214", "session": "5d77535d8ac4", "password": "admin", "sensor": "honeypot-ssh"} + +rule = 90005 +alert = 3 +decoder = json + +[Cowrie login succes] + +log 1 pass = {"eventid": "cowrie.login.success", "username": "root", "timestamp": "2018-09-05T14:24:20.903909Z", "message": "login attempt [root/] succeeded", "src_ip": "222.112.82.68", "session": "d051258efd62", "password": "", "sensor": "honeypot-ssh"} + +rule = 90010 +alert = 3 +decoder = json + +[Cowrie command input] + +log 1 pass = {"eventid": "cowrie.command.input", "timestamp": "2018-09-05T13:56:32.039222Z", "message": "CMD: ll", "src_ip": "116.227.2.205", "session": "61e431803b56", "input": "ll", "sensor": "honeypot-ssh"} +rule = 90015 +alert = 5 +decoder = json + +[Cowrie client version] + +log 1 pass = {"eventid": "cowrie.client.version", "session": "dd98054a9b17", "timestamp": "2018-09-12T14:18:40.226440Z", "message": "Remote SSH version: 'SSH-2.0-OpenSSH_7.3'", "src_ip": "5.188.86.198", "version": "'SSH-2.0-OpenSSH_7.3'", "sensor": "honeypot-ssh"} + +rule = 90020 +alert = 3 +decoder = json