我试图了解 vBulletin 5.1.x (CVE 2015-7808) 中的 PHP 对象注入缺陷,我偶然发现了 OWASP 所述的对象注入要求:
应用程序必须有一个实现 PHP 魔术方法(如 __wakeup 或 __destruct)的类,可用于执行恶意攻击或启动“POP 链”。
来源:https ://www.owasp.org/index.php/PHP_Object_Injection
然而,在这篇关于 vbulletin 漏洞的文章中,我没有看到被利用的魔法方法,而是rewind()调用了类的函数,vB_dB_Result因为foreach():
public function decodeArguments($arguments){
if ($args = @unserialize($arguments)){
$result = '';
foreach ($args AS $varname => $value){
$result .= $varname;
...
class vB_dB_Result implements Iterator{
...
public function rewind(){
//no need to rerun the query if we are at the beginning of the recordset.
if ($this->bof){
return;
}
if ($this->recordset){
$this->db->free_result($this->recordset);
}
...
abstract class vB_Database{
...
function free_result($queryresult){
$this->sql = '';
return @$this->functions['free_result']($queryresult);
}
在这种情况下,我是否遗漏了什么或者 OWASP 声明只是错误的?