两个审计记录

JAX-RS接口 XXE跟进记录

某个项目

在HeikeServiceImpl中有一处解析xml的方法

image

参数input由上一层传来

image

查看都有哪些地方调用了parseMetadata方法

image

先看第二个

在NiganshaServiceImpl类的方法中,是根据传入的appkey来取出需要解析的对象

image

除非找到有一个功能可以编辑保存appkey对应的信息,否则这个getXml参数不可控

image

找需要时间,所以返回上图看WoganshaServiceImpl类

在WoganshaServiceImpl类的方法中,从代码可以看到是传入了一个被base64编码过的参数

image

往上跟进addSEDefinition方法,在create方法中用到了addSEDefinition

image

再往上跟进就能看到终点

image

接口中@path注解就是请求路径,参数content就是触发点,参数dtype、appkey随便填,把xxe payload编码成base64后传过去就行了

 

最后,第二个点,说到刚刚的NiganshaServiceImpl,找setCurrent

Client.java:

image

将其搜之

可以看到参数xml是被其封装到了Client中

image

ClientMeta:

image

所以再往回看,实际getCurrent获取到的就是setCurrent的内容

image

image

然后后面就跟第一个点一样往上找url映射就行了

任意文件上传记录

UploadController.class

image

module变量会当成目录传进file对象,filename没有校验格式

image

POST /upload/1/2


声明:
本文章用于学习交流,严禁用于非法操作,出现后果一切自行承担,阅读此文章表示你已同意本声明。

Disclaimer:
This article is for study and communication. It is strictly forbidden to use it for illegal operations. All consequences shall be borne by yourself. Reading this article means that you have agreed to this statement.