RCE漏洞

web安全---RCE(远程命令/代码执行)原理及DVWA漏洞演示 简介 RCE为两种漏洞的缩写,分别是"远程命令/代码执行",攻击者可以远程命令注入系统命令或者代码,从而拿下目标服务器 RCE 漏洞形成 远程系统命令执行(简称命令注入)是一种注入漏洞。攻击者构造payloads让受害者操作系统执行该命令。当Web应用程序代码包含操作系统调用并且调用中使用了用户输入时,才可能进行OS命令注入攻击。这时候,用户提交的系统命令会直接在服务器中执行,并返回。命令注入漏洞可能会出现在所有让你调用系统外壳命令的语言,如c,python,php等。 注:命令注入并.. 阅读详情

                       RCE(远程代码/命令执行)漏洞


前言

       个人观点,若有误请指教


简介

  • RCE(Remote Code/Command Execute)为远程代码/命令执行的漏洞
  • 漏洞产生的原因:在Web应用中开发者为了灵活性,简洁性等会让应用去调用代码或者系统命令执行函数去处理。同时没有考虑用户是否可以控制这些函数的参数问题(若不能控制这些参数,自然也没有这个漏洞;若能控制这些参数,也可能出现考虑了但没有完全防住或者压根没考虑 😕),以至于这个漏洞的产生。

漏洞挖掘

  • 白盒测试,查看命令执行函数是否做过滤。命令执行函数如下:

PHP代码执行函数:eval()、assert()、preg_replace()、create_function()、array_map()、call_user_func()、call_user_func_array()、array_filter()、uasort()
PHP系统执行函数:system()、exec()、shell_exec()、pcntl_exec()、popen()、proc_popen()、passthru()
注1:若代码执行函数的输入参数被``反引号包含时,则此时相当于系统执行函数,如输入值为echo (反引号)dir(反引号);
注2:由反引号括起来的字符串被当做shell命令执行,其标准输出结果取代整个反引号部分。
注3:反引号不区分操作系统,无论Window还是Linux都有这个现象。

  • 黑盒检测
    ①漏洞扫描工具。
    ②公开漏洞。
    ③手工看参数及其功能,根据其特点来判断有没有漏洞。

代码命令执行函数利用

  • 这里以最普通的eval函数为例,下面给出php漏洞代码
<?php
      $code = $_GET['x'];
      echo $code;
      echo "</br>
RCE 漏洞 CTFhub学习 文章目录前言什么是RCE漏洞eval执行命令注入(无过滤)过滤cat 前言 之前刷buu的题的时候,见过RCE漏洞的题,但是由于没有系统的学习,解题比较的困难。这次,系统的学习一下,再去解那道题。 什么是RCE漏洞 RCE英文全称:remote command/code execute 分为远程命令执行ping和远程代码执行evel。 出现的原因是:没有在输入口做输入处理。 eval执行 <?php if (isset($_REQUEST['cmd'])) { eval($_REQUEST[ 阅读详情

相关推荐

【网络安全】RCE漏洞讲解、绕过方式及实例介绍

4、passthru():能将字符串作为OS命令执行,只调用命令不返回任何结果,但把命令的运行结果原样输出到标准输出设备上;6、call_user_func_array():回调函数,第一个参数为函数名,第二个参数为函数参数的数组。2、exec():能将字符串作为OS命令执行,但是只返回执行结果的最后一行(约等于无回显)5、call_user_func():回调函数,第一个参数为函数名,第二个参数为函数的参数。1、system():能将字符串作为OS命令执行,且返回命令执行结果;

等风来 4036

《WEB安全渗透测试》(30)RCE漏洞挖掘技巧

我们安全工程师最喜欢的漏洞是什么?非RCE漏洞莫属!那RCE漏洞挖掘是否有技巧可言?

午夜安全 2071

ShardingSphere-jdbc 5.5.0 + spring boot 基础配置 - 实战篇

shardingsphere 5.5.0移除了sm4算法,自己加上即可。增加spi扩展org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm增加以下代码:SM4算法代码/***/static {@Getter@Overrideif (!

qq_21903999的博客 4742

Isaac Lab强化学习实战:用SO-ARM101机械臂实现抓取任务(附B站视频教程)

本文详细介绍了如何使用Isaac Lab强化学习框架,在SO-ARM101机械臂上实现抓取任务的完整实战流程。内容涵盖从环境搭建、奖励函数设计、训练调参到模型部署的各个环节,并分享了Sim-to-Real迁移的关键技巧,旨在帮助开发者高效完成机器人强化学习项目。

weixin_29070721的博客 1101

遥感图像处理实战:DOTA数据集旋转框转YOLO格式全流程解析(附代码)

本文详细解析了将DOTA遥感数据集的旋转框标注转换为YOLO格式的全流程。针对遥感图像中物体朝向任意性的特点,文章重点阐述了将旋转框转换为外接水平框的数学原理与代码实现,并提供了批量转换脚本和可视化验证方法,帮助开发者高效处理数据,为基于YOLO的遥感目标检测项目奠定基础。

weixin_29082143的博客 398

Jupyter Lab 无法启动 Kernel 问题排查与解决总结

使用 curl,telnet,或 Python websocket-client 库可以本地模拟 WebSocket 握手行为,帮助分析服务端响应状态。避免使用 http:// + ws:// 组合方式部署 Jupyter Lab,特别是在远程或跨域访问场景。建议统一采用 https:// + wss:// 方式部署,确保浏览器信任并兼容。确认 WebSocket 已升级为 wss://,内核可正常启动。但在远程访问时,浏览器出于安全策略,默认拒绝 ws:// 协议。

weixin_43866043的博客 1857

华南理工大学电子与信息学院23年预推免复试面试经验贴

华南理工大学电子与信息学院23年预推免复试面试经验贴

Scut_Ty的博客 3297

2024年ERP管理系统职业技能大赛软件测试赛项-测试报告

【说明本次测试的最终测试结果总结、测试过程中遇到的重要问题以及如何解决、被测系统的质量结论、个人的收获以及团队的得失等】【说明编写本测试报告的目的和实际读者】【说明本次测试实际人员安排及主要职责】【说明本次测试使用的测试用例设计方法】【说明本次测试使用的测试方法】【针对本次测试进行Bug汇总】【针对本次测试进行用例汇总】【说明本项目的背景情况】【说明本次测试的实际。

Code is fun. 787

小工匠聊架构-分布式场景下的并发幂等性常见的解决方案

Pre 我们来回顾下单体时代 单体时代,应用部署在一台主机上,可以使用JVM级别的锁来控制并发请求 。 随着应用规模的不断扩大,集群化或者微服务化的分布式部署越来越普及,每个应用都是一个单独的JVM应用,所以单体时代的这种处理方式已经无法满足当前架构下的业务需求了。 JVM级别的锁已经无法满足跨进程之间访问控制了,进而演化出来了分布式锁。 分布式锁 能否解决幂等性问题? 分布式锁解决什么问题? 简言之: 解决跨进程间无法共享本地资源的问题 ,解决的是分布式场景下并发访问的问题。 为什么需要确保并发.

小工匠 2万+

图像增强算法:基于Retinex的图像增强算法

该算法对图像的亮度和颜色进行分离处理,然后通过调整它们的比例来提高图像的质量。滤波后的图像将保留颜色信息,并减少图像中的噪声。接下来,Retinex算法使用一个高通滤波器对原始图像进行滤波处理,以增强图像中的亮度信息。通过使用Retinex增强算法,我们可以有效地提高图像的质量,增强图像中的细节和颜色信息。最后,Retinex算法通过将颜色恢复和亮度调整后的图像进行比例调整,以获得最终的增强图像。Retinex算法是一种常用的图像增强算法,它通过对图像的亮度和颜色进行调整,以提高图像的视觉质量。

XsiJava的博客 436

Devexpress16.2.6破解工具

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

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

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

上一篇: [强网杯 2019]随便注 —— 堆叠注入
下一篇: [SUCTF 2019]EasySQL ——堆叠注入+sql_mode
月生ψ
博客等级 码龄7年 60粉丝 25原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值