
Exploit tool for CVE-2022-22947 in Spring Cloud Gateway, featuring vulnerability detection, reverse shell, and outbound connectivity testing.
Added two types of reverse shell and network egress detection based on Wang Zheng's code. If any module is missing at runtime, just use pip to download that module.
Enter the suspicious URL address. Note: Do not include '/' after the port.

By default, the command executed is whoami, because many command executions do not return output. If whoami returns successfully, the vulnerability exists.
The response contains 'root', confirming the vulnerability exists.
Enter the public IP and port.
If the reverse shell succeeds, this page will hang.
If the reverse shell fails, it will end directly.

This is prepared for function 4. By default, it accesses the Baidu homepage.
If the reverse shell fails, it may be that /dev/tcp is not supported. Under the premise of network egress, you can try to have the target machine download the Java code and then execute the command to obtain a reverse shell.

javac shell.java