Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New gadgets (Struts2JasperReports - Atomikos - SpringJta) #123

Merged
merged 9 commits into from
Apr 27, 2022

Conversation

sciccone
Copy link

@sciccone sciccone commented Jul 1, 2019

Hi,

first big kudos for your outstanding research/work, I have used it in innumerable contexts and it was amazing.

I would like to add some gadget chains I have coded to the tool, if you agree:

  • Struts2JasperReports. It's a gadget chain in the jasperreports plugin of struts2, which use a combination of Java deserialisation and OGNL evaluation. I have discovered it and coded the payload.

  • Atomikos. It's a gadget chain ending with a JNDI lookup, already mentioned in some published research for JSON attacks (kudos to @pwntester). I tuned it a bit and coded the payload.

  • SpringJta. It's a deserialised JNDI lookup, based on the work of @zerothoughts. I just coded the payload.

@sciccone sciccone closed this Jul 2, 2019
@sciccone sciccone deleted the new-gadgets branch July 2, 2019 14:28
@sciccone sciccone restored the new-gadgets branch July 10, 2019 09:07
@sciccone sciccone reopened this Jul 10, 2019
@sciccone sciccone changed the title New gadgets New gadgets (Struts2JasperReports - Atomikos - SpringJta) Jul 17, 2019
}

@Override
public Object call () throws Exception {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this context setup needs to be in a custom Deserializer class as opposed to just being in beginning of the payload getObject() implementation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to put it within the getObject implementation, and if I run the main in the payload class works. But, when I run the complete tests, it seems the deserialisation appears in a different thread where the ActionContext has not been initialised. So, I created a custom Deserializer for doing that.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @frohoff, do you have updates on merging this branch? Are there any problems?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problems, just been super busy. Still hope to review more and merge. Thanks.

@frohoff frohoff changed the base branch from master to newgadgets April 27, 2022 05:04
@frohoff frohoff merged commit 02e2500 into frohoff:newgadgets Apr 27, 2022
frohoff added a commit that referenced this pull request Apr 27, 2022
* CommonsCollections8 payload (#116)

* New gadgets (Struts2JasperReports - Atomikos - SpringJta) (#123)

* added Atomikos gadget payload

* added Atomikos gadget payload

* naming

* added spring-jta gadget

* added strutsJasperReports gadget + tests

* updated deps list on springJta

* fixed authors

* renaming

* Add new payload in Commons Collections 3.2.1 (#125)

* Add Jython2 gadget (#135)

This version of Jython2 executes a command through os.system(). Based on Jython1 from @pwntester & @cschneider4711

Co-authored-by: Chris Frohoff <chris@frohoff.org>

* Add scala and clojure payloads from a couple of years ago (#137)

* Add some payloads for Scala

* Add new clojure payload effecting versions since 1.8.0

* Fix infinite loop behavior of clojure2 payload.

* add CommonsBeanutils2 (#163)

* ceylon gadget (#173)

Co-authored-by: navalorenzo <34750199+navalorenzo@users.noreply.github.com>
Co-authored-by: Stefano Ciccone <sciccone@gdssecurity.com>
Co-authored-by: 梅子酒 <960596293@qq.com>
Co-authored-by: Yorick Koster <ykoster@users.noreply.github.com>
Co-authored-by: Ian Haken <ihaken@netflix.com>
Co-authored-by: k4n5ha0 <9199771@qq.com>
Co-authored-by: supersache <42678777+supersache@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants