-
-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathzabbix-api-exposure.yaml
More file actions
49 lines (42 loc) · 1.52 KB
/
Copy pathzabbix-api-exposure.yaml
File metadata and controls
49 lines (42 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
id: zabbix-api-exposure
info:
name: Zabbix API Exposure
author: sif
severity: low
description: Detects an exposed Zabbix JSON-RPC API that discloses its version pre-authentication
tags: [zabbix, monitoring, api, json-rpc, exposure, recon]
type: http
http:
method: POST
paths:
- "{{BaseURL}}/api_jsonrpc.php"
- "{{BaseURL}}/zabbix/api_jsonrpc.php"
# api_jsonrpc.php answers 412 Precondition Failed unless the request carries
# one of application/json-rpc, application/json or application/jsonrequest.
headers:
Content-Type: application/json-rpc
body: '{"jsonrpc":"2.0","method":"apiinfo.version","params":{},"id":1}'
# no response content-type matcher: that type is a request precondition, and
# zabbix always answers `header('Content-Type: application/json')`. requiring
# application/json-rpc back never matched a live instance. the jsonrpc-2.0 plus
# dotted-result shape below is specific to apiinfo.version on its own.
matchers:
- type: status
status:
- 200
# two and'd patterns rather than one: json object key order is not
# guaranteed, so a serializer that emits id before jsonrpc would miss a
# single pattern that requires them adjacent.
- type: regex
part: body
condition: and
regex:
- '"jsonrpc"\s*:\s*"2\.0"'
- '"result"\s*:\s*"[0-9]+\.[0-9]+(\.[0-9]+)?"'
extractors:
- type: regex
name: zabbix_api_version
part: body
regex:
- '"result"\s*:\s*"([0-9]+\.[0-9]+(?:\.[0-9]+)?)"'
group: 1