Last updated at 结婚, 27 Dec 2023 15:07:52 GMT
在跟进我们的 previous work on F5's BIG-IP devices, Rapid7 found an additional vulnerability in the appliance-mode REST interface; the vulnerability was assigned CVE-2023-22374. 我们于2022年12月6日向F5报告,现按照我们的要求进行披露 vulnerability disclosure policy.
我们发现的具体问题是一个身份验证格式字符串漏洞(cwe - 134) in the SOAP interface (iControlPortal.cgi
),它以root身份运行,需要管理员登录才能访问. By inserting format string 说明符s (such as %s
or %n
) into certain GET parameters, 攻击者可以使服务读取和写入从堆栈引用的内存地址. In addition to being an authenticated administrative endpoint, 将公开的内存写入日志(使其成为盲目攻击). 很难影响读和写的具体地址, 这使得这个漏洞在实践中很难被利用(除了使服务崩溃之外). This has a CVSS score of 7.5 for st和ard mode deployments 和 8.5在器具模式.
产品
这个问题只影响BIG-IP(不影响BIG-IQ),到目前为止还没有修复. The currently supported versions known to be vulnerable are:
- F5大ip 17.0.0
- F5大ip 16.1.2.2 - 16.1.3
- F5大ip 15.1.5.1 - 15.1.8
- F5大ip 14.1.4.6 - 14.1.5
- F5大ip 13.1.5
发现者
This issue was discovered by 罗恩Bowes 的Rapid7. 根据Rapid7的漏洞披露政策进行披露.
剥削
The issue we are disclosing is a blind format string vulnerability,通过身份验证的攻击者可以在其中插入任意格式的字符串字符(例如 %d
, %x
, %s
, %n
) into a query parameter, which are passed into the function syslog ()
, which processes format-string 说明符s. 这并不要求攻击者实际读取syslog条目—解析格式字符串的行为才是有问题的. That also means that the attacker can't 读 内存,除非他们有额外的方法来读取syslog. 通过使用 %s
说明符, 该服务可能会因为分段错误而崩溃(因为它试图将堆栈上的指针作为字符串解引用)。. 使用 %n
, 可以将任意数据写入堆栈上找到的任何指针,这取决于堆栈上存在的内容, this may be exploitable for remote code execution.
这个问题发生在 WSDL =
parameter in the following authenticated administrative URL:
的值 WSDL =
parameter is written to the syslog:
11月29日08:32:25.例子.org soap[4335]: 查询: WSDL = ASM.LoggingProfile
If an attacker adds format-string characters to that argument, 它们将被处理,堆栈中的值可以写入syslog(攻击者无法看到这一点), so it's actually a blind format-string vulnerability). 例如,这个URL:
http://bigip.example.com/iControl/iControlPortal.cgi?WSDL= ASM.LoggingProfile:%08x:%08x:%08x:%08x:%08x:%08x:%08x:%08x
Might write the following, after expanding the %08x
格式化说明符到堆栈中的值(冒号只是为了可读性):
11月29日08:41:47.例子.org soap[4335]: 查询: WSDL = ASM.LoggingProfile: 0000004 c: 0000004 c: 08年cb31bc: 08年cba210:08cc4954:01000000: ffeaa378: f5aa8000
再一次, we should note that an attacker cannot see this log, therefore cannot use this to disclose memory. 但是,我们可以用a %s
格式说明符,告诉服务尝试从堆栈中呈现字符串. 如果堆栈上的值不是有效的内存地址(例如第一个值,它是 0x0000004c
), the process will crash with a segmentation fault. 我们也可以用the %n
格式说明符将(大多数情况下)任意值写入堆栈上的内存地址.
Here is an 例子 of using the %s
请求中的说明符:
http://bigip.example.com/iControl/iControlPortal.cgi?WSDL= ASM.LoggingProfile: % s
如果我们将其发送到服务器(作为经过身份验证的请求),服务将崩溃. We can attach a debugger to the server process to validate:
[root@bigip:Active:St和alone] config # /tmp/gdb-7.10.1-x64 -q—pid=4335[qh]...) (gdb) contContinuing.
Program received signal SIGSEGV, Segmentation fault.0xf55e3085 in vfprintf () from /lib/libc.so.6(gdb) bt#0 0xf55e3085 in vfprintf () from /lib/libc.so.6#1 0xf568f21f in __vsyslog_chk () from /lib/libc.so.6#2 0xf568f317 in syslog () from /lib/libc.so.6#3 0x0810cc1f在PortalDispatch::H和leWSDLRequest(char*) ()#4 0x08109f08在iControlPortal::run(int) ()#5 0x0810947f in main ()
The actual vulnerable code in PortalDispatch::H和leWSDLRequest
in iControlPortal.cgi
是(在反汇编器中):
.text:0810CBF2 loc_810CBF2: ; CODE XREF: PortalDispatch::H和leWSDLRequest(char *)+DD↑j.text:0810CBF2 pop ecx.text:0810CBF3 pop edi.text:0810CBF4 push esi ; Query string.text:0810CBF5 push eax.text:0810CBF6 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc ; std::operator<<>(std::basic_ostream> &, const char *).text:0810CBFB pop eax.text:0810CBFC pop edx.text:0810CBFD lea eax, [ebp+var_8C8].text:0810CC03 lea edi, [ebp+format].text:0810CC09 push eax.text:0810CC0A push edi.text:0810CC0B call __ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv ; std::basic_stringbuf,std::allocator>::str(void)
.text:0810CC0B ; } // starts at 810CBE6.text:0810CC10 pop eax.text:0810CC11 push dword ptr [ebp+format].text:0810CC17 push 6.text:0810CC19 ; try {.text:0810CC19 call _syslog ; <--- Vulnerable call to syslog ().text:0810CC19 ; } // starts at 810CC19
A 字符串
对象(包含 查询:
)将查询字符串附加到其上,然后直接传递给 _syslog ()
, which processes format string characters.
影响
成功的攻击最可能造成的影响是使服务器进程崩溃. 熟练的攻击者可能会开发远程代码执行漏洞, which would run code on the F5 BIG-IP device as the root user.
修复
目前在已发布的BIG-IP软件版本中没有修复此问题. F5已经表示将会提供一个工程修复程序. 应该强调的是,这个问题只能作为易受攻击设备的认证用户来利用. So, 最终用户应该将对管理端口的访问限制为仅受信任的个人(链接的KB提供了一个要绑定的过程) webd
to localhost) which is usually good advice anyway.
Rapid7客户
针对CVE-2023-22374的身份验证漏洞检查将于今天(2月1日)发布仅限内容的版本. 因为F5是 热修复补丁政策 这些修补程序是“不保证可用性”的吗,请注意,InsightVM中的漏洞检查不会考虑热修复程序.
时间轴
- December, 2022 - Discovered the vulnerability
- Tue, Dec 6, 2022 - Reported to F5 SIRT
- 2022年12月7日星期三- F5转发给F5产品工程团队进行分析
- 2022年12月22日,星期四——F5确认了这个问题,并开始着手修复
- 2023年1月4日星期三-向CERT/CC报告的问题(vrf# 23-01-TVJZN)
- 结婚, 1月18日, 2023 - F5 provided a draft security advisory, CVSS分数, CVE-2023-22374 reservation
- 结婚, Feb 1, 2023 - This public disclosure 和 F5的咨询 发表