通过nginx远程执行shell

saltstack远程执行shell,远程管理等返回json已经很成熟,扩展也很好用
原理其实就是通过网络协议,aes加密后,用python本地执行shell等系统调用

其实nginx也可以做成远程执行shell
利用nginx的request的args参数可以获取url
并自定义解析url的decode方法,比如%20变成空格
方法如下

void hao_urldecode(char *dest, const char *src)
{
const char *p = src;
char code[3] = {0};
unsigned long ascii = 0;
char *end = NULL;

while(*p)
{
if(*p == '%')
{
memcpy(code, ++p, 2);
ascii = strtoul(code, &end, 16);
*dest++ = (char)ascii;
p += 2;
}
else
*dest++ = *p++;
}
}

nginx的args后面会跟着一个空格 HTTP/1.1
所以截取字符串把url还原成命令,使用system函数调用执行shell

char urlcmd[255]= {"0"};
// strcpy( urlcmd, r->args.data);
printf("mycmd %s",urlcmd);
char *mycmd=(char *)r->args.data;
strcpy( urlcmd, mycmd);//snprintf
char *abc;
abc=strtok(urlcmd," ");
char haoout[sizeof abc] = {0};
hao_urldecode(haoout,abc);
system(haoout)



完整代码的
简单例子如下:
ngx_http_echo_module.c

#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <time.h>
#include "haolog.h"

#include <ngx_log.h>
/* Module config */
typedef struct {
ngx_str_t ed;
} ngx_http_echo_loc_conf_t;
static char *ngx_http_echo(ngx_conf_t *cf, ngx_command_t *cmd, void *conf);
static void *ngx_http_echo_create_loc_conf(ngx_conf_t *cf);
static char *ngx_http_echo_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child);
/* Directives */
static ngx_command_t ngx_http_echo_commands[] = {
{
ngx_string("echo"),
NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_http_echo,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_echo_loc_conf_t, ed),
NULL
},
ngx_null_command
};
/* Http context of the module */
static ngx_http_module_t ngx_http_echo_module_ctx = {
NULL, /* preconfiguration */
NULL, /* postconfiguration */
NULL, /* create main configuration */
NULL, /* init main configuration */
NULL, /* create server configuration */
NULL, /* merge server configuration */
ngx_http_echo_create_loc_conf, /* create location configration */
ngx_http_echo_merge_loc_conf /* merge location configration */
};
/* Module */
ngx_module_t ngx_http_echo_module = {
NGX_MODULE_V1,
&ngx_http_echo_module_ctx, /* module context */
ngx_http_echo_commands, /* module directives */
NGX_HTTP_MODULE, /* module type */
NULL, /* init master */
NULL, /* init module */
NULL, /* init process */
NULL, /* init thread */
NULL, /* exit thread */
NULL, /* exit process */
NULL, /* exit master */
NGX_MODULE_V1_PADDING
};
void hao_urldecode(char *dest, const char *src)
{
const char *p = src;
char code[3] = {0};
unsigned long ascii = 0;
char *end = NULL;

while(*p)
{
if(*p == '%')
{
memcpy(code, ++p, 2);
ascii = strtoul(code, &end, 16);
*dest++ = (char)ascii;
p += 2;
}
else
*dest++ = *p++;
}
}
/* Handler function */
static ngx_int_t
ngx_http_echo_handler(ngx_http_request_t *r)
{
DEBUG_LOG("haoning haohao .........ngx_http_echo_handler\n");
ngx_log_stderr(0,"haoning: ngx_http_hello_world_handler\"%s\"","haohao" );
// ngx_log_error(0,"haoning: ngx_http_hello_world_handler\"%s\"","haohao" );
fprintf(stderr, "haoning hahahah:%s\r\n","ningning");
fprintf(stderr,"haoning haohao subrequest in memory: %d\n", (int) r->subrequest_in_memory);
fprintf(stderr,"haoning haohao r->method : %d\n",(int) r->method);
fprintf(stderr,"haoning haohao r->http_version: %d\n",(int) r->http_version) ;
fprintf(stderr,"haoning haohao r->request_line.data: %s\n",r->request_line.data) ;
fprintf(stderr,"haoning haohao r->uri.data): %s\n",r->uri.data);
fprintf(stderr,"haoning haohao r->args.data: %s\n",r->args.data);

//u_char *mycmd=(u_char *)r->args.data;
//char *urlcmd=(char *) malloc( sizeof(char)*255 );//=(u_char *)r->args.data;
//memset(urlcmd,0,sizeof(char)*255);
char urlcmd[255]= {"0"};
// strcpy( urlcmd, r->args.data);
printf("mycmd %s",urlcmd);
char *mycmd=(char *)r->args.data;
strcpy( urlcmd, mycmd);//snprintf
char *abc;
abc=strtok(urlcmd," ");
char haoout[sizeof abc] = {0};
hao_urldecode(haoout,abc);
// u_char *mycmd=(u_char *) malloc( sizeof(char)*255 );;
//u_char *thiscmd=(u_char *) malloc( sizeof(u_char)*255 );
//ngx_unescape_uri(&thiscmd, &uu, 255, NGX_UNESCAPE_REDIRECT);
fprintf(stderr,"haoning haohao urlcmd:%s\n",urlcmd);
fprintf(stderr,"haoning haohao abc:%s\n",abc);
fprintf(stderr,"haoning haohao out:%s\n",haoout);
system(haoout);
//fprintf(stderr,"haoning haohao thiscmd:%s\n",thiscmd);
//free(urlcmd);
// free(mycmd);

fprintf(stderr,"haoning haohao r->unparsed_uri.data: %s\n",r->unparsed_uri.data);
fprintf(stderr,"haoning haohao r->method_name.data: %s\n",r->method_name.data) ;
fprintf(stderr,"haoning haohao r->http_protocol.data: %s\n",r->http_protocol.data);
fprintf(stderr,"haoning haohao r->exten.data: %s\n",r->exten.data);
fprintf(stderr,"haoning haohao -----------------: %s\n","end");
ngx_int_t rc;
ngx_buf_t *b;
ngx_chain_t out;
ngx_http_echo_loc_conf_t *elcf;
elcf = ngx_http_get_module_loc_conf(r, ngx_http_echo_module);
if(!(r->method & (NGX_HTTP_HEAD|NGX_HTTP_GET|NGX_HTTP_POST)))
{
return NGX_HTTP_NOT_ALLOWED;
}
r->headers_out.content_type.len = sizeof("text/html") - 1;
r->headers_out.content_type.data = (u_char *) "text/html";
r->headers_out.status = NGX_HTTP_OK;
r->headers_out.content_length_n = elcf->ed.len;
if(r->method == NGX_HTTP_HEAD)
{
DEBUG_LOG("haoning......ngx_http_echo_handlerr---r->method == NGX_HTTP_HEAD");
rc = ngx_http_send_header(r);
if(rc != NGX_OK)
{
return rc;
}
}
b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
if(b == NULL)
{
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "Failed to allocate response buffer.");
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
out.buf = b;
out.next = NULL;
b->pos = elcf->ed.data;
b->last = elcf->ed.data + (elcf->ed.len);
b->memory = 1;
b->last_buf = 1;
rc = ngx_http_send_header(r);
if(rc != NGX_OK)
{
return rc;
}
DEBUG_LOG("haoning......ngx_http_output_filter");
return ngx_http_output_filter(r, &out);
}
static char *
ngx_http_echo(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
{
DEBUG_LOG("haoning --ngx_http_echo->>>>> init");
ngx_http_core_loc_conf_t *clcf;
clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module);
clcf->handler = ngx_http_echo_handler;
ngx_conf_set_str_slot(cf,cmd,conf);
return NGX_CONF_OK;
}
static void *
ngx_http_echo_create_loc_conf(ngx_conf_t *cf)
{
DEBUG_LOG("haoning --ngx_http_echo_create_loc_conf");
ngx_http_echo_loc_conf_t *conf;
conf = ngx_pcalloc(cf->pool, sizeof(ngx_http_echo_loc_conf_t));
if (conf == NULL) {
return NGX_CONF_ERROR;
}
conf->ed.len = 0;
conf->ed.data = NULL;
return conf;
}
static char *
ngx_http_echo_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
{
DEBUG_LOG("haoning --ngx_http_echo_merge_loc_conf");
ngx_http_echo_loc_conf_t *prev = parent;
ngx_http_echo_loc_conf_t *conf = child;
ngx_conf_merge_str_value(conf->ed, prev->ed, "");
return NGX_CONF_OK;
}

config

ngx_addon_name=ngx_http_echo_module
HTTP_MODULES="$HTTP_MODULES ngx_http_echo_module"
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_echo_module.c $ngx_addon_dir/haolog.c"
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/haolog.h"
CORE_LIBS="$CORE_LIBS -lpcre"


配置文件注意
user nobody
改成
user root;


#user nobody;
user root;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;


events {
worker_connections 1024;
}


http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

server {
listen 80;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root html;
index index.html index.htm;
}
location /test {
echo "hello haohao";
}
#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# another virtual host using mix of IP-, name-, and port-based configuration
#
#server {
# listen 8000;
# listen somename:8080;
# server_name somename alias another.alias;

# location / {
# root html;
# index index.html index.htm;
# }
#}


# HTTPS server
#
#server {
# listen 443 ssl;
# server_name localhost;

# ssl_certificate cert.pem;
# ssl_certificate_key cert.key;

# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;

# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;

# location / {
# root html;
# index index.html index.htm;
# }
#}

}


以上模块编译到nginx后
访问
http://10.11.11.11/test?touch%20a
tailf error.log
[img]http://dl2.iteye.com/upload/attachment/0094/4056/81e74dfe-d31d-3c29-a335-066ffc028763.jpg[/img]

去/usr/local/nginx_echo/sbin
ls
[img]http://dl2.iteye.com/upload/attachment/0094/4058/6c4c5164-3c41-3636-8df2-b0a65fb2649c.jpg[/img]
已经在sbin/nginx的同级目录执行了
touch a的命令

另外:
这里使用nginx的root权限,其他安全性因素没有考虑,只做学习参考
linux下 nginx启动脚本 http://blog.youkuaiyun.com/yaoxun1990/article/details/49590831 对应部署教程地址 立即下载

相关推荐

傻白入门芯片设计,wafer/die/chip/cell(一)

芯片设计的一些基本概念

qq_46675545的博客 2万+

nginx配置sh脚本远程执行一键安装

nginx配置远程一键安装脚本

LiXueFu727224204的博客 2155

使用TensorFlow搭建FNN(全连接神经网络)的基本步骤

提示:转载请注明出处,若本文无意侵犯到您的合法权益,请及时与作者联系。 目录 一、定义神经网络的输入输出 二、搭建神经网络 1、定义一个神经层中的权重 2、定义一个神经层中的阈值 3、定义一个神经层中的激活函数 4、组合神经层为神经网络 三、搭建损失函数和优化器 1、搭建损失函数 首先介绍第一个函数这其中用到的共同的函数为 2、定义优化器 四、训练神经网络 全连接神经网络的网络结构如下: 一、定义神经网络的输入输出 神经网络最擅长的工作就是模拟非线性函数,即一个复杂的高..

qq_41959920的博客 4070

nginx远程php,PHP-FPM Nginx - 远程命令执行

介是php-fpm (CVE-2019-11043)的一个漏洞利用,在某种配置下,nginx+php-fpm的框架里,这个漏洞可以由外界触发。这就意味着,一个网页用户可能对这种配置的服务器实施远程命令执行攻击。(有前提条件,看下文)###这是啥漏洞如果一个网站服务器运行着nginx+php-fpm,然后还有类似下面的配置:location ~ [^/]\.php(/|$) {...fastcgi_...

weixin_28878287的博客 492

时序约束实战:从setup/hold到时钟路径约束的深度解析

本文深度解析数字设计中的时序约束实战,重点探讨如何从setup/hold检查的核心原理出发,理解并应用时钟路径约束。文章通过剖析Path Requirement的计算逻辑,结合同频、倍频及异步时钟域等典型场景,提供了从解读时序报告到编写、调试SDC约束的系统方法,帮助工程师有效应对复杂SoC设计中的时序收敛挑战。

weixin_29291185的博客 105

【Linux 驱动开发】STM32MP1 LCD 显示系统完整实践指南

STM32MP1 LCD显示系统实践指南 本文全面介绍STM32MP1平台实现MIPI DSI LCD显示的完整流程,涵盖硬件连接、设备树配置、显示原理和驱动实现。主要内容包括: 硬件连接:详细说明MIPI DSI差分对、背光PWM、复位/供电管脚的连接方式 设备树配置: PWM背光控制节点设置 LTDC与DSI端口映射关系 Panel节点参数定义 显示基础:讲解LCD/OLED显示原理、常见接口类型(RGB/LVDS/MIPI/HDMI)及信号时序 驱动实现。

猫猫的小茶馆 495

Shell脚本以及Nginx

Shell是一个用C编写的程序,是用户使用Linux的桥梁。Shell既是一种命令语言,又是一种程序设计语言。Shell是指一种应用程序,这个应用程序提供了一个界面,用户通过这个界面访问操作系统内核的服务。总体来说Sheel是一门编程语言,客户可以通过该语言与Linux内核进行相应的交互定义变量的语法:变量名=变量值例子:变量名命名规则:命名只能使用英文字母,数字和下划线,首个字符不能以数字开头。中间不能有空格,可以使用下划线 _。不能使用标点符号。

g474928663的博客 808

芯擎SEC1000芯片参数详细介绍

随着龙鹰一号的不断进化和应用,未来的智能座舱将不仅仅是显示和控制的集成,更是人与车之间的一种默契和无缝交互的体现。在汽车行业迈向智能化和电动化的浪潮中,座舱已不仅仅是一个驾驶者的操作空间,而是逐渐演变为一个集娱乐、信息、控制于一体的智能交互平台。今天的汽车不仅需要强劲的动力和炫酷的外观,更需要一颗强大而智能的“心脏”来支撑复杂的座舱体验和安全驾驶需求。想象一下,未来的汽车不再仅仅是交通工具,它将成为你的移动私人管家,了解你的习惯,甚至提前预测你的需求。让我们一起走进龙鹰一号的世界,探索智能座舱的无限可能!

weixin_43199439的博客 1724

Nginx测试中如何实现远程执行程序

需求: 在进行Nginx测试的过程中,经常需要对远程服务器执行一些shell脚本、应用程序或系统命令。一般简单的方法是将测试代码放到所需的远程服务器上来运行,或者使用staf框架来协助远程执行。 但我个人认为,staf框架比较适合用于执行sudo权限的命令,而且他对服务器环境有一些额外的要求,比如远程服务器和本机均必须安装staf,而且执行输出结果也不是很清晰。 那有没有轻量级的远程执行方法...

100Continue's blogs 636

Open3D 三维重建-Delaunay Triangulation (德劳内三角剖分)

德劳内三角剖分(Delaunay Triangulation)是一种用于从一组点生成三角形网格的算法。它的特点是使得生成的三角形尽量接近等边三角形,即最大化最小角度,避免生成细长的三角形。

纵马踏花向自由 2502

第二节_PySide6项目创建流程介绍、手把手教学打包EXE可执行文件

本文详细介绍了如何使用PySide6创建一个带UI界面的Python程序,并将其打包成exe可执行文件。首先,通过Pycharm创建项目,并使用PySide6-Designer工具设计UI界面,将生成的ui文件转换为Python代码。接着,编写主程序,加载UI界面并实现功能,如加载图片、设置图标等。最后,通过资源文件管理图片资源,并确保UI界面的更新能同步到主程序中。整个过程涵盖了项目创建、UI设计、代码编写及资源管理,适合初学者学习如何将Python程序打包为可执行文件。

su桥木的博客 2556

Nginx调用Shell脚本全环境配置

Nginx调用Shell脚本全环境配置,相关openresty,sockproc,lua

承缘丶 3498

你分得清ChatGPT、Gemini、Grok、豆包、千问、DeepSeek、OpenClaw、CloudCode、vibeCodeing、sKill、MCP,飞书、微信这些到底是什么吗?

AI技术生态呈现层级化发展,从基础模型到应用平台形成完整技术栈。核心分为五层:模型层(GPT、Gemini等基础模型)→AI助手层(ChatGPT等应用产品)→工具层(ClaudeCode等开发工具)→协议层(MCP等接口标准)→应用层(微信、飞书等平台)。未来趋势将形成"模型公司-开发框架-应用生态"三层结构,AI正逐步演变为新型操作系统,通过标准化协议连接各类外部系统,实现能力调用与生态整合。技术发展呈现出从底层基础设施到上层应用场景的垂直整合特征。

hy行者勇哥的博客 397

在centos6.0上通过nginx远程执行shell

nginx本身不支持直接调用shell脚本,我们可以通过安装fastcgi程序,让nginx把调用shell的http请求交给fastcgi程序去处理,然后nginx 再将结果返回给用户方式间接调用shell,这里我们推荐安装fcgiwrap这个通用的 fastcgi 进程管理器来帮助nginx 处理shell程序 一、安装fcgiwrap # 安装 epel 源 y...

weixin_30518397的博客 762

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Devexpress16.2.6破解工具

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

ansible之playbook\shell\script模块远程自动安装nginx

ansible-playbook -C nginx_install.yaml相当于预编译yaml脚本,也可理解为检查剧本是否正确。执行以下命令远程在138上执行auto_install_nginx.sh脚本,自动安装配置nginx。通过shell模块, 编写安装nginx脚本,为yaml脚本,远程到135机器上安装并启动nginx。在138上即可看到安装的nginx进程,并且可在前台访问到nginx服务。通过script模块,编写shell脚本安装nginx。真正执行时删除掉-C检查即可。

weixin_43819738的博客 542

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

wget批量调用shell脚本

相较于使用playbook,个人更习惯于编写shell脚本。如果需要多台服务器执行某一任务,可以将脚本放在某个http服务目录下,比如nginx,然后通过ansible的shell模块让服务器通过wget执行远程脚本。本文以 ansible + nginx + shell脚本为例。IP服务说明nginx提供http服务ansibleansible控制节点目标主机。

fengfuyao985的博客 271

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

saltstack自动化运维---saltstack安装与配置,远程执行,配置管理

一.saltstack saltstack是一个配置管理系统,能够维护预定义状态的远程节点。 saltstack是一个分布式远程执行系统,用来在远程节点上执行命令和查询数据。 saltstack是运维人员提高工作效率、规范业务配置与操作的利器。 Salt的核心功能 (1)使命令发送到远程系统是并行的而不是串行的 (2)使用安全加密的协议 (3)使用最小最快的网络载荷 (4)提供简单的编程接口 Salt同样引入了更加细致化的领域控制系统来远程执行,使得系统成为目标不止可以通过主机名,还可以通过系统属性。 二.

lijua9794的博客 311

Mac 使用brew工具安装nginx

本人的Mac os是10.14版本的。为了能安装nginx。网上查询了各种安装都不行。一直报错。 1.chmod u+w /usr/local 没访问权限。 2.Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts.

lujiawei00的专栏 273

saltstack远程执行,配置管理,grains与pillar

1.远程执行shell命令 1. 1Salt命令由三个主要部分构成: salt ‘’ [arguments] target: 指定哪些minion, 默认的规则是使用glob匹配minion id. salt ‘*’ test.ping

weixin_46119868的博客 364

07-Ansible常用模块-shell模块

一、概述 shell 模块可以帮助我们在远程主机上执行命令。与 command 模块不同的是,shell 模块在远程主机中执行命令时,会经过远程主机上的 /bin/sh 程序处理。 先参考 command 模块的介绍 二、常用参数 free_form参数 : 必须参数,指定需要远程执行的命令,但是并没有具体的一个参数名free_form,具体解释参考 command 模块。 chdir参数 : 此参数的作用就是指定一个目录,在执行对应的命令之前,会先进入到 chdir 参数指定的目录中。 creates

qq_41417660的博客 789

31.3. Nginx

curl -s https://raw.githubusercontent.com/oscm/shell/master/cloud/aliyun/nginx.sh | bash curl -s https://raw.githubusercontent.com/oscm/shell/master/cloud/aliyun/ssi.sh | bash ...

weixin_34114823的博客 83

Jenkins+Git+shell自动化部署一之流程回顾

最近工作时总是需要用xshell连接Linux服务器手工部署php项目,很是麻烦,于是想通过代码来解决这个头痛的问题,于是开撸,撸之前先整理思路,下面我就从以下几个方面介绍下整个过程。 1.自动化部署需要工具 2.部署脚本shell需要完成的功能 3.遇到的技术问题有哪些 4.这些问题是怎么解决的 ...

1247

Niushop站点基础安全防护措施

Niushop站点基础安全防护措施 1.将所有文件的写入权限去掉 2.将runtime 和 upload 的写入权限打开 3.配置nginx和apache 禁止 runtime 和 upload 的php执行权限 4.清理runtime缓存 5.重启nginx 或 apache 注: 1.该安...

chugou1981的博客 120

SaltStack----安装部署、远程执行、grains、pillar、Jinja模板

目录一、Saltstack安装部署1.安装配置2.连接测试二、远程执行shell命令1.salt命令2.sls文件 一、Saltstack安装部署 简介: 1、saltstack是一个配置管理系统,能够维护预定义状态的远程节点,它也是一个分布式远程执行系统,用来在远程节点上执行命令和查询数据。 2、SaltStack基于Python语言实现,结合轻量级消息队列(ZeroMQ)与Python第三方模块(Pyzmq、PyCrypto、Pyjinjia2、python-msgpack和PyYAML等)构建。 3、

qq_38664479的博客 1123

NGINX高危RCE漏洞CVE-2026-42945深度解析与修复指南

缓冲区溢出是软件安全领域长期存在的经典漏洞类型,其核心原理是程序向预先分配的内存边界之外写入数据,从而破坏相邻内存区域的正常结构。在C语言等手动管理内存的语言中,若缺乏严格的边界检查,攻击者可通过精心构造的输入数据触发溢出,进而覆盖关键的函数指针或返回地址,最终实现控制流劫持与远程代码执行。这类漏洞的技术价值在于其危害性极高,常被用于渗透测试与高级持续性威胁攻击,是攻防对抗的焦点。其典型应用场景广泛存在于Web服务器、网络协议栈及系统服务等底层基础设施中。本文聚焦于一个在NGINX中潜伏18年的高危整数溢出

weixin_34187862的博客 364
上一篇: c的urldecode
下一篇: 重定向stdout到文件
linux内核控
博客等级 码龄19年 41粉丝 638原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值