Skip to content

Commit

Permalink
mismatched ssl detection + ssl template updates (#5256)
Browse files Browse the repository at this point in the history
* mismatched ssl detection + ssl template updates

* misc fix
  • Loading branch information
ehsandeep authored Oct 7, 2022
1 parent a5e0f6f commit ac0b120
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ssl/deprecated-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ info:

ssl:
- address: "{{Host}}:{{Port}}"
min_version: sslv3
max_version: sslv3
min_version: ssl30
max_version: ssl30

extractors:
- type: json
Expand Down
4 changes: 2 additions & 2 deletions ssl/detect-ssl-issuer.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: detect-ssl-issuer
id: ssl-issuer

info:
name: Detect SSL Certificate Issuer
Expand All @@ -12,4 +12,4 @@ ssl:
extractors:
- type: json
json:
- " .issuer_organization[]"
- " .issuer_org[]"
8 changes: 7 additions & 1 deletion ssl/expired-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ info:

ssl:
- address: "{{Host}}:{{Port}}"

matchers:
- type: dsl
dsl:
- "unixtime() > not_after"
- "expired == true"

extractors:
- type: kval
kval:
- "not_after"
15 changes: 15 additions & 0 deletions ssl/mismatched-ssl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
id: mismatched-ssl

info:
name: Mismatched SSL Certificate
author: pdteam
severity: low
tags: ssl

ssl:
- address: "{{Host}}:{{Port}}"

matchers:
- type: dsl
dsl:
- "mismatched == true"
15 changes: 1 addition & 14 deletions ssl/self-signed-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,7 @@ info:
ssl:
- address: "{{Host}}:{{Port}}"

extractors:
- type: json
name: common_name
json:
- ".common_name[]"
internal: true

- type: json
name: issuer_common_name
json:
- ".issuer_common_name[]"
internal: true

matchers:
- type: dsl
dsl:
- "common_name == issuer_common_name"
- "self_signed == true"
2 changes: 1 addition & 1 deletion ssl/ssl-dns-names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ssl:
extractors:
- type: json
json:
- " .dns_names[]"
- ".subject_an[]"
2 changes: 1 addition & 1 deletion ssl/tls-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ ssl:
extractors:
- type: json
json:
- " .tls_version"
- ".tls_version"

0 comments on commit ac0b120

Please sign in to comment.