1024programmer Blog PHP obfuscation and decryption, php obfuscation encryption and decryption in practice_Hou Ge’s Blog

PHP obfuscation and decryption, php obfuscation encryption and decryption in practice_Hou Ge’s Blog

When looking at other people’s php source code, we often see encrypted php code. So what is the principle of php encryption? How to decrypt it?

Obfuscation encryption

Encryption code: <?php

/**

* Created by PhpStorm.

* User: tioncico

* Date: 20-3-28

* Time: 9:59 am

*/

class Tioncico{

function testEcho(){

echo “Xianshike\n”;

}

}

$tioncico = new Tioncico();

$tioncico->testEcho();

After successful encryption:

5cf8bcbede7690c62bf0fedc9e48997c.png

Successful execution:

b1f20beb6c381c95d254d31dac59abea.png

So, what is the encryption principle of this string of codes? /p>

It can be found that it is another eval package, continue to output:

fde1a2d594fd6a759dbafd9e304df48e.png

Similarly, find the last eval, output:

45404a3e76db2e7dadb3ed926cab17ca.png

Continue:

cde3f299ded922eee5ff52ee5527ee02.png

76636996d22bbfe1ed7888dcfab0e0bf.png

The code before encryption is obtained.

The principle of obfuscated encryption

The obfuscated encryption passes through repeated base64, then obfuscates the base64_encode, decode functions, and finally executes the decryption through eval. As long as you understand a little bit of the principle, you can decrypt successfully.

This article is an original article by Xian Shi Ke, you don’t need to contact me for reprinting, but please indicate that it is from Xian Shi Ke’s blog www.php20.cn

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/php-obfuscation-and-decryption-php-obfuscation-encryption-and-decryption-in-practice_hou-ges-blog/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索