Skip to content

Conversation

@lokiuox
Copy link
Collaborator

@lokiuox lokiuox commented Feb 7, 2025

New PR here: #650


Hello!

This PR implements better detection logic for the Spring4Shell (CVE-2022-22965) vulnerability.

Also added a testbed here: google/security-testbeds#121

Details

Previously, the detector checked the response of two HTTP requests to determine whether a target was vulnerable, but this lead to false positives.

The new implementation still uses the old logic as a preliminary check to find potentially vulnerable pages, on which the full exploit is then attempted. The exploit consists of changing the log configuration in order to drop a .jsp file in Tomcat's ROOT webapp directory.

The dropped .jsp has a randomized name and simply prints out a string generated using Tsunami's PayloadGenerator. There is also some extra code which make the script self-delete when visited with the delete=1 URL parameter.

After dropping the .jsp file, the log configuration is also set to point to /dev/null, in order to prevent more files to be accidentally created and left on the server.~

shpei1963 and others added 30 commits March 6, 2023 21:38
…the http client doesn't redirect in response of this status code
Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonDetector.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonDetector.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonVuLnDetectorTest.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonVuLnDetectorTest.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonVuLnDetectorTest.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonVuLnDetectorTest.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonVuLnDetectorTest.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonDetector.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
…oogle/tsunami/plugins/detectors/rce/SlurmExposedRestApiDaemonDetector.java

Co-authored-by: Savio Sisco <25590129+lokiuox@users.noreply.github.com>
tooryx added 16 commits May 22, 2025 23:49
…evance of its finding is not good enough for Tsunami.

PiperOrigin-RevId: 762287081
Change-Id: Id1dfaca8ee52afbe750e6e74a3954fdb8162fb05
PiperOrigin-RevId: 764198246
Change-Id: I8dd8cecce848cc7b256f8b685dba80e1ef6080b2
PiperOrigin-RevId: 764208993
Change-Id: Iea1dd3ac363ee5f0dfca743cc6403b84773ab62b
…d plugins.

PiperOrigin-RevId: 764211323
Change-Id: Ie7c45a285bf3556d635033c4d64489bb705d2bea
PiperOrigin-RevId: 764215926
Change-Id: Iffb919c72488ccd6bdcda4cff328cd6cbd7e3f14
…ling.

PiperOrigin-RevId: 766839031
Change-Id: Iba65a6037658f00099341418737f1da0324d88e4
PiperOrigin-RevId: 767010226
Change-Id: I8e9eb69e3df58fdbbfe40f8ecce3099a0d272a56
…nitions.

PiperOrigin-RevId: 767019654
Change-Id: Ife9811fb840132df44d6de8d3bd848d33a0e94aa
PiperOrigin-RevId: 767472307
Change-Id: I844355674f7039334bf29e07d93344ee01edd5d8
PiperOrigin-RevId: 767473096
Change-Id: Ia64973a17b919385c4e58b921e0a2a1d4af80454
… `getAdvisories()`.

PiperOrigin-RevId: 770967379
Change-Id: Ic274d60f5975e7bec3add0a97e9e4b134b3dde19
PiperOrigin-RevId: 770967498
Change-Id: If609ea74a35ffc724f803d94abf88dc9a8619429
PiperOrigin-RevId: 770967533
Change-Id: I08035c65d6cdc04a14f42406312cae7036a71eab
PiperOrigin-RevId: 770967567
Change-Id: Ie7a7e804be28069b8469efc26b5eca424a11debb
…on when dealing with protos.

PiperOrigin-RevId: 772042564
Change-Id: Ic57a2aa7171c1c7c6445af10da50ec8d71895616
PiperOrigin-RevId: 772043059
Change-Id: I7d80845c337a565558784aac2d18ec0795c9d738
@maoning
Copy link
Collaborator

maoning commented Jun 17, 2025

@lokiuox Could you rebase the branch to resolve the conflicts?

@lokiuox
Copy link
Collaborator Author

lokiuox commented Jun 23, 2025

This PR is being closed due to conflicts with the main branch. New PR here: #650

@lokiuox lokiuox closed this Jun 23, 2025
@savio-doyensec savio-doyensec deleted the spring4shell_detection branch June 23, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.