Hello. Sorry for the late reply. The offending requests are sent by ZAP when spidering our API during the
openapi jobs. Then the
activeScan job tries to use/parse the requests and logs
WARN messages.
If I use the latest version of the add-on, ZAP still sends the malformed requests, but activeScan logs different kinds of error messages:
1179050 [ZAP-ActiveScanner-5] ERROR org.zaproxy.zap.extension.jwt.attacks.PayloadAttack - Payload is not a valid JSON Object
org.json.JSONException: A JSONObject text must begin with '{' at 1 [character 2 line 1]
at org.json.JSONTokener.syntaxError(JSONTokener.java:507)
at org.json.JSONObject.<init>(JSONObject.java:222)
at org.json.JSONObject.<init>(JSONObject.java:406)
at org.zaproxy.zap.extension.jwt.attacks.PayloadAttack.executeNullByteAttack(PayloadAttack.java:81)
at org.zaproxy.zap.extension.jwt.attacks.PayloadAttack.executeAttack(PayloadAttack.java:107)
at org.zaproxy.zap.extension.jwt.attacks.ServerSideAttack.execute(ServerSideAttack.java:86)
at org.zaproxy.zap.extension.jwt.JWTActiveScanRule.performAttackServerSideConfigurations(JWTActiveScanRule.java:161)
at org.zaproxy.zap.extension.jwt.JWTActiveScanRule.scan(JWTActiveScanRule.java:125)
at org.parosproxy.paros.core.scanner.AbstractAppParamPlugin.scan(AbstractAppParamPlugin.java:233)
at org.parosproxy.paros.core.scanner.AbstractAppParamPlugin.scan(AbstractAppParamPlugin.java:136)
at org.zaproxy.zap.extension.jwt.JWTActiveScanRule.scan(JWTActiveScanRule.java:93)
at org.parosproxy.paros.core.scanner.AbstractAppParamPlugin.scan(AbstractAppParamPlugin.java:96)
at org.parosproxy.paros.core.scanner.AbstractPlugin.run(AbstractPlugin.java:402)
at java.base/java.lang.Thread.run(Thread.java:840)
Here is a less-abridged example:
"post": {
"tags": [
"Subscribers API"
],
"summary": "Creates list of subscribers",
"description": "Creates list of subscribers",
"operationId": "CreateSubscribers",
...
"Subscriber": {
"type": "object",
"properties": {
"supiType": {
"type": "string"
},
"supi": {
"type": "string",
"example": "311480143456796"
},
"plmnId": {
"type": "string",
"example": "31148"
},
"id": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"opKey": {
"type": "string",
"example": "01 12 14 88 35 05 29 36 25 36 71 79 58 32 13 63"
},
"opcKey": {
"type": "string",
"example": "32 67 17 53 41 28 42 08 11 74 80 32 74 94 64 71"
},
"authKey": {
"type": "string",
"example": "58 66 42 27 97 60 53 23 71 31 96 11 13 90 56 16"
},
"amfVal": {
"type": "string",
"example": "54 25"
},
"sqnVal": {
"type": "string",
"example": "32 42 44 01 48 10"
},
"ciphering": {
"type": "string",
"example": "NEA0"
},
"integrity": {
"type": "string",
"example": "NIA0"
},
"deviceName": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"homeAddress": {
"type": "string"
},
"city": {
"type": "string"
},
"created": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"modified": {
"type": "integer",
"format": "int64",
"readOnly": true
},
"gpsi": {
"type": "array",
"items": {
"type": "string"
}
},
"profile": {
"type": "string"
},
"active": {
"type": "boolean"
},
"status": {
"type": "string"
},
"templateType": {
"$ref": "#/components/schemas/TemplateType"
},
"encPermanentKey": {
"type": "string"
},
"encOpcKey": {
"type": "string"
},
"dnnConfiguration": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/DnnConfiguration"
}
},
"traceData": {
"$ref": "#/components/schemas/SubscriberInfoTraceData"
}
}
}