I’m trying to sort out the special characters from my canary and it’s giving me trouble with all the quotes on a single line, how do I watch for the needed text within quotes?
The ports we want to alert on:
“dst_port”: “22”
“dst_port”: “23”
“dst_port”: “5060”
“dst_port”: “5061”
Escaping all the quotes per the Event Definitions guide doesn’t trigger an alert
“dst_port”: “22”
As a test, putting another set of quotes around the original sends alerts for all ports scanned, not just the specific ones highlighted by the or operator…
"“dst_port”: “5060” OR “dst_port”: “5061"”
The full alert looks like this and it is a mouthful to parse:
{“dst_host”: “100.50.25.12”, “dst_port”: “22”, “local_time”: “2022-02-02 13:32:52.386025”, “local_time_adjusted”: “2022-02-02 08:32:52.386095”, “logdata”: {“ID”: “31097”, “IN”: “eth0”, “LEN”: “44”, “MAC”: “28:ee:11:18:ff:46:00:0a:22:7b:c2:90:08:30”, “OUT”: “”, “PREC”: “0x00”, “PROTO”: “TCP”, “RES”: “0x00”, “SYN”: “”, “TOS”: “0x00”, “TTL”: “48”, “URGP”: “0”, “WINDOW”: “1024”}, “logtype”: 5001, “node_id”: “opencanary-1”, “src_host”: “100.50.25.13”, “src_port”: “52470”, “utc_time”: “2022-02-02 13:32:52.386080”}