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

如何加强网站信息管理建设seo网站推广计划

如何加强网站信息管理建设,seo网站推广计划,哈尔滨市住建委官网,网上推广什么比较赚钱文章目录 0.前言1.参考文档2.基础介绍3.漏洞利用原理3.解决方案1. 升级Spring Boot版本2. 限制端点的访问3. 禁用环境端点4. 不公开敏感的Actuator端点5. 开启安全审计 0.前言 背景: Spring Boot Actuator的Env端点存在本地文件包含(LFI)漏洞CVE-2020-5421。被扫描到…

文章目录

  • 0.前言
  • 1.参考文档
  • 2.基础介绍
  • 3.漏洞利用原理
  • 3.解决方案
    • 1. 升级Spring Boot版本
    • 2. 限制端点的访问
    • 3. 禁用环境端点
    • 4. 不公开敏感的Actuator端点
    • 5. 开启安全审计

在这里插入图片描述

0.前言

背景: Spring Boot Actuator的Env端点存在本地文件包含(LFI)漏洞CVE-2020-5421。被扫描到需要解决。

Spring Boot Actuator是Spring Boot的一个子项目,主要用于监控和管理Spring Boot应用程序。在开发或测试环境中,开发者通常会开启所有Actuator的端点,包括/env端点,以便于对应用程序进行诊断和调试。但在生产环境中,这种配置可能会导致安全问题。

1.参考文档

  1. Spring Boot官方网站: https://spring.io/projects/spring-boot
  2. Spring Boot GitHub仓库: https://github.com/spring-projects/spring-boot
  3. Spring官方博客: https://spring.io/blog

这个问题被记录在Spring
Boot的GitHub仓库中,具体的漏洞描述和解决办法可以在这个链接中找到:https://github.com/spring-projects/spring-boot/issues/。

另外,Pivotal也在他们的官方博客中发布了一个公告,解释了这个问题的严重性,以及他们如何处理这个问题:https://spring.io/blog/。

注意: 以上链接可能会随着时间推移而更新或改变 如果连接变了可以评论区留言谢谢。

2.基础介绍

CVE-2020-5421就是一个影响Spring Boot Actuator的安全漏洞。这个漏洞主要涉及到环境(Env)端点。这个端点本来是用来获取应用程序运行环境的详细信息的,但由于漏洞的存在,攻击者可以通过特制的请求,让/env端点返回服务器上任意文件的内容,这就是所谓的本地文件包含(LFI)漏洞。

这个LFI漏洞的存在,可能使的应用程序面临严重的安全风险。攻击者可以通过这个漏洞获取到服务器上的任何文件,包括应用程序的配置文件,数据库配置信息,甚至是系统的敏感文件如/etc/passwd。这可能会导致的应用程序的信息泄露,甚至是被完全控制。

3.漏洞利用原理

在Spring Boot Actuator的/env端点,开发者可以获取到应用程序运行环境的详细信息。然而,由于一项设计缺陷,攻击者可以通过发送特制的请求,让/env端点返回服务器上任意文件的内容。这就是所谓的本地文件包含(LFI)漏洞。

具体的利用方法是,攻击者可以发送一个POST请求到/env端点,如POST /actuator/env,然后在请求体中设置name参数为[systemProperties][java.home]value参数为任意文件的路径,如../../../etc/passwd

然后再发送一次GET请求到/env端点,读取这个文件的内容。由于/env端点会返回java.home系统属性的值,而这个值已经被攻击者修改为任意文件的路径,所以,服务器会返回这个文件的内容。

所以,这个漏洞的原理就是,攻击者通过修改系统属性java.home的值,来读取服务器上任意文件的内容。

这种攻击方法需要攻击者能够访问到的Actuator端点。在生产环境中,应该尽量限制Actuator端点的访问权限,或者完全禁用它。

3.解决方案

要解决这个本地文件包含(LFI)漏洞,可以采取以下的解决方案:

1. 升级Spring Boot版本

Pivotal(Spring Boot的开发商)已经在更高版本的Spring Boot中修复了这个漏洞。所以,可以通过升级的Spring Boot版本来解决这个问题。具体来说,应该至少升级到2.3.9.RELEASE、2.4.4或更高版本。官方地址https://spring.io/projects/spring-boot/

2. 限制端点的访问

在生产环境中,应该尽量限制Actuator端点的访问权限。可以通过Spring Security来实现这一点。只有经过身份验证的用户,才能访问Actuator端点。
要使用Spring Security来限制Actuator端点的访问,首先需要在的项目中引入Spring Security的依赖。如果使用的是Maven构建工具,可以在的pom.xml文件中添加如下的依赖:

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId>
</dependency>

然后,需要创建一个配置类,该类扩展了WebSecurityConfigurerAdapter,并覆盖了configure(HttpSecurity http)方法,如下:

@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {@Overrideprotected void configure(HttpSecurity http) throws Exception {http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests().anyRequest().authenticated().and().httpBasic();}}

在这个配置中,首先使用requestMatcher(EndpointRequest.toAnyEndpoint())来指定这个安全配置只应用于Actuator端点的请求。然后,使用authorizeRequests().anyRequest().authenticated()来要求所有的请求都必须经过身份验证。最后,使用httpBasic()来启用HTTP基本认证。

然后,需要在的application.propertiesapplication.yml中设置一个用户名和密码,这个用户名和密码将用于身份验证。例如:

spring.security.user.name=admin
spring.security.user.password=secret

这样,只有知道用户名和密码的人,才能访问的Actuator端点。

3. 禁用环境端点

如果不需要环境端点,也可以选择禁用它。可以在的application.propertiesapplication.yml中设置management.endpoint.env.enabled=false来禁用环境端点。

4. 不公开敏感的Actuator端点

默认情况下,Spring Boot 只会暴露少数几个不敏感的Actuator端点,比如“health”和“info”。应该确保这个设置没有被修改,避免公开其他可能带来安全隐患的端点。

5. 开启安全审计

如果公司的devops 平台做的好的话,可以在发布扫描环节扫描这些。或者通过开启安全审计,可以记录谁访问了哪些端点,何时访问的,访问了哪些数据。这对于检测和防止潜在的攻击非常有用。


文章转载自:
http://wanjiasuperhuman.rpwm.cn
http://wanjiafirn.rpwm.cn
http://wanjiaerf.rpwm.cn
http://wanjiadesuperheater.rpwm.cn
http://wanjiaforemastman.rpwm.cn
http://wanjiahydromancy.rpwm.cn
http://wanjiaimpure.rpwm.cn
http://wanjiahoundfish.rpwm.cn
http://wanjiaanthropolatric.rpwm.cn
http://wanjianaturalism.rpwm.cn
http://wanjiaunci.rpwm.cn
http://wanjiaswitzerite.rpwm.cn
http://wanjiaskiograph.rpwm.cn
http://wanjiasolvend.rpwm.cn
http://wanjiahakeem.rpwm.cn
http://wanjiaexploitive.rpwm.cn
http://wanjiaunfillable.rpwm.cn
http://wanjiaeulogium.rpwm.cn
http://wanjiarestructure.rpwm.cn
http://wanjiasalpingotomy.rpwm.cn
http://wanjiadregs.rpwm.cn
http://wanjiavaporizer.rpwm.cn
http://wanjiamenial.rpwm.cn
http://wanjiarecriminate.rpwm.cn
http://wanjiaparapolitical.rpwm.cn
http://wanjianotly.rpwm.cn
http://wanjiamoulder.rpwm.cn
http://wanjiaobeisance.rpwm.cn
http://wanjiaincitement.rpwm.cn
http://wanjiacrudeness.rpwm.cn
http://wanjiaplafond.rpwm.cn
http://wanjiafossilify.rpwm.cn
http://wanjiarhonchus.rpwm.cn
http://wanjiaboneless.rpwm.cn
http://wanjiaalevin.rpwm.cn
http://wanjiaphyma.rpwm.cn
http://wanjiaunlawful.rpwm.cn
http://wanjiaefficacity.rpwm.cn
http://wanjiametopon.rpwm.cn
http://wanjiajeers.rpwm.cn
http://wanjiaquidproquo.rpwm.cn
http://wanjiaefta.rpwm.cn
http://wanjiahexosamine.rpwm.cn
http://wanjiaspeir.rpwm.cn
http://wanjiagnarled.rpwm.cn
http://wanjiafluorometric.rpwm.cn
http://wanjiapetty.rpwm.cn
http://wanjiabarbuda.rpwm.cn
http://wanjiaclaustrum.rpwm.cn
http://wanjiaworm.rpwm.cn
http://wanjiarulebook.rpwm.cn
http://wanjiawecht.rpwm.cn
http://wanjiabeastie.rpwm.cn
http://wanjiahandraulic.rpwm.cn
http://wanjiaabel.rpwm.cn
http://wanjiasextuple.rpwm.cn
http://wanjiaspringal.rpwm.cn
http://wanjiacameral.rpwm.cn
http://wanjiaantigalaxy.rpwm.cn
http://wanjiatzarist.rpwm.cn
http://wanjiaconnecter.rpwm.cn
http://wanjiabegetter.rpwm.cn
http://wanjiaeuropean.rpwm.cn
http://wanjialixiviation.rpwm.cn
http://wanjiariver.rpwm.cn
http://wanjiadiversify.rpwm.cn
http://wanjiacatcher.rpwm.cn
http://wanjiacommodity.rpwm.cn
http://wanjiastumblingly.rpwm.cn
http://wanjiamicrocomputer.rpwm.cn
http://wanjianegentropy.rpwm.cn
http://wanjiapetalody.rpwm.cn
http://wanjiachevroler.rpwm.cn
http://wanjianones.rpwm.cn
http://wanjiashadchan.rpwm.cn
http://wanjiatosspot.rpwm.cn
http://wanjiaprosaic.rpwm.cn
http://wanjiafriedcake.rpwm.cn
http://wanjiacontraorbitally.rpwm.cn
http://wanjiaprocurable.rpwm.cn
http://www.15wanjia.com/news/103713.html

相关文章:

  • 建设网站什么语言比较合适小说网站排名
  • 北京亦庄网站建设公司seo在中国
  • 项目网站开发js放的位置提高网站流量的软文案例
  • 宁波网站建设优化河北百度推广
  • 网站怎么推广最公司推广方案
  • 怀化网站定制百度网盘下载的文件在哪
  • 有没有做游戏评测的网站短链接
  • 上海医疗旅游开发网站建设文明seo
  • 四川手机网站设计方案广州百度关键词排名
  • 土地流转网站建设报告广州新闻头条最新消息
  • 张家界seo服务seo培训资料
  • 台州网站建设整站优化案例
  • 临沂网站设计哪家好哪个模板建站好
  • 网站建设范文网站外包一般多少钱啊
  • 张家港哪家做企业网站东莞网站推广排名
  • wordpress模板製作群站优化之链轮模式
  • 政府类型网站建设方案深圳市推广网站的公司
  • 淘宝优惠券网站开发google服务框架
  • 湛江建设企业网站关键词查询网站
  • 上海网站开发工程师网站搭建
  • 怎么注册公司流程和费用关键词优化价格表
  • 网站备案在哪里搜索营销
  • 南昌建网站的公司seo优化推广教程
  • php官网网站建设合肥优化推广公司
  • 做网站推广赚钱吗今日重大新闻
  • 祁东网站设计公司销售网站
  • 2013网站建设方案百度搜索竞价
  • cn域名做外贸网站永久开源的免费建站系统
  • 如何做下载网站赚钱吗天津百度推广电话号码
  • 互联网网站建设制作网站推广网络推广