• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer
  • Google Dorks
  • Shodan Queries
  • Malware Sources
  • Privacy Policy

PenTestIT

Your source for all things Information Security!

You are here: Home / Penetration Testing / S2-052: Apache Struts2 REST Plugin Payloads (CVE-2017-9805)

S2-052: Apache Struts2 REST Plugin Payloads (CVE-2017-9805)

Posted: 6 years ago by @pentestit 13964 views

There is a saying making rounds now that “Apache Struts is like the WebGoat of all frameworks” and the current exploit which is being tracked under CVE-2017-9805 and the Apache Struts bulletin – S2-052 prooves just that. If you remember, I had covered another vulnerability a couple of months ago – which is tracked under S2-048 & CVE-2017-9791.

CVE-2017-9805

What is the Apache Struts2 CVE-2017-9805 vulnerability about?

The original advisory here mentions the vulnerability briefly. However, the Apache Foundation description was enough for people to create a PoC even before the discoverer could make these details public. Interestingly, the original advisory has been updated to mention this – “Updated on 6 September: added a warning regarding multiple working exploits having been published by third parties.” The vendor advisory states this – “The REST Plugin is using a XStreamHandler with an instance of XStream for deserialization without any type filtering and this can lead to Remote Code Execution when de-serializing XML payloads.”

I will not go into the details about how do you exploit this vulnerability, as I tweeted about the PoC availability yesterday itself:

CVE-2017-9805, https://t.co/doP89huIGN (S2-052) POC – https://t.co/ZwTMWmTY1A

— Pentestit 🇮🇳 (@pentestit) September 5, 2017

The PoC there works good and kudos to the author! This post tries to list down a few more payloads that I could think will be interesting to use. Without further ado, we begin with the different payloads:

CVE-2017-9805 payload for a reverse connection via MSTSC (Terminal Server Connection):

CVE-2017-9805-Windows-Connect-Back

This has a high success rate on Windows systems which can “connect back” to you.

CVE-2017-9805 payload for file download no execution (figure that part out):
CVE-2017-9805-Windows-Download
Should work on almost all Microsoft Windows systems as long as Tomcat has the right privileges set.
CVE-2017-9805 payload for file download on a Linux machine:
CVE-2017-9805-Linux
This should also work on a good amount of systems that has cURL.

Fix CVE-2017-9805:

As the Apache Foundation suggests, the first option is to upgrade to Struts 2.5.13 or Struts 2.3.34. Secondly, you can upgrade the plugin by uploading  all the required plugin JARs and it’s dependencies.

Share this post on:
witteracebookhatsAppufferLinkedin It

Filed Under: Penetration Testing, Vulnerability Assessment, Web Application Security Tagged With: Apache Struts2, CVE-2017-9791, CVE-2017-9805, Proof Of Concept, S2-048, S2-052

Related

Apache JMeter RMI Code Execution PoC (CVE-2018-1297)
April 6, 2018
Tags: Apache JMeter, CVE-2018-1297, Nmap, Proof Of Concept, ysoserial
Categories: Penetration Testing, Vulnerability Assessment, Web Application Security
Apache Struts2 OGNL
Apache Struts2 Showcase Remote Code Execution! (S2-048)
July 8, 2017
Tags: Apache Struts2, CVE-2017-9791, Proof Of Concept, S2-048
Categories: Penetration Testing, Web Application Security
UPDATE: Merlin v0.9.0
September 15, 2020
Tags: docker, Merlin, Mimikatz, post-exploitation, PowerShell, python
Categories: Offensive Security, Open Source, Penetration Testing, Tool Updates, Tools

Primary Sidebar

Search

  • Email
  • Facebook
  • GitHub
  • Twitter

More to See

UPDATE: Merlin v0.9.0

September 15, 2020 By Black

UPDATE: Kali Linux 2020.3 Release

August 27, 2020 By Black

Popular Posts

  • UPDATE: Empire 3.0.1 23 views
  • List of Adversary Emulation Tools 22 views
  • UPDATE: Covenant v0.5 21 views
  • UPDATE: Kali Linux 2020.1 Release 18 views
  • List of Open Source C2 Post-Exploitation Frameworks 18 views
  • UPDATE: Empire 3.2.3 14 views
  • UPDATE: Infection Monkey 1.7.0 12 views
  • UPDATE: FudgeC2 0.5.4 10 views
  • UPDATE: Prowler 2.0 Beta 9 views
  • List of Operating Systems for OSINT (Open-Source Intelligence) 9 views

Secondary Sidebar

Categories

  • Docker Security
  • Fuzzing
  • Malware Analysis
  • Offensive Security
  • Open Source
  • OSINT
  • Penetration Testing
  • Reverse Engineering
  • Site News
  • Tool Updates
  • Tools
  • Vulnerability Assessment
  • Web Application Security
  • Wireless

Archives

  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017

Footer

Featured Post

UPDATE: Sysdig Falco v0.15.0

May 17, 2019 By Black

Three days ago, an updated version – Sysdig Falco v0.15.0 – was released. It has been some time since I last blogged about this open source behavorial activity monitor which has container support.  This release incorporates a lot of rule updates that are now also tagged the for MITRE ATT&CK Framework and patches CVE-2019-8339, a medium severity vulnerability.Read more about UPDATE: Sysdig Falco v0.15.0

Recent

  • UPDATE: Empire v3.4.0
  • UPDATE: Merlin v0.9.0
  • UPDATE: Kali Linux 2020.3 Release
  • UPDATE: FudgeC2 0.5.7
  • UPDATE: PoshC2 v6.0

Tags

Adversary Emulation (18) Anchore (9) APT2 (15) Brute Force (15) CALDERA (9) Cross-Site Scripting (8) cuc (11) docker (34) docker scan (10) dockerscan (12) Empire (11) Empire Project (10) Infection Monkey (7) Invoke-Phant0m (8) Kali Linux (25) malware analysis (9) man-in-the-middle (8) Metasploit (32) Microsoft Windows (38) Mimikatz (28) MITRE ATT&CK™ (20) Nmap (34) open source (109) OSINT (14) OSRFramework (17) OWASP (13) OWASP Dependency-Check (14) penetration testing (26) penetration testing toolkit (25) post-exploitation (27) PowerShell (42) python (73) Raspberry Pi (10) RedSnarf (13) Responder (14) Shodan (7) Short Post (10) software composition analysis (13) SQL injection (10) Sysdig Falco (9) vulnerability assessment (21) Web Application Security (20) WiFi (12) Wireshark (11) WordPress (9)

Copyright © 2023 - PenTestIT | Information shared to be used for LEGAL purposes only!