Java代码审计实战 | Github开源项目
思路讲解
初入代码审计的师傅,苦于寻找开源的项目练练手,这里就结合Github上的开源项目进行简单审计,方便师傅们跟随步骤学习思路。开源挖洞思路仅供参考,不得使用漏洞于非法用途。
kvf-admin代码审计
挑选Java语言开发的开源Github项目来代码审计,第一个是kvf-admin
项目地址:https://github.com/kalvinGit/kvf-admin?tab=readme-ov-file
Java后端启动后台之后的登录页面如下:
任意文件上传
登录后台,在资本资料 - 用户头像处可以上传人员文件,此处没有限制格式和内容
对应的调用的方法为fileUpload
上传没有过滤文件后缀和内容
直接上传获取路径,数据包如下:
POST /common/fileUpload HTTP/1.1 Accept: application/json, text/javascript, */*; q=0.01 Accept-Encoding: gzip, deflate, br, zstd Accept-Language: zh-CN,zh;q=0.9 Connection: keep-alive Content-Length: 703477 Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryHpqxuxq5RM32xO3V Cookie: JSESSIONID=2648996e-59d9-4a81-8562-66e136334abb; rememberMe=WwDVuhLMSgLXB47hXFmIsDUCi1wLlcoWt/8lZNdHJH1vKAYEENnN+WmKi5KzrCu2a2QvAbrQD0ZK4QOLa2CidYfaF27zuDvbWfUdRtzJiOys7fG5wv31Crnp5hk8mxaLjEL9gffgnFO6est/iK/4FcMl4+/0hgqPwAwZRz9J+m/noyNGmcMkDDO9yAPXFluiHTib92i1qHU2liZ+YT2uYkVdT0/moBEroItpIyeqNpoes0wNhZ9OIkdwCCNoHlPWo1QZvCglh5XlGF0iI7jsnDXZAUEcPzVyHh3cryzKcVGK4/VV/v2ozpO4U8V77w1FT3Ad08EDTa/fR6EcC4tWTA1vRlzhkVSBW7NUqR/3hlzPaaHiYO/jPQSNwB4aPHGz8L8HimuUhKgzd+U63Q9ItRAjiNLMummYtKruiopOd77GNxsVWMsZIbvpeNwN8ML8rRAEEjV4QdR0HQODio/ov0UW4lHIUya6gvB2V2/ZtfZaOjtP5qewmGgqFfbGmnEEuw5dZbvz9/el10I1UTw4O7g2HCOCFE/XLE6R5DCx2T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ys/user/info Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site:
本文为 独立观点,未经允许不得转载,授权请联系FreeBuf客服小蜜蜂,微信:freebee2022
被以下专辑收录,发现更多精彩内容
+ 收入我的专辑
+ 加入我的收藏
相关推荐
文章目录