Skip to content

Commit 4d5c277

Browse files
committed
feat: add OpenVPN parser and bruteforce scenario
1 parent 0d79835 commit 4d5c277

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
filter: "evt.Line.Labels.type == 'openvpn'"
2+
onsuccess: next_stage
3+
name: proonoob/openvpn
4+
description: "Parse OpenVPN logs (supports both syslog and ISO8601 timestamp formats)"
5+
pattern_syntax:
6+
OPENVPN_TLS_CRYPT: "%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME} %{NOTSPACE}: TLS Error: tls-crypt unwrapping failed from \\[AF_INET\\]%{IPV4:source_ip}:%{INT:sport}"
7+
OPENVPN_AUTH_FAILED: "%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME} %{NOTSPACE}: AUTH: Received control message: AUTH_FAILED.*\\[AF_INET\\]%{IPV4:source_ip}:%{INT:sport}"
8+
OPENVPN_TLS_HANDSHAKE: "%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME} %{NOTSPACE}: TLS Error: TLS handshake failed"
9+
OPENVPN_VERIFY_ERROR: "%{TIMESTAMP_ISO8601:timestamp} %{HOSTNAME} %{NOTSPACE}: VERIFY ERROR"
10+
OPENVPN_CATCHALL: "%{TIMESTAMP_ISO8601:timestamp} %{GREEDYDATA}"
11+
nodes:
12+
- grok:
13+
name: "OPENVPN_TLS_CRYPT"
14+
apply_on: message
15+
- grok:
16+
name: "OPENVPN_AUTH_FAILED"
17+
apply_on: message
18+
- grok:
19+
name: "OPENVPN_TLS_HANDSHAKE"
20+
apply_on: message
21+
- grok:
22+
name: "OPENVPN_VERIFY_ERROR"
23+
apply_on: message
24+
- grok:
25+
name: "OPENVPN_CATCHALL"
26+
apply_on: message
27+
statics:
28+
- meta: service
29+
value: openvpn
30+
- meta: source_ip
31+
expression: "evt.Parsed.source_ip"
32+
- meta: log_type
33+
value: auth_failed
34+
- target: evt.StrTime
35+
expression: "evt.Parsed.timestamp"

scenarios/proonoob/openvpn-bf.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: leaky
2+
name: proonoob/openvpn-bf
3+
description: "Detect OpenVPN probing and bruteforce attempts via TLS errors"
4+
filter: "evt.Meta.service == 'openvpn' && evt.Meta.log_type == 'auth_failed'"
5+
groupby: "evt.Meta.source_ip"
6+
capacity: 2
7+
leakspeed: "5m"
8+
blackhole: "1m"
9+
labels:
10+
service: openvpn
11+
type: bruteforce
12+
remediation: true

0 commit comments

Comments
 (0)