Alcatel OmniSwitch — 1 vulnerability check
noctis ships 1 vulnerability check for Alcatel OmniSwitch, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Alcatel OmniSwitch 7700/7800 Telnet backdoor on TCP 6778
| CVE | CVE-2002-1272 |
|---|---|
| Severity | critical · CVSS 10.0 |
| Category | rce — Remote code execution |
| Services | telnet, unknown |
| Detection | set_var, script, tcp_open, tcp_send, sleep, tcp_close, match · highest QoD 97 |
| Feed | tests/vulnerabilities/alcatel-omniswitch/CVE-2002-1272.yaml |
Alcatel OmniSwitch 7700/7800 switches running AOS 5.1.1 expose a development Telnet server on TCP port 6778 that gives access to the VxWorks operating system shell without any password. The shell evaluates arbitrary C expressions and calls, so any unauthenticated attacker on the network can take full control of the switch.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Opens a persistent TCP/TLS socket
- Sends
{{mk.expr}}on the open socket - Sends
…on the open socket - Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- Checks
proof_okfor^true$→ finding QoD 97: Alcatel OmniSwitch Telnet backdoor — VxWorks shell without password (CVE-2002-1272)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2002-1272
- https://kb.cert.org/vuls/id/181721
- https://vuls.cert.org/confluence/display/historical/CERT+Advisory+CA-2002-32+Backdoor+in+Alcatel+OmniSwitch+AOS
Feed source — tests/vulnerabilities/alcatel-omniswitch/CVE-2002-1272.yaml
# Alcatel OmniSwitch 7700/7800 (AOS 5.1.1) — development Telnet backdoor on
# TCP 6778 (CVE-2002-1272, CERT CA-2002-32 / VU#181721).
#
# AOS 5.1.1 shipped with a Telnet server on TCP 6778 that was used during
# development to reach the Wind River VxWorks operating system and was never
# removed. It asks for no password: anyone who connects lands in the VxWorks
# target shell ("-> " prompt, a C-expression interpreter with full access to
# the switch's memory and functions). Fixed in AOS 5.1.1.R02 / R03 and 5.1.3.
#
# Ported from OpenVAS/Greenbone NVT pre2008/alcatel_backdoor_switch.nasl
# (OID 1.3.6.1.4.1.25623.1.0.11170, GPL-2.0-only), which reports any Telnet
# banner read on 6778.
#
# Detection (QoD 97 — benign in-shell proof):
# 1. open a Telnet session (no login);
# 2. type the C expression "<a>*<b>" with two random 4-digit numbers;
# 3. the VxWorks shell evaluates it and prints "value = <a*b> = 0x<hex>".
# The product (and its hex form) never appears in what we send, so an
# echo service or a login prompt cannot produce it.
# The expression only multiplies two constants: nothing is called, written
# or changed on the switch.
#
# Better than the NASL (stated in the PR):
# - proves an unauthenticated OS shell, instead of flagging any service on
# 6778 that sends a banner (a VxWorks shell with shellLogin enabled, or an
# unrelated service, was a false positive there);
# - a shell that prints nothing on connect (no banner at all — the NASL's
# "if( data )" then exits clean) is still detected, since we type the
# expression without waiting for a banner;
# - output arriving after the first 500 ms read is still collected (wait,
# then read again).
#
# services: the backdoor always listens on 6778/tcp, which nmap reports as
# "telnet" (Telnet negotiation) or "unknown"; the feed probes the matched port.
# Any unauthenticated VxWorks shell answers the same way, so a VxWorks device
# with an open shell on another port is reported too (the finding text says so).
# category: rce (code execution in the OS shell) + `intrusive` so scans can
# exclude it.
uid: d7208dfd-ba4b-4044-854c-46175230e4e6
name: "Alcatel OmniSwitch 7700/7800 Telnet backdoor on TCP 6778 (CVE-2002-1272)"
description: |
Alcatel OmniSwitch 7700/7800 switches running AOS 5.1.1 expose a development
Telnet server on TCP port 6778 that gives access to the VxWorks operating
system shell without any password. The shell evaluates arbitrary C
expressions and calls, so any unauthenticated attacker on the network can
take full control of the switch.
cves: [CVE-2002-1272]
cvss: 10.0
severity: critical
category: rce
confidence_base: 0.20
tags: [alcatel, omniswitch, aos, vxworks, switch, telnet, backdoor, rce, intrusive]
services: [telnet, unknown]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2002-1272"
- "https://kb.cert.org/vuls/id/181721"
- "https://vuls.cert.org/confluence/display/historical/CERT+Advisory+CA-2002-32+Backdoor+in+Alcatel+OmniSwitch+AOS"
steps:
# ---------------------------------------------------------------- set-up
- id: init-proof
action: set_var
var_name: proof_ok
var_value: false
- id: init-cmd
action: set_var
var_name: r_cmd
var_value: {response: ""}
- id: init-tail
action: set_var
var_name: r_tail
var_value: {response: ""}
# "<a>*<b>" and the shell's answer "value = <a*b> = 0x<hex>".
- id: build-marker
action: script
store_as: mk
code: |
let a = rand_int(1000, 9999);
let b = rand_int(1000, 9999);
let p = a * b;
#{
expr: "" + a + "*" + b,
proof: "value = " + p + " = " + hex(p)
}
# ----------------------------------------------------------- the session
- id: open
action: tcp_open
handle: tn
port: "{{port}}"
read_banner: true
timeout_secs: 10
store_as: conn
- id: send-expr
action: tcp_send
handle: tn
condition: "conn.connected == true"
send: "{{mk.expr}}\r\n"
timeout_secs: 10
store_as: r_cmd
# Slow shell: read again after a pause (a zero-byte write only triggers the
# read).
- id: wait-output
action: sleep
condition: "conn.connected == true"
duration_ms: 1500
- id: flush
action: tcp_send
handle: tn
condition: "conn.connected == true"
send: ""
timeout_secs: 5
store_as: r_tail
- id: close
action: tcp_close
handle: tn
# Everything received after the expression (each reply is trim_end'ed, so
# join them with a newline).
- id: collect
action: script
condition: "conn.connected == true"
store_as: tn_out
code: |
let out = "";
for r in [r_cmd, r_tail] {
if type_of(r.response) == "string" { out += r.response + "\n"; }
}
out
- id: check-proof
action: script
condition: "conn.connected == true"
store_as: proof_ok
code: |
strstr(tolower(tn_out), mk.proof) != ""
# ---------------------------------------------------------------- finding
- id: finding-shell
action: match
source: proof_ok
pattern: "^true$"
on_match:
finding:
title: "Alcatel OmniSwitch Telnet backdoor — VxWorks shell without password (CVE-2002-1272)"
description: "The Telnet service on port {{port}} opened an unauthenticated VxWorks target shell and evaluated the C expression {{mk.expr}} sent by the scanner (the result never appears in the request). On Alcatel OmniSwitch 7700/7800 switches running AOS 5.1.1 this is the development backdoor on TCP 6778 (CVE-2002-1272); on another VxWorks device it is an equally critical open OS shell."
remediation: "Upgrade AOS to 5.1.1.R02, 5.1.1.R03 or 5.1.3 or later, and block TCP port 6778 at the network perimeter and with a switch ACL until then."
confidence_delta: 0.75
qod: 97
evidence: "Port {{port}}: sent '{{mk.expr}}' without logging in; the shell answered '{{mk.proof}}': {{tn_out}}"