2022-07-03 17:04:04 +00:00
|
|
|
id: matrix-detect
|
2022-07-03 13:26:51 +00:00
|
|
|
|
|
|
|
info:
|
2022-07-03 17:04:04 +00:00
|
|
|
name: Matrix Server Detect
|
2022-07-03 13:26:51 +00:00
|
|
|
author: erethon
|
|
|
|
severity: info
|
|
|
|
description: Detects Matrix servers based on .well-known entries. See https://en.wikipedia.org/wiki/Matrix_(protocol)
|
|
|
|
reference: https://spec.matrix.org/v1.3/server-server-api/#getwell-knownmatrixserver, https://spec.matrix.org/v1.3/client-server-api/#getwell-knownmatrixclient
|
2023-04-28 08:11:21 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 2
|
2023-10-14 11:27:55 +00:00
|
|
|
tags: tech,matrix
|
2022-07-03 13:26:51 +00:00
|
|
|
|
2023-04-27 04:28:59 +00:00
|
|
|
http:
|
2022-07-03 13:26:51 +00:00
|
|
|
- method: GET
|
2022-11-05 11:28:54 +00:00
|
|
|
redirects: true
|
|
|
|
max-redirects: 2
|
2022-07-03 13:26:51 +00:00
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/.well-known/matrix/server"
|
|
|
|
- "{{BaseURL}}/.well-known/matrix/client"
|
|
|
|
|
|
|
|
matchers-condition: and
|
|
|
|
matchers:
|
2022-11-04 11:02:55 +00:00
|
|
|
- type: regex
|
|
|
|
regex:
|
|
|
|
- '"m\.([a-z]+)":'
|
|
|
|
|
2022-07-03 13:26:51 +00:00
|
|
|
- type: word
|
2022-11-04 11:02:55 +00:00
|
|
|
part: header
|
2022-07-03 13:26:51 +00:00
|
|
|
words:
|
2022-11-04 11:02:55 +00:00
|
|
|
- text/html
|
|
|
|
negative: true
|
2022-07-03 13:26:51 +00:00
|
|
|
|
2022-07-03 17:04:04 +00:00
|
|
|
- type: status
|
|
|
|
status:
|
|
|
|
- 200
|
|
|
|
|
2022-07-03 13:26:51 +00:00
|
|
|
extractors:
|
|
|
|
- type: json
|
|
|
|
part: body
|
|
|
|
json:
|
|
|
|
- '."m.server" | select( . != null )'
|
|
|
|
- '."m.homeserver" | .base_url | select( . != null )'
|
|
|
|
- '."m.identity_server" | .base_url | select( . != null )'
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 4a0a004730450220217a0cda4ee19cb3633a8a9d079fa55047c57787d4d7bafceb90ac49ce015f1e022100949115733fcf5736c68cd50911b6f4894628cb76ca2e7db14a73420da6f9ca1d:922c64590222798bb761d5b6d8e72950
|