邪恶八进制信息安全团队技术讨论组's Archiver

金州 2006-6-14 15:05

[转载]Sablog-x v1.0 Vulnerability

文章作者:superhei

Sablog-x v1.0 Vulnerability

          by superhei 2006.5.1

[just fun :)]

1.Path Disclosure

eg:
/archives/include/article.inc.php
/archives/include/global.php
/archives/include/index.inc.php
/include/fense.php
/include/seccode.php

2.从后台得到shell
/admin/database.php 行112-163

      $path = $_POST['path'];
if (file_exists($path)) {
  redirect('文件已经存在,请选择其他文件名.', './admincp.php?job=database&action=backup',5);
}
   $tables = $_POST['table'];
$extension=strtolower(substr(strrchr($path,'.'),1)); //取最后一个.后面的判断
if ($extension == 'sql') {

          ...............

       } else {
  redirect('备份生成文件的扩展名必须为.sql', './admincp.php?job=database&action=backup',5);
}

在备用数据库时候只是简单的取最后一个.为标准,判断是不是sql,那么如果是apache服务器,先在数据库里插入我们的shellcode在备用后缀为.php.sql 的文件,里面的phpcode将被执行。

页: [1]
© 1999-2008 EvilOctal Security Team