【问题标题】:Unknown PHP obfuscation technique未知的 PHP 混淆技术
【发布时间】:2018-07-05 16:22:00
【问题描述】:

我遇到过一段使用各种混淆技术的代码,主要是出于好奇,我一直试图理解它使用的技术。

我已经完成了一些工作,但我不完全了解它在做什么:

public $x1528 = null;
public $x153c = null;

function __construct()
{
    $this->x1528 = new \StdClass();
    $this->x153c = new \StdClass();
    $this->x1528->x21a9 = "getSingleton";
    $this->x1528->x1569 = "x1565";
    $this->x1528->x1e45 = "x1e40";
    $this->x153c->x3b3b = "x3b38";
    $this->x1528->x16c3 = "x16c2";
    $this->x1528->x1bec = "x1be8";
    $this->x1528->x245a = "x2455";
    $this->x1528->x1b14 = "x10d7";
    $this->x153c->x36d4 = "x36d2";
    $this->x1528->x24d6 = "getSingleton";
    $this->x1528->x1876 = "xf0f";
    $this->x1528->x2901 = "x2900";
    $this->x1528->x1877 = "x1876";
    $this->x153c->x335b = "x3356";
    $this->x1528->x2836 = "x2833";
    $this->x1528->x2119 = "x2115";
    $this->x1528->x18bb = "xf3d";
    $this->x153c->x349e = "x349a";
    $this->x1528->x2383 = "getData";
    $this->x1528->x17b1 = "x5f2";
    $this->x153c->x2d06 = "xf41";
    $this->x1528->x1f35 = "x1f30";
    $this->x1528->x1a93 = "x1138";
    $this->x1528->x1d79 = "x1d76";
    $this->x1528->x1d7c = "x1d79";
    $this->x153c->x3248 = "_isAllowed";
    ...
    [it keeps going for a while...]

所以它声明空变量,生成空对象,然后存储字符串和对其他变量的引用,但是... 例如,

$this->x1528->x21a9 = "getSingleton";

什么是 x21a9 ?任何地方都没有对此的引用,我认为 x1528 变量是空的?另外,这是在没有 $ 的情况下引用 $x1528 的一种方式,因为我以前从未见过这种语法。

这是使用我不知道的 PHP 技术,这让我很好奇。有什么帮助吗?

【问题讨论】:

  • 使用了哪种混淆工具?
  • 我不知道。我发现这段代码已经被混淆了,我想理解它。我什至不知道这种技术是如何被调用的,所以我找不到可以做到这一点的工具。
  • "什么是 x21a9" -- 没什么特别的。只是一个属性名称。

标签: php obfuscation deobfuscation


【解决方案1】:

没有看到整个代码很难说。但基本上这只是“胡言乱语”,难以阅读,但基本的 PHP 仍然如此。

什么是 x21a9?

这只是在$x1528 类上设置的随机属性。喜欢:

$dummyClass = new StdClass(); // Same as $this->x1528 = new \StdClass();
$dummyClass->foo = "bar"; // Same as $this->x1528->x21a9 = "getSingleton";

现在,echo $dummyClass->foo 将返回 bar。它只是设置一个具有值的属性,但具有“神秘”的名称。

我以为 x1528 变量是空的?

它在类的开头是空的,但在构造函数中,它立即被设置为StdClass的实例:

$this->x1528 = new \StdClass();

另外,这是在没有 $ 的情况下引用 $x1528 的一种方式,因为我以前从未见过这种语法。

这是对象的基本语法。对象本身前面有一个$,但属性没有。

【讨论】:

  • 我想我被名字弄糊涂了,这似乎是真的很重的分层。谢谢
  • 额外问题:在这个文件中,没有其他任何东西被调用或回显,它只是添加了大量的对象属性,仅此而已。它实际上是如何执行任何操作的?你会如何去混淆这个?
猜你喜欢
  • 2011-02-03
  • 2011-01-24
  • 1970-01-01
  • 2012-10-04
  • 2012-07-18
  • 2015-03-12
  • 1970-01-01
  • 2018-03-29
  • 1970-01-01
相关资源
最近更新 更多