您的位置:首页 > 其它

BigIP Cookie 解码获取真实IP

2020-03-31 07:19 781 查看

BIGip是对负载均衡的实现,主要通过Virtual Server、iRules、Pool、Node、Monitor和Persistent(会话保持)实现。BIGip在实现会话保持机制时会在用户首次发起请求时,会为用户设置一个cookie,即服务端会添加set-cookie响应头头(比如:Set-Cookie: BIGipServerFinanceAndAdminWebfo.unc.edu=105389996.20480.0000 )。后续的请求会判断并使用这个cookie值,服务端解码该cookie并使用服务器。

最近发现一款工具,可以解BigIP的cookie,以此获取内网ip或者真实ip地址。这款工具名叫rabid,是ruby语言编写,支持4种cookie格式。github地址:https://github.com/Orange-Cyberdefense/rabid

工具使用

工具使用ruby编写,需要ruby 2.4以上版本的环境。首先要保证安装好ruby。然后使用gem安装包

gem install rabid

安装完成后,可以使用ruby包含该库,也可以直接运行命令执行。

命令示例如下:

rabid 'BIGipServer~FinanceAndAdminWeb~fo.unc.edu=105389996.20480.0000'

上面的参数就是set-cookie的值。

运行结果(运行环境macos,ruby 2.6.3):
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-3f5wHXyX-1584787145279)

在自己的代码中使用该库,代码示例如下:

require 'bigipcookie'

# IPv4 pool members, with pool name
bip = BigIPCookie::Decode.new('BIGipServer<pool_name>=1677787402.36895.0000')
# Automatically decode
bip.auto_decode
# Print result
puts "Cookie: #{bip.decoded_cookie}"

另外也可以使用git安装。

git clone https://github.com/Orange-Cyberdefense/rabid.git rabid
cd rabid
gem install bundler
bundler install
gem build bigipcookie.gemspec
gem install rabid-x.x.x.gem

具体帮助文档可见:https://orange-cyberdefense.github.io/rabid/

测试

使用fofa可搜索到上万个例子,搜索语法:

header="BIGipServer"
。链接地址:https://fofa.so/result?qbase64=aGVhZGVyPSJCSUdpcFNlcnZlciI%3D

原文地址:https://bacde.me/post/bigip-cookie-decode-get-real-ip/

  • 点赞
  • 收藏
  • 分享
  • 文章举报
insightglacier 发布了11 篇原创文章 · 获赞 0 · 访问量 389 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: