• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Lua
  • License
    GNU General Publi...
  • Created over 2 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Spring Framework RCE (CVE-2022-22965) Nmap (NSE) Checker (Non-Intrusive)

CVE-2022-22965

Spring Framework RCE (CVE-2022-22965) Nmap (NSE) Checker (Non-Intrusive)

This script looks the existence of CVE-2022-22965 Spring Framework 5.2.x / 5.3.x RCE uses a payload "/?class.module.classLoader.definedPackages%5B0%5D=0" through a GET request looking (400) code as response (NON INTRUSIVE)

Inspired by:

@Twitter thread
https://twitter.com/RandoriAttack/status/1509298490106593283

@ZAP Scan Rule
https://www.zaproxy.org/blog/2022-04-04-spring4shell-detection-with-zap/

Manual inspection:

# curl -i -s -k -X $'GET' 
-H $'Host: <target>' 
-H $'User-Agent: alex666'  
-H $'Connection: close' 
$'https://<target>/path/foo/?class.module.classLoader.URLs%5B0%5D=0' | grep -i 400
# curl -i -s -k -X $'GET' 
-H $'Host: <target>' 
-H $'User-Agent: alex666'  
-H $'Connection: close' 
$'https://<target>/path/foo/?class.module.classLoader.DefaultAssertionStatus=nosense' | grep -i 400

@milo-minderbinder | fix and improvements

# curl -i -s -k -X $'GET' 
-H $'Host: <target>' 
-H $'User-Agent: alex666'  
-H $'Connection: close' 
$'https://<target>/path/foo/?class.module.classLoader.definedPackages%5B0%5D=0' | grep -i 400

References:

https://github.com/alt3kx/CVE-2022-22965
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22965
https://www.lunasec.io/docs/blog/spring-rce-vulnerabilities
https://github.com/BobTheShoplifter/Spring4Shell-POC
https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement
https://www.rapid7.com/blog/post/2022/03/30/spring4shell-zero-day-vulnerability-in-spring-framework

Usage

-- $ nmap -p <port> --script=./CVE-2022-22965.nse [--script-args 'CVE-2022-22965.path=<PATH>,CVE-2022-22965.method=<HTTP METHOD>'] <target>
-- @args CVE-2022-22965.path URI path to test; must be a valid path that accepts one or more parameters using data binding (default: <code>/</code>).
-- @args CVE-2022-22965.method HTTP request method to use (default: <code>GET</code>).
-- 
-- @examples:
-- $ nmap -p443,8080 --script=./CVE-2022-22965.nse <target> -Pn
-- $ nmap -p443,8080 --script=./CVE-2022-22965.nse <target> --script-args 'CVE-2022-22965.path="/path/to/test"' -Pn
-- $ nmap -p443,8080 --script=./CVE-2022-22965.nse <target> --script-args 'CVE-2022-22965.path="/path/to/test",CVE-2022-22965.method=POST' -Pn
-- $ nmap -p443,8080 --script=./CVE-2022-22965.nse <target> --script-args=CVE-2022-22965.path="/path/foo/download/" -Pn --script-trace | more
-- $ nmap -p443,8080 --script=./CVE-2022-22965.nse --script-args=CVE-2022-22965.path="/examples/" -Pn -iL targets.txt
-- 

Output

-- PORT    STATE SERVICE
-- 443/tcp open  https
-- | CVE-2022-22965: 
-- |   VULNERABLE:
-- |   Spring Framework 5.2.x 5.3.x RCE
-- |     State: VULNERABLE (Exploitable)
-- |     IDs:  CVE:CVE-2022-22965
-- |       Within Spring Core, A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable 
-- |       to remote code execution (RCE) via data binding.
-- |     Disclosure date: 2022-03-31
-- |     References:
-- |_      https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-22965

Payload 1: Spring Framework RCE found!

Payload 2: Spring Framework RCE found!

Payload 3: Spring Framework RCE found!

Author

Alex Hernandez aka (@_alt3kx_)

More Repositories

1

CVE-2023-24055_PoC

CVE-2023-24055 PoC (KeePass 2.5x)
247
star
2

CVE-2021-21985_PoC

Lua
210
star
3

wafaray

Enhance your malware detection with WAF + YARA (WAFARAY)
Shell
97
star
4

CVE-2022-1388_PoC

F5 BIG-IP RCE exploitation (CVE-2022-1388)
87
star
5

CVE-2021-21972

Lua
55
star
6

CVE-2021-26084_PoC

54
star
7

CVE-2021-26855_PoC

Python
53
star
8

wafparan01d3

Quick WAF "paranoid" Doctor Evaluation | WAFPARAN01D3 Tool
Python
23
star
9

CVE-2022-22965_PoC

Spring Framework RCE (Quick pentest notes)
16
star
10

alt3kx.github.io

HTML
11
star
11

CVE-2018-12463

XML external entity (XXE) vulnerability in /ssc/fm-ws/services in Fortify Software Security Center (SSC) 17.10, 17.20 & 18.10 (0day CVE-2018-12463)
6
star
12

airdecloak-ng

My Aircrack-ng contribution with Thomas d'Otreppe
C
4
star
13

CVE-2019-10685

A Reflected Cross Site Scripting (XSS) Vulnerability was discovered in Print Archive System v2015 release 2.6
3
star
14

papers

A handy collection of my public papers, all in one place.
2
star
15

CVE-2018-7691

The SSC REST API contains Insecure Direct Object Reference (IDOR) vulnerabilities in Fortify Software Security Center (SSC) 17.10, 17.20 & 18.10
2
star
16

CVE-2018-7690

The SSC REST API contains Insecure Direct Object Reference (IDOR) vulnerabilities in Fortify Software Security Center (SSC) 17.10, 17.20 & 18.10
2
star
17

CVE-2018-10715

CVE-2018-10715
1
star
18

CVE-2007-6638

March Networks DVR 3204 - Logfile Information Disclosure
1
star
19

CVE-2001-0932

Cooolsoft PowerFTP Server 2.0 3/2.10 - Multiple Denial of Service Vulnerabilities
1
star
20

CVE-2020-13457

CVE-2020-13457
1
star
21

CVE-2009-4118

Cisco VPN Client - Integer Overflow Denial of Service
1
star
22

CVE-2018-10467

CVE-2018-10467
1
star
23

CVE-2002-0448

Xerver 2.10 - Multiple Request Denial of Service Vulnerabilities
1
star
24

CVE-2004-2549

Nortel Wireless LAN Access Point 2200 Series - Denial of Service
1
star
25

CVE-2018-12596

Ektron Content Management System (CMS) 9.20 SP2, remote re-enabling users (CVE-2018–12596)
1
star
26

CVE-2001-0933

Cooolsoft PowerFTP Server 2.03 allows remote attackers to list the contents of arbitrary drives via a ls (LIST) command that includes the drive letter as an argument, e.g. "ls C:".
1
star
27

CVE-2001-0934

Cooolsoft PowerFTP Server 2.03 allows remote attackers to obtain the physical path of the server root via the pwd command, which lists the full pathname.
1
star
28

CVE-2007-5036

Airsensor M520 - HTTPd Unauthenticated Remote Denial of Service / Buffer Overflow (PoC)
1
star
29

CVE-2002-0200

Cyberstop Web Server for Windows 0.1 allows remote attackers to cause a denial of service via an HTTP request for an MS-DOS device name.
1
star
30

CVE-2001-1442

ISC INN 2.x - Command-Line Buffer Overflow
C
1
star
31

CVE-2018-12598

CVE-2018-12598
1
star
32

CVE-2002-0289

Phusion WebServer 1.0 - 'URL' Remote Buffer Overflow
1
star
33

CVE-2018-12597

CVE-2018-12597
1
star
34

CVE-2018-10732

Dataiku REST-API by default the software, allows anonymous access to functionality that allows an attacker to know valid users.
1
star
35

CVE-2002-0201

Cyberstop Web Server for Windows 0.1 allows remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via a long HTTP GET request, possibly triggering a buffer overflow.
Perl
1
star
36

CTF_writeups

CTF writeups
1
star