afterlogic webmail lite php,AfterLogic WebMail最新版任意文件包含 | CN-SEC 中文网

AfterLogic

AfterLogic WebMail在安装后默认是不会删除install目录的

所以这里你也可以重装,设置自己的mailserver,进行各种操作

在安装过程中存在设计缺陷导致无需登录,即可进行任意文件包含

文件/install/index.php:

code 区域

跟进/install/installer.php:

code 区域

$this->_sState = isset($_GET['step']) ? $_GET['step'] : 'index'; $this->_aMenu = array( 'compatibility', 'license', 'license-key', 'db', 'dav', 'admin-panel', 'email-server-test', 'completed' ); function Run() { if (isset($_GET['post'])) { $this->Post(); exit(); } if ('index' === $this->_sState) { $_SESSION['checksessionindex'] = true; header('Location: index.php?step=compatibility'); exit(); } $sState = in_array($this->_sState, $this->_aMenu) ? $this->_sState : 'compatibility';

当这里是POST请求时会调用POST函数

如果是GET的话就会判断这里的$this->_sState:

code 区域

$sState = in_array($this->_sState, $this->_aMenu) ? $this->_sState : 'compatibility';

所以这里参数$this->_sState被限制,没办法利用,我们看看POST方法:

code 区域

function Post() { $sState = empty($_POST['state']) ? '' : $_POST['state']; if (isset($_POST['back_btn'])) { header('Location: '.'index.php?step='.$this->getBackStep($sState)); } else { $oStepObject = null; if (@file_exists(WM_INSTALLER_PATH.'steps/'.$sState.'.php')) { include_o

可以看到这里$sState = empty($_POST['state']) ? '' : $_POST['state'];

然后判断文件是否存在,如果存在就include_once这个文件

在进入include_o

所以导致存在包含漏洞

但是这里有点鸡肋,就是需要截断,在5.3.4后的php版本就没办法进行截断了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值