Spring Boot远程代码执行漏洞与内存马探索

近年来,Spring Boot已成为Java开发中最受欢迎的框架之一。然而,与其流行程度相伴随的是对安全性的关注。远程代码执行(Remote Code Execution,RCE)漏洞是一种常见的安全威胁,可以导致严重的安全风险。本文将探讨Spring Boot中的RCE漏洞以及内存马(Memory Shellcode)的相关问题。

  1. Spring Boot远程代码执行漏洞(RCE)

RCE漏洞是一种攻击者可以通过远程执行恶意代码来控制系统的漏洞。在Spring Boot应用程序中,这种漏洞通常是由于不当的用户输入验证或不正确的反序列化实现而引起的。攻击者可以通过构造恶意请求来利用这些漏洞,并以系统管理员的权限执行任意代码。

为了演示这个问题,我们将创建一个简单的Spring Boot应用程序,并故意引入一个RCE漏洞。以下是一个示例控制器:

import org.springframework.web.bind.annotation.
文件上传漏洞到内存马攻击:原理、防御与实战排查指南 文件上传漏洞是Web安全中的常见威胁,攻击者通过上传恶意文件获取服务器控制权。其核心原理在于服务器未对上传文件进行严格校验,导致恶意代码被执行。随着防御技术提升,攻击手段不断演进,无文件攻击技术应运而生,它通过在内存中直接执行恶意代码,绕过传统文件检测机制,极大提升了攻击隐蔽性。内存马作为无文件攻击的典型代表,利用Java反射机制动态注册恶意组件到Web容器,实现持久化驻留。这种技术对金融、政务、企业核心系统等场景构成严重威胁。本文聚焦文件上传漏洞与内存马攻击的完整链路,深入剖析其技术原理与防御策略,为构建 阅读详情

相关推荐

Shiro无回显漏洞利用:JRMP协议与内存马攻防实战

Java反序列化漏洞是Web安全领域的常见威胁,其核心原理在于恶意序列化数据在反序列化过程中可触发任意代码执行。在实战中,攻击者常面临“无回显”困境,即漏洞触发后无法直接获取命令执行结果。为解决这一问题,JRMP(Java远程方法协议)技术提供了一种突破思路,它利用Java RMI的动态类加载机制,在目标服务器内部建立隐秘通信通道。结合内存马技术,攻击者可在Web容器运行时动态注入恶意组件,实现持久化控制,极大提升了攻击的隐蔽性和危害性。本文聚焦Shiro反序列化漏洞,深入剖析如何通过JRMP协议绕过无回显

weixin_33801856的博客 411

从内存快照到RCE:Spring Boot应用配置不当引发的Shiro密钥泄露与反序列化攻击实战分析

Java应用安全中,内存快照(heapdump)是记录JVM堆内存中所有对象状态的文件,常用于性能调优与故障诊断。其生成原理是JVM通过特定接口或工具(如JMX、jmap)将运行时堆内存数据持久化到.hprof文件。然而,若配置不当导致heapdump文件可被公开访问,便会引发严重的信息泄露风险,因为其中可能包含应用密钥、会话令牌、数据库连接字符串等敏感数据。在工程实践中,这种风险常与特定框架的安全机制结合,产生连锁反应。例如,Apache Shiro框架的RememberMe功能使用AES密钥对Cooki

weixin_30268071的博客 339

Spring Boot FatJar文件写入漏洞到RCE攻击链深度剖析

在Java应用安全领域,文件写入漏洞常被视为中低风险,但其与特定框架机制结合可能引发严重后果。Spring Boot的FatJar打包方式通过LaunchedURLClassLoader实现自包含部署,这种类加载机制在特定配置下会扫描外部目录。当应用存在目录遍历或未授权文件写入漏洞时,攻击者可植入恶意JAR文件。结合Spring Boot的loader.path系统属性或DevTools重启机制,恶意类可能被加载执行,实现远程代码执行。这种攻击链利用了FatJar运行原理与框架热加载特性的安全盲区,在配置不

weixin_30655569的博客 351

Spring Boot Actuator端点安全风险与RCE漏洞实战深度剖析

在微服务架构中,应用监控与管理端点(如Spring Boot Actuator)是重要的运维基础设施,其核心原理是通过暴露HTTP或JMX端点来提供应用健康状态、度量指标、环境属性等运行时信息。然而,若配置不当,这些端点会带来严重的安全风险,成为攻击者利用反序列化等漏洞实施远程代码执行(RCE)的入口。从技术价值看,深入理解端点安全机制有助于构建纵深防御体系,防止敏感信息泄露和权限提升。典型的应用场景包括企业级数字化平台、云原生应用等,其中Actuator端点未授权访问结合存在漏洞的第三方库(如common

掬水月在手,弄花香满衣 372

DataEase高危漏洞深度剖析:从未授权访问到远程代码执行

在Web应用安全领域,未授权访问和远程代码执行是两类危害极大的高危漏洞。未授权访问通常源于权限校验机制的缺失或配置错误,攻击者无需认证即可访问敏感接口,为后续攻击铺平道路。其技术原理往往与Spring Security等框架的拦截器、过滤器配置疏漏有关,例如错误地将管理接口加入免认证白名单。远程代码执行则可能通过不安全的反序列化、命令注入或模板引擎注入等路径实现,攻击者利用可控输入在服务器端执行任意命令,直接威胁系统控制权。这两类漏洞的组合,构成了极具破坏性的攻击链,常见于插件系统、文件上传等功能模块,对数

dengyulong的专栏 450

Spring漏洞检测工具Spring_All_Reachable:原理、实战与防御指南

在Java Web应用安全领域,Spring框架因其广泛使用而成为安全测试的重点。其核心安全风险常源于配置不当或框架漏洞,例如远程代码执行(RCE)和表达式语言注入。理解这些漏洞的原理,对于构建安全的应用架构至关重要。Spring Expression Language (SpEL) 的动态解析能力,若未受严格限制,可能被恶意利用,导致服务器被完全控制,这凸显了输入验证和安全配置的技术价值。在渗透测试和安全评估场景中,高效验证此类漏洞能帮助防御者快速定位风险。Spring_All_Reachable 正是这

Coding 449

保姆级教程:用YOLOv5s搞定钢材表面缺陷检测,从数据集NEU-DET到模型部署全流程

本文提供了一份详细的YOLOv5s钢材表面缺陷检测教程,涵盖从NEU-DET数据集处理到模型部署的全流程。针对工业环境中的实际限制,如计算资源有限和标注样本少等问题,提供了优化方案和实用技巧,帮助开发者快速实现高效的钢材缺陷检测系统。

weixin_30568591的博客 469

高能物理相关软件

国内高能物理实验背景     研究物质最深层次结构及相互作用的前沿基础科学。 现代高能物理实验的要素    实例源 、 探测器、   电子学、  触发 DAQ、  原始数据、 刻度、重建 、物理分析、  成果  。 离线软件的地位和作用。    是硬件设备和物理学家的桥梁,是从数据到物理成果转化中的关键和重要的环节。 高能物理实验及其特点 独一无二性,实验规模越来越大,努力省钱(使用

Alan Zhuang的博客 3301

FPGA中的CMAC硬核与Interlaken硬核

CMAC硬核和Interlaken硬核是FPGA中两种重要的内置功能模块,它们分别在CNN推理和高带宽芯片到芯片接口方面发挥着关键作用。FPGA(Field Programmable Gate Array,现场可编程逻辑门阵列)中的CMAC硬核与Interlaken硬核是两种重要的内置功能模块,它们在FPGA设计中扮演着关键角色。需要注意的是,FPGA设计中的硬核选择不仅取决于硬核本身的性能,还需要考虑硬核与FPGA芯片其他部分的兼容性、功耗、成本等因素。Interlaken硬核。

weixin_41230430的博客 1487

从Power到HO:一文搞懂主流脑图谱在DPABI里怎么选,让你的rs-fMRI分析更精准

本文深入解析了rs-fMRI分析中主流脑图谱(如Power、HO、AAL等)在DPABI中的科学选择策略,帮助研究者根据不同的神经科学研究目标优化分析流程。从解剖学图谱到功能连接图谱的特性对比,到DPABI实操中的多图谱分析工作流,提供了全面的方法论指导,助力提升静息态功能磁共振成像(rs-fMRI)研究的精准度和可重复性。

weixin_30654583的博客 405

k8s 100个高频面试题

以下是 100 个 Kubernetes(k8s)高频面试题及其答案,涵盖了 Kubernetes 的核心概念、架构、组件、工作原理以及实际应用。答案:Master 节点组件:API Server:提供 RESTful API 接口,用于与集群交互。etcd:分布式键值存储,用于存储集群的配置数据和状态信息。Controller Manager:运行各种控制器进程,负责维护集群的状态。Scheduler:负责将 Pod 调度到合适的节点上运行。Worker 节点组件:Kubelet:运行在每个节点上的代理,

wankll的专栏 2784

NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty()

Please use torch.nn.Module.to_empty() instead of torch.nn.Module.to()输出(llama) (base) [root@localhost home]# nvidia-smi Unable to determine the device handle for GPU0000:09:00.0: Unknown Error。这是典型的“孤儿进程”,但它还是。(僵尸进程),占用 GPU 资源。如果进程仍然不消失,并且。,这意味着它的父进程是。

m0_61636632的博客 2098

三极管特性曲线看不懂?手把手教你用Multisim仿真分析放大电路频率响应

本文针对模拟电路初学者,详细讲解如何利用Multisim软件进行电路仿真,将抽象的三极管特性曲线与放大电路频率响应分析变得直观可视。通过手把手教学,指导读者从导入三极管SPICE模型、仿真输出特性曲线,到分析动态工作点,最终使用波特图仪深入分析频率响应并进行补偿设计,有效帮助理解电路原理并指导实践调试。

weixin_29230059的博客 125

ESP32-S3模组上兼容SCCB总线与I2C总线的解决方案(1)

ESP32-S3模组上兼容SCCB总线与I2C总线的解决方案(1)

phmatthaus的专栏 776

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: UE油画滤镜编程实践
下一篇: 使用SVG+CSS创建令人惊叹的旋转动画效果
普通网友
博客等级 码龄3年 58粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值