Skip to content
RCE Write-up Intermediate

Confirmed Should Mean Executed

The author describes a real command injection vulnerability in a report-export feature, where the filename parameter executed shell commands but produced no output or out-of-band callback. The attacker could run arbitrary commands on the server, but proving execution required a computed arithmetic result rather than timing or callbacks.

medium.com

Published on medium.com

Cybersecurity

ahmad kabiri, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

Context

This is not a bug bounty report about one endpoint on one target. It is a write-up of the reasoning behind a detection tool, RCEKit, built by ahmad kabiri, and of the assessment that pushed him to build it. The target described is an application assessment in which a report-export feature took a parameter called filename. The feature queues an export and returns a friendly 200 OK with the message "Export queued". The parameter is passed to something that, in the researcher's judgement, looked like it could reach a shell.

The central claim of the article is a definition: confirmed means executed, and nothing else is allowed to be called confirmed. Everything else in the tool is arranged around that rule.

Setup

The work happened on the fourth day of an application assessment, around 1 a.m. The researcher was testing a report-export feature and its filename parameter. No account details, roles, versions of the target application or specific tool versions are given.

RCEKit itself is described as MIT licensed, pure standard library, Python 3.8+, at github.com/kabiri-labs/rcekit. The article states that AI was used to assist with editing and wording, and that the analysis, conclusions and final review are the author's own.

One demonstration target is named: Webmin 1.910, CVE-2019-15107, run in a container on the researcher's laptop. He says it can be reproduced in about five minutes and invites the reader to check rather than take his word for it.

Finding it

The filename parameter looked wrong from the start. It fed the report-export feature. Response times twitched when it was touched. The error messages had the shape of a string being handed to something it should not be handed to.

The researcher did the usual thing: opened his payload notes, pasted, fuzzed and watched. The application said nothing. No error, no stack trace, not one byte of difference in the response body. Just a clean 200 OK with "Export queued", over and over, for every payload.

That is the problem the article is about: being almost certain there is command execution behind a parameter and being unable to prove it.

Exploitation

Step 1: recognise the two walls

The first wall is silence. The output never comes back. The command may run inside a worker, a queue, a background job or a subprocess whose stdout never reaches the HTTP response.

The reflex is out-of-band: fire a DNS lookup, catch it on Collaborator or interactsh. That works until the environment is segmented, egress is filtered, DNS is internal-only, or the client's UAT network has never been allowed to resolve an external name. Absence of an OOB callback is not absence of execution. Once egress is gone, you cannot distinguish "the code is safe" from "the code executed and could not phone home". OOB is a good oracle when it fires and a bad one when it does not, and most tooling treats its silence as a verdict.

The second wall is credibility. A developer looks at the code and says: "Show me it executed." If you cannot, the finding is either downgraded or, worse, accepted on your authority alone, and the next false positive makes every critical you have written suspect. Automated tooling has been generous with the word RCE: a five-second delay on a slow endpoint becomes "possible time-based command injection", a reflected string becomes "possible code evaluation".

The conclusion: the hard part of RCE testing was never generating input. It was deciding, with confidence, whether it ran.

Step 2: define what counts as evidence

The rule is that confirmed means executed. Most tooling reports suspicion in the vocabulary of proof. The useful question is therefore: what evidence cannot be produced by accident?

Reflection proves nothing, because a logger, an error handler or a validation message can reflect a string. Computation is different. Send an arithmetic expression and get the result back, and the target did not echo anything: something computed. The operands are random per run, so the value cannot be cached, guessed or sitting in a fixture.

Text
$((540141+314681))

That payload evaluates to 854822. Two properties make the result hold up:

  1. It is differential. Every probe is checked against a payload-free control request. If 854822 also appears without the payload, the finding is not attributable to execution and is not confirmed. This removes noise such as dynamic IDs, timestamps and session-derived numbers.
  2. It is encoding-aware. A computed value returned base64'd, hex-encoded, URL-encoded or HTML-escaped is still a computed value. Searching only for the raw literal loses real findings on any endpoint that normalises its output.
From the original on medium.com

The image shows Webmin 1.910, CVE-2019-15107, in a container on the researcher's laptop, as the reproducible demonstration of the computation oracle.

Step 3: separate evaluation from execution

The same trick works on template sinks. Inject a*b in every common template syntax and confirm the product appears while the literal a*b does not:

A bare form is also tried. The researcher is explicit about what this proves: confirming that ${7*7} returns 49 proves code injection, not OS command execution. A sandboxed template engine may evaluate arithmetic and still refuse a Runtime.exec. That is CWE-94, usually still critical and often a stepping stone, but it is a different claim from "I ran a shell command". The tool therefore reports the class it actually proved, and getting from evaluation to command execution remains the tester's job.

Step 4: treat timing as a candidate, never as proof

Naive time-based detection is a coin flip on a loaded network. The obvious improvement is to test the curve rather than a single point: fire a controlled 0 / N / 2N delay series and check whether response time tracks the requested delay linearly, rather than asking whether it was slow once. Random jitter does not survive a regression across three points.

That improvement failed against a target under gradually increasing load. The regression produced a beautiful linear correlation from a completely unrelated ramp. Sequential timing probes and a slowly degrading service produce the same shape, and a regression cannot tell them apart.

From the original on medium.com

The image accompanies the account of the linear correlation obtained from a completely unrelated ramp.

So timing never self-confirms in RCEKit. A clean linear response gets needs-review, permanently, even when it looks perfect, as it does on a genuinely vulnerable target. The reason is structural, not a tuning problem: timing has no computed value behind it. There is no artefact the target could only have produced by executing your input, only a measurement, and measurements have confounders. When an output channel exists, timing is corroborated by a results-based proof, and the results-based proof carries the verdict. The temptation to promote timing was real, because a tool that says needs-review looks weaker in a demo than one that says confirmed, which is exactly why the line is drawn where a demo cannot move it.

Step 5: add two more independent oracles

Filesystem side effects. Write a random token to a web-reachable path and fetch it back through the application's own surface. This needs a writable web root you can reach. When that holds, it proves execution and a write primitive in one shot. It changes target state, so it is gated behind explicit flags and prints an exact cleanup command for every file it drops.

OOB without the dependency. The reason OOB kept failing was the infrastructure assumption, not the technique. RCEKit ships its own HTTP/DNS listener and correlates each callback to the exact payload that caused it, with no Collaborator licence and no third-party interaction server. That matters when the rules of engagement say nothing leaves the network.

The useful property across all oracles is that they fail independently. Segmentation that kills OOB has nothing to do with whether an expression evaluates. Latency noise that ruins timing has nothing to do with whether a file appears on disk. This is not "more checks means more confidence": a computed value is proof on its own. It is that coverage survives environments where any single oracle would go quiet, and quiet is the failure mode that gets written up as "not vulnerable".

Step 6: replay the real request

Real testing does not look like tool --url https://target/api?p=1. It looks like a session cookie that took three steps to get, four custom headers, a JSON body nested five levels deep, a signed request, and one parameter buried in the middle. Reconstructing that by hand into a scanner command line is a tax on attention, and every reconstruction is a chance to break the request so the target looks safe when it is not.

So save the request from your proxy and hand the file over:

Bash
python rcekit.py --acknowledge-consent \  -r request.txt -p filename \  --methods reflected,eval

Method, path, headers, body and cookies are kept byte-for-byte. One thing changes: the injection point. The payload is encoded for the exact injection point it lands in. A query value gets percent-encoded, a JSON field gets JSON-escaped, a form field form-encoded, a header kept single-line. Blanket-encoding everything is how a payload arrives at the sink as a literal the sink never decodes, and how you conclude "not vulnerable" about something that was not.

There is also a chain mode for sinks behind a login, or where the payload rides in uploaded file content and detonates on a separate trigger request. That is the shape most real blind RCE takes in enterprise apps, and a single request will never reach it.

Step 7: confirm filename

It did execute. Not through a callback, because nothing was leaving that network. It executed because a piece of arithmetic came back with an answer no static string could have produced, absent from the control request, in a response body otherwise byte-identical to every other one seen that night. Ten minutes to establish, about thirty seconds to demonstrate in the triage meeting. Nobody asked for proof of execution; the evidence had answered before anyone asked.

Root cause

The article does not analyse the application's code, so the underlying defect in the export feature is not described. What it does describe is the reason the defect was hard to prove: the sink was blind. The command ran, if it ran, inside a worker, queue, background job or subprocess whose stdout never reached the HTTP response, and the environment had no egress, so an OOB callback could not be used either. Existing detection approaches did not stop the vulnerability; they simply failed to observe it, and their silence was being read as a negative result.

Impact

The article does not state the impact of the filename finding in terms of data, users or systems. Its argument about impact is about credibility: a critical finding that cannot be demonstrated is either downgraded or accepted on the tester's authority, and a later false positive discredits every critical that tester writes. A confirmed execution, by contrast, is defensible in triage. The tool's own scope limits are stated plainly: no memory corruption, no argument injection into a no-shell argv array, and no deserialisation gadget chains beyond a timing signal. Its scope is injection-driven RCE reachable through a request and interpreted by a shell or an evaluator.

Fix

No fix to the target application is described. The article is about the confirmation methodology, and its stated design decisions are:

  • confirmed is reserved for execution; suspicion is called suspicion.
  • A connectivity failure returns error, never negative, because "I couldn't reach it" must never read as "it's fine".
  • Timing never self-confirms and stays at needs-review.
  • Filesystem probes are gated behind explicit flags and print an exact cleanup command for every file dropped.
  • The default sends clean, canonical payloads; minimal evasion is available, but the confirmation engine does not chase bypasses, because a proof that only works through one filter configuration is not much of a proof.
  • The tool does not hand you a shell; the line between proving execution and operating inside production is drawn by the scope document.

Variants to test

  1. Arithmetic in a shell context. Send $((540141+314681)) with fresh random operands each run and look for 854822 in the response, absent from a payload-free control request. A positive result is the computed value appearing only with the payload, in any encoding.
  2. Arithmetic in template syntax. Try ${…}, {{…}}, #{…}, %{…}, <%=…%> and the bare form with a*b, and look for the product while the literal a*b is absent. A positive result proves evaluation, which should be reported as code injection, not command execution.
  3. Delay series. Fire 0 / N / 2N delays and check for a linear relationship. A clean line is a candidate for review, not a confirmation, because a degrading service produces the same shape.
  4. Filesystem write and fetch. Write a random token to a web-reachable path and retrieve it through the application's own surface. A positive result is the token coming back, which proves execution and a write primitive together.
  5. Self-hosted OOB. Run your own HTTP/DNS listener and correlate each callback to the exact payload that caused it. A positive result is a callback tied to a specific probe, with no third-party interaction server involved.
  6. Request-file replay. Save the full request from your proxy and vary only the injection point, encoding the payload for the exact location: percent-encoding for a query value, JSON escaping for a JSON field, form encoding for a form field, single-line for a header. A positive result is a confirmation that survives the real request shape rather than a reconstructed one.
  7. Chain mode. For sinks behind a login, or payloads that ride in uploaded file content and detonate on a separate trigger request, use a two-request chain. A positive result is the oracle firing on the trigger request rather than the upload.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 26 min read.

What happened, in plain words

A security tester was on the fourth day of an application assessment. Around 1 a.m. he was looking at a parameter called filename that he was almost certain was dangerous. A parameter is a piece of information you send to a website, usually in the address bar or in a form, that tells the site what you want. This one fed a feature that exports reports.

He tried every trick he knew to make the application misbehave in a visible way. The application answered every time with the same friendly message: "Export queued". No errors, no clues, nothing different. He could not prove the danger was real.

That is the problem this article is about. When you suspect a website can be made to run commands on its own server, how do you prove it? The author built a tool called RCEKit to answer that question, and the article explains the thinking behind it. The central rule is simple: the word confirmed is only allowed when something actually executed. Everything else is called what it is, a suspicion.

This version explains the whole article from scratch, assuming you have never done security testing. Every technical word is explained where it first appears, and there is a glossary at the end.

1. The parameter that wouldn't talk

The tester was on the fourth day of an assessment. An assessment is when a company hires someone to try to break into its own systems, with permission, so the problems can be fixed before a real attacker finds them.

He was looking at a parameter called filename. It was part of a report-export feature. Exporting a report means the website takes data and produces a file for you to download, for example a spreadsheet of sales. The filename parameter was part of that report-export feature.

Several things made him suspicious:

  • Response times twitched when he changed the parameter. A response time is how long the website takes to answer a request. A request is what your browser sends when you click a link or submit a form; the answer is the response.
  • The error messages had a particular shape. To an experienced tester, certain error messages look like a sign that a piece of text is being handed to a program that runs commands, rather than being treated as harmless text.

So he did what testers do. He opened his notes full of payloads. A payload is a specially crafted piece of input designed to make a system do something it should not. He pasted them in, one after another, and watched the responses.

The application said nothing. No error, no technical details, not one byte of difference in the response body. Just a clean 200 OK with "Export queued", over and over, for every payload.

200 OK is the standard code a web server sends to mean "your request worked". It is the same code you get when a page loads normally.

That is the loneliest moment in this job, as the author puts it: you are almost certain there is command execution behind a parameter, and you cannot prove it. Command execution means the website is running operating-system commands, the same kind of instructions you could type into a terminal, on its own server. Command execution means the website is running operating-system commands on its own server.

2. Two walls

The tester was stuck behind two separate problems. He calls them walls.

The silence wall

The output never comes back. The command may run, or may not, somewhere deep inside the application: in a worker, a queue, a background job, or a subprocess whose output never reaches the web page you see.

A worker or background job is a program that does slow tasks separately from the web page, so the page can answer quickly. A queue is a waiting line of such tasks. A subprocess is a program started by another program. None of these normally send their output back to your browser.

The usual reflex is out-of-band testing, often shortened to OOB. Out-of-band means you do not look for the answer in the response at all. Instead, you make the target contact a server you control. For example, you craft input that would make the target look up a domain name, and you watch whether that lookup arrives at your server. A domain name is the human-readable address of a website, like example.com; looking one up is called a DNS lookup.

Collaborator and interactsh are well-known services that provide such a server for testers to watch. If a lookup arrives, you know your input ran.

That works beautifully until the environment is segmented, egress is filtered, DNS is internal-only, or the client's UAT network has never been allowed to resolve an external name.

  • Segmented means the network is split into separate parts that cannot freely talk to each other.
  • Egress filtering means outgoing connections to the internet are blocked or restricted.
  • DNS being internal-only means the network can only look up names inside the company, not on the public internet.
  • UAT stands for user acceptance testing: a copy of the system used for testing before release.

And here is the part that hurts: absence of an OOB callback is not absence of execution. If the network blocks outgoing connections, the code can run perfectly well and simply be unable to phone home. Once egress is gone, you cannot tell "the code is safe" apart from "the code executed and could not phone home". OOB is a great signal when it fires and a terrible one when it does not, and most tooling quietly treats its silence as a verdict.

The credibility wall

This one is worse, and it is not technical.

You write the finding. A finding is the report of a problem you believe you have discovered. You mark it critical, meaning the most serious level, and call it remote command execution: an attacker, from elsewhere, can run commands on the server. You attach the scanner output that flagged it. A scanner is an automated program that looks for known problems.

Then, in the triage meeting, a developer opens their laptop, looks at the code, looks at you, and says four words:

"Show me it executed."

Triage is the meeting where findings are reviewed and prioritised.

If you cannot show it, one of two things happens. Either the finding is downgraded and everyone moves on, or, far worse, it is accepted on your authority alone. And then next quarter another one of your criticals turns out to be a false positive, and now every critical you have ever written is suspect. A false positive is a finding that turns out to be wrong.

Automated tooling has been generous with the word RCE for a long time. A five-second delay on a slow endpoint becomes "possible time-based command injection". A reflected string becomes "possible code evaluation".

  • An endpoint is a specific address on a website that accepts requests, like a particular page or an API route.
  • Time-based command injection means guessing that a command ran because the response got slower.
  • A reflected string is text you sent that simply comes back in the response.
  • Code evaluation means the system treated your text as code and worked out its value.

Each of those costs somebody a day of investigation, and it costs you something more expensive than a day.

That night, staring at filename, the author understood what he had been getting wrong. He had a folder full of payloads, thousands of them, every bypass and encoding trick, curated and sorted. He did not need more payloads. He needed an answer. The hard part of RCE testing was never generating the input. It was deciding, with confidence, whether it ran.

3. What a confirmation oracle has to survive

An oracle, in this context, is a test whose result tells you the truth about something you cannot see directly. Think of asking a friend to check whether the lights are on in a distant house: their answer is your oracle.

So the author started building RCEKit around one rule that everything else bends to:

confirmed means executed. Nothing else gets called confirmed.

That sounds obvious. It is not how most tooling behaves. Most tooling reports suspicion and dresses it in the vocabulary of proof.

Which means the interesting question is not "what payload do I send". It is: what evidence cannot be produced by accident?

Computation is evidence

If you ask a system to reflect a string back, a hundred harmless things can reflect it: a logger that records requests, an error handler, a validation message. A logger is a component that writes down what happens. Reflection proves nothing.

But if you ask it to evaluate an expression and hand you the result, the situation changes. An expression here means arithmetic, like a sum. Send $((540141+314681)), get 854822 back, and the target did not echo anything. Something computed.

Text
$((540141+314681))

Line by line:

  • $(( and )) are the syntax a Unix shell uses to mean "work out the arithmetic inside these brackets". A shell is the program that reads and runs commands on Linux and similar systems.
  • 540141+314681 is a simple addition.
  • The result is 854822. If that number comes back in the response, the text was not merely copied: it was calculated by something that understands arithmetic.

The operands, the two numbers being added, are random on every run. So the value cannot be cached, guessed, or sitting in a fixture somewhere. A fixture is a fixed sample value built into a system or a test.

Two properties make this hold up under scrutiny.

  1. It is differential. Every probe is checked against a payload-free control request. A probe is one test attempt. A control request is the same request sent without the payload. If 854822 also appears without the payload, the finding is not attributable to execution and it does not get confirmed. This kills a surprising amount of noise: dynamic IDs, timestamps, session-derived numbers. A dynamic ID is an identifier that changes each time; a timestamp is the current time; a session-derived number is a value tied to your logged-in session.
  2. It is encoding-aware. A computed value that comes back base64'd, hex-encoded, URL-encoded or HTML-escaped is still a computed value. Searching only for the raw literal loses real findings on any endpoint that normalises its output.

Encoding needs a short explanation. Some characters cannot travel safely through certain channels, so systems transform them into a safe form and transform them back at the other end.

  • Base64 turns arbitrary data into a string of letters and digits.
  • Hex encoding writes each byte as two hexadecimal characters, using 0 to 9 and a to f.
  • URL encoding replaces special characters with a percent sign and a code, for example a space becomes %20.
  • HTML escaping replaces characters like < and > with codes so a browser shows them as text instead of treating them as markup.

If the endpoint transforms its output, the number 854822 may arrive looking different, and a search for the plain digits would miss it.

From the original on medium.com

The image shows Webmin 1.910, CVE-2019-15107, running in a container on the author's laptop. Webmin is a web-based administration tool for servers. CVE-2019-15107 is the public identifier of a known vulnerability in it; CVE stands for Common Vulnerabilities and Exposures, a catalogue where each publicly known flaw gets a number. A container is a lightweight, isolated environment for running software, a bit like a sealed box on your computer. The author uses this setup as a reproducible demonstration: you can reproduce it yourself in about five minutes and check the result rather than take his word for it.

Expression evaluation is evidence, of evaluation

Same trick, different sink. A sink is the place in a program where input finally gets used, the point where the dangerous thing happens. This time the sink is a template engine, software that builds web pages by filling placeholders with values.

Inject a*b in every common template syntax and confirm the product appears while the literal a*b does not:

Line by line:

  • ${…} is a placeholder style used in several template languages and shells.
  • {{…}} is the style used by many web template engines.
  • #{…} is another placeholder style, common in some frameworks.
  • %{…} is used in others.
  • <%=…%> is the style used in embedded Ruby and similar templates.

A bare form is also tried, meaning the expression on its own with no brackets at all. The idea is the same as before: if the product of the multiplication appears and the literal a*b does not, something evaluated your expression.

The author is precise about what this proves, because he has seen it conflated constantly, and he admits he did it himself in an earlier version of the post: confirming that ${7*7} returns 49 proves code injection. It does not automatically prove OS command execution.

Code injection means your text was treated as code and run by some interpreter. An interpreter is a program that reads and executes instructions, such as a template engine or a scripting language. OS command execution means a command was run by the operating system itself, which is a stronger and more dangerous claim.

A sandboxed template engine may evaluate arithmetic and still refuse you a Runtime.exec. Sandboxed means restricted, allowed to do only certain things. Runtime.exec is the Java method for starting an external program. So a template engine might happily do your sums while being unable to start a shell command.

That kind of flaw is classified as CWE-94. CWE stands for Common Weakness Enumeration, a catalogue of weakness types; CWE-94 is the entry for code injection. It is usually still critical and frequently a stepping stone to worse, but it is a different claim from "I ran a shell command". Writing it up as the latter is exactly the credibility problem the author is complaining about. So the tool reports the class it actually proved. Getting from evaluation to command execution stays your job.

Timing is a candidate, not proof

This is where the author changed his mind, and he calls it the most important thing in the post.

Naive time-based detection is a coin flip on a loaded network. The idea is simple: send input that would make the server wait, for example five seconds, and see whether the response takes five seconds longer. If it does, maybe your command ran. But on a busy network, responses are slow for all sorts of reasons, so a single slow response proves little.

The obvious fix is to stop testing one point and test the curve: fire a controlled 0 / N / 2N delay series and check whether response time tracks the delay you requested, linearly, rather than just "was it slow once".

  • 0 / N / 2N means three probes: one asking for no delay, one asking for a delay of N, and one asking for twice N. N is just a chosen number of seconds.
  • Linearly means the measured times rise in proportion to the delays you asked for, like a straight line on a graph.

That is genuinely much better. Random jitter does not survive a regression across three points. Jitter is small random variation in timing. A regression here means fitting a straight line through the measured points to see how well they line up. Three points that rise in step with your requested delays are hard to explain by chance.

The author was pleased with himself. Then he ran it against a target under gradually increasing load and got a beautiful linear correlation out of a completely unrelated ramp. A ramp means the server was simply getting busier and busier over time, so its responses got slower and slower. Sequential timing probes and a slowly degrading service produce the same shape, and a regression cannot tell them apart.

From the original on medium.com

The image accompanies the account of the linear correlation the author got from a completely unrelated ramp.

So timing never self-confirms in RCEKit. A clean linear response gets needs-review, full stop, forever, even when it looks perfect, as it does on a genuinely vulnerable target.

The reasoning is structural rather than a tuning problem. Timing has no computed value behind it. There is no artefact the target could only have produced by executing your input; there is only a measurement, and measurements have confounders. A confounder is another explanation for the same observation. When an output channel exists, timing gets corroborated by a results-based proof, and the results-based proof is what carries the verdict. Corroborated means backed up by a second, independent piece of evidence.

The author mentions this partly because the temptation to promote timing was real. A tool that says needs-review looks weaker in a demo than one that says confirmed. That is precisely why the line has to be drawn somewhere the demo cannot move it.

Two more doors, for when the first ones are shut

Filesystem side effects. A filesystem is how a computer organises files and folders. The idea is to write a random token to a web-reachable path, then fetch it back through the application's own surface. A token here is a random string used as a marker. A web-reachable path is a location on the server that the website can serve to a browser. If you can make the target create a file and then download it through the site, you have proved both that your input executed and that you can write files. That is called a write primitive: a basic capability to write.

This needs a writable web root you can reach. The web root is the folder the web server serves pages from. Because this technique changes the target's state, meaning it leaves something behind, it is gated behind explicit flags. A flag is an option you add to a command to switch a behaviour on. The tool also prints an exact cleanup command for every file it drops, so you can remove your traces.

OOB, without the dependency. The reason OOB kept failing was not the technique but the infrastructure assumption: the assumption that you can use some outside service. So RCEKit ships its own HTTP/DNS listener and correlates each callback to the exact payload that caused it. A listener is a small server that waits for incoming connections. A callback is the incoming contact from the target. Correlating means matching each callback to the specific probe that caused it. There is no Collaborator licence and no third-party interaction server in the loop. That matters more than it sounds when the rules of engagement say nothing leaves the network. Rules of engagement are the written rules of a test, including what you may and may not do.

The useful property across all of these is that they fail independently. The segmentation that kills OOB has nothing to do with whether an expression evaluates. The latency noise that ruins timing has nothing to do with whether a file appears on disk. Latency is delay. This is not "more checks means more confidence": a computed value is proof on its own. It is that the coverage survives environments where any single oracle would have gone quiet, and quiet is the failure mode that gets written up as "not vulnerable".

4. Isn't this just commix?

A fair question, and the author would rather answer it than let it sit.

commix is an exploitation tool, and a good one: it finds command injection and gets you an interactive session on the target. Exploitation means actually using a flaw, not just proving it exists. Where commix struggles is exactly where the author kept getting stuck: heavily blind sinks with no egress, where the goal is not a shell but a defensible verdict. Blind means you get no output back. A shell is an interactive command prompt on the target. A defensible verdict is a conclusion you can stand behind in front of a developer.

nuclei is template-driven and excellent for known CVEs at scale. Template-driven means it runs predefined checks written as templates. It is not built to answer "is this unknown parameter on this bespoke internal app executing my input". Bespoke means custom-made for one organisation.

Collaborator and interactsh are infrastructure, not oracles. They answer one question well and answer nothing when egress is gone.

RCEKit's contribution is not a new payload class. It is the discipline of separating confirmed from maybe and refusing to merge them, plus enough independent oracles that "no callback" stops being the end of the conversation. If commix gets you a shell on your target, use commix. The author does.

5. Meeting the tester where they actually work

Real testing does not look like tool --url https://target/api?p=1. That is the tidy example from a manual: run a tool against a URL with one parameter. An API is an interface that programs use to talk to each other; a URL is a web address.

Real testing looks like: a session cookie that took three steps to get, four custom headers, a JSON body nested five levels deep, a signed request, and one parameter buried in the middle of it that you want to poke.

  • A cookie is a small piece of data your browser stores for a website. A session cookie identifies your logged-in session, so the server knows who you are on each request. Getting one may take several steps, such as logging in and completing a second check.
  • A header is a line of extra information sent with a request, such as what kind of data you accept.
  • JSON is a common text format for structured data, using curly brackets and key-value pairs. Nested five levels deep means objects inside objects inside objects.

Reconstructing all that by hand into a scanner's command line is a tax on your attention, and every reconstruction is a chance to break the request in a way that makes the target look safe when it is not.

So save the request from your proxy and hand the file over. A proxy is a tool that sits between your browser and the website, letting you see and edit every request.

Bash
python rcekit.py --acknowledge-consent \  -r request.txt -p filename \  --methods reflected,eval

Line by line:

  • python rcekit.py runs the tool with Python, a programming language. RCEKit is written in it.
  • --acknowledge-consent is a switch passed to the tool.
  • -r request.txt tells the tool to read the full request from a file called request.txt, which you saved from your proxy.
  • -p filename names the parameter to attack, here filename.
  • --methods reflected,eval selects the methods to use.

Method, path, headers, body and cookies are kept byte-for-byte. The method is the type of request, such as GET to fetch or POST to submit. The path is the part of the address after the domain. The body is the data sent with the request. One thing changes: the injection point, the place where the payload goes.

The detail that matters more than it should: the payload is encoded for the exact injection point it lands in. A query value gets percent-encoded, a JSON field gets JSON-escaped, a form field form-encoded, a header kept single-line. A query value is a parameter in the address after a question mark; a form field is a box in a web form. Blanket-encoding everything is how a payload arrives at the sink as a literal the sink never decodes, and how you conclude "not vulnerable" about something that was not.

There is also a chain mode for sinks behind a login, or where the payload rides in uploaded file content and detonates on a separate trigger request. Chain mode means sending more than one request in sequence. Detonates means the payload takes effect at that later moment. That is the shape most real blind RCE takes in enterprise apps, and a single request will never reach it.

6. What it deliberately does not do

The author thinks a tool's refusals describe it better than its features.

It does not hand you a shell. This is a detection and confirmation instrument. The line between "I proved this executes" and "I am now operating inside your production system" is drawn by your scope document, not by your tooling. A scope document states exactly what you are allowed to test. Production means the live system real users depend on.

It does not lead with WAF evasion. A WAF, web application firewall, is a filter that inspects requests and blocks ones that look malicious. Evasion means getting past it. The default sends clean, canonical payloads: fewest variants, clearest confirmation. Canonical means standard and unmodified. The author is honest that plenty of engagements will not give you WAF-free origin access, so minimal evasion is available. Origin access means reaching the actual server rather than the filter in front of it. But the confirmation engine does not chase bypasses, because a proof that only works through one specific filter configuration is not a proof of much.

It does not cover everything, and says so. No memory corruption, which is a class of flaw where a program writes to memory it should not. No argument injection into a no-shell argv array. An argument is a value passed to a program; argv is the list of arguments a program receives. A no-shell argv array means the program is started directly with a list of arguments, without a shell interpreting them. No deserialisation gadget chains beyond a timing signal. Deserialisation is turning stored data back into objects in memory; a gadget chain is a sequence of existing code pieces abused to do something harmful. Its scope is injection-driven RCE reachable through a request and interpreted by a shell or an evaluator, and the author would rather be good at that than mediocre everywhere.

It does not inflate findings. Suspicion is called suspicion. confirmed is reserved. A connectivity failure returns error, never negative, because "I couldn't reach it" must never read as "it's fine".

7. Back to filename

It did execute.

Not through a callback, because nothing was leaving that network. It executed because a piece of arithmetic came back with an answer no static string could have produced, absent from the control request, in a response body that was otherwise byte-identical to every other one he had seen that night. A static string is a fixed piece of text that was already there; the answer was calculated, not stored.

Ten minutes to establish. About thirty seconds to demonstrate in the triage meeting. Nobody asked him to show them it executed; the evidence had answered the question before anyone got to ask it.

That is the whole reason the tool exists. Not to give you more payloads, since you already have more than you will ever use, but to give you the one thing that folder cannot: a defensible answer.

RCEKit is MIT licensed, pure standard library, Python 3.8+, at github.com/kabiri-labs/rcekit. MIT is a permissive open-source licence. Pure standard library means it needs no extra packages beyond what Python ships with. Python 3.8+ means it runs on Python version 3.8 or newer.

The author invites readers to break it and tell him, and especially wants to hear about detection techniques that hold up under real conditions, or reasons one of his does not. The methodology is the part he most wants other testers to argue with, and the timing section exists because someone was right and he was wrong.

Use it only against systems you are authorised to test.

Glossary

  • 200 OK: the standard response code meaning a web request succeeded.
  • API: an interface that lets programs talk to each other, or lets a program talk to a service.
  • Argument: a value passed to a program when it is started.
  • Assessment: a permitted test of a company's own systems to find problems before attackers do.
  • Background job: a task run separately from the web page so the page can answer quickly.
  • Base64: an encoding that turns arbitrary data into letters and digits.
  • Blind: a situation where you get no output back from the target.
  • Callback: an incoming contact from the target to a server you control, used as a signal.
  • Canonical: standard, unmodified form.
  • Chain mode: sending several requests in sequence so a payload takes effect on a later one.
  • Code injection: a flaw where your text is treated as code and run by an interpreter.
  • Command execution: the target running operating-system commands on its own server.
  • commix: an exploitation tool for command injection.
  • Confounder: another explanation for the same observation.
  • Container: a lightweight, isolated environment for running software.
  • Control request: the same request sent without the payload, used for comparison.
  • Cookie: a small piece of data a browser stores for a website; a session cookie identifies your logged-in session.
  • Corroborate: back up one piece of evidence with another, independent one.
  • CVE: Common Vulnerabilities and Exposures, a catalogue giving each public vulnerability an identifier.
  • CWE-94: the catalogue entry for code injection.
  • Deserialisation: turning stored data back into objects in memory.
  • Differential: comparing a probe against a payload-free control.
  • DNS lookup: asking the directory of the internet what address belongs to a domain name.
  • Domain name: the human-readable address of a website, like example.com.
  • Dynamic ID: an identifier that changes each time.
  • Egress: outgoing network traffic from a network to the internet.
  • Encoding: transforming data into a safe form for transport, then back again.
  • Endpoint: a specific address on a website that accepts requests.
  • Evasion: getting past a filter such as a WAF.
  • Expression: here, arithmetic such as a sum.
  • False positive: a finding that turns out to be wrong.
  • Finding: the report of a problem you believe you have discovered.
  • Fixture: a fixed sample value built into a system or test.
  • Flag: an option added to a command to switch a behaviour on.
  • Form field: an input box in a web form.
  • Gadget chain: a sequence of existing code pieces abused to do something harmful.
  • Header: a line of extra information sent with a request or response.
  • Hex encoding: writing each byte as two hexadecimal characters.
  • HTML escaping: replacing characters like < and > with codes so a browser shows them as text.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • Interpreter: a program that reads and executes instructions, such as a template engine.
  • Jitter: small random variation in timing.
  • JSON: a common text format for structured data using key-value pairs.
  • Latency: delay in a response.
  • Listener: a small server that waits for incoming connections.
  • Logger: a component that records what happens.
  • Method: the type of a request, such as GET or POST.
  • MIT licence: a permissive open-source software licence.
  • nuclei: a template-driven scanner for known vulnerabilities at scale.
  • OOB (out-of-band): testing by making the target contact a server you control instead of looking at the response.
  • Oracle: a test whose result tells you the truth about something you cannot see directly.
  • Parameter: a piece of information sent to a website telling it what you want.
  • Path: the part of a web address after the domain.
  • Payload: specially crafted input designed to make a system do something it should not.
  • Percent-encoding (URL encoding): replacing special characters with a percent sign and a code.
  • Probe: one test attempt.
  • Production: the live system real users depend on.
  • Proxy: a tool between your browser and a website that lets you see and edit requests.
  • Queue: a waiting line of tasks to be processed.
  • Ramp: a gradual increase, here in server load.
  • RCE: remote command execution, running commands on a server from elsewhere.
  • Reflected string: text you sent that simply comes back in the response.
  • Regression: fitting a straight line through measured points to see how well they line up.
  • Request: what a browser or tool sends to a website.
  • Response: what the website sends back.
  • Response time: how long a website takes to answer.
  • Rules of engagement: the written rules of a test, including what you may and may not do.
  • Runtime.exec: the Java method for starting an external program.
  • Sandboxed: restricted to doing only certain things.
  • Scanner: an automated program that looks for known problems.
  • Scope document: a document stating exactly what you are allowed to test.
  • Segmented: split into separate network parts that cannot freely talk to each other.
  • Session: a period of interaction with a site after you log in, tracked by a cookie.
  • Shell: the program that reads and runs commands on Linux and similar systems.
  • Signed request: a request carrying a cryptographic signature so the server can verify it was not altered.
  • Sink: the place in a program where input finally gets used.
  • Static string: a fixed piece of text that was already there rather than calculated.
  • Subprocess: a program started by another program.
  • Template engine: software that builds web pages by filling placeholders with values.
  • Time-based command injection: guessing a command ran because the response got slower.
  • Timestamp: the current date and time.
  • Triage: the meeting where findings are reviewed and prioritised.
  • UAT: user acceptance testing, a copy of a system used for testing before release.
  • URL: a web address.
  • WAF: web application firewall, a filter that inspects requests and blocks ones that look malicious.
  • Web root: the folder a web server serves pages from.
  • Worker: a program that does slow tasks separately from the web page.
  • Write primitive: a basic capability to write files on the target.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.