0
点赞
收藏
分享

微信扫一扫

F5 Big-IP真实内网IP泄露Python3计算脚本

漏洞描述:F5 BIG-IP 是美国 F5 公司一款集成流量管理、DNS、出入站规则、web应用防火墙、web网关、负载均衡等功能的应用交付平台。F5 Big-IP可以解码cookie,获取内网真实IP。

F5 Big-IP真实内网IP泄露Python3计算脚本_F5

IP计算原理:

首先,把第一小节的十进制数取出来,也即,86895882

第二,将其转为十六进制数5 2D ED 0A

第三,从后至前,以此取四位数出来,也即,0A;ED;2D;5

第四,依次把他们转为十进制数:10;237;45;5

第五,得到真实内网IP:10.237.45.5

处置建议:关注官方新版本的发布及更新,建议使用WAF进行防护。

Python3代码如下:

# example string: 110536896.20480.0000,预期结果:192.168.150.6

import struct
import sys
#if len(sys.argv) != 2:
# print("Usage: %s encoded_string" % sys.argv[0])
# exit(1)

#encoded_string = sys.argv[1]
encoded_string = "110536896.20480.0000"
print("\n[*] String to decode: %s\n" % encoded_string)
(host, port, end) = encoded_string.split('.')
(a, b, c, d) = [i for i in struct.pack("I", int(host))]
(e) = [e for e in struct.pack("H", int(port))]
port = "0x%02X%02X" % (e[0],e[1])
print("[*] Decoded Host and Port: %s.%s.%s.%s:%s\n" % (a,b,c,d, int(port,16)))

参考链接:

透过F5获取服务器真实内网IP技巧 - SecPulse.COM​ | 安全脉搏
https://www.secpulse.com/archives/58730.html

Python中struct.pack()和struct.unpack()用法详细说明_工程师WWW的博客-CSDN博客_struct.unpack
​​​https://blog.csdn.net/weiwangchao_/article/details/80395941​​

举报

相关推荐

0 条评论