原创
https 解密
概述
在庞大的网络环境中,需要通过抓包来排查网络问题,然则有时候 https 的包是 tls 加密,无法看到真实它在做什么, 需要对其举行解密。
工具
- tcpdump
- wireshark
- https 请求工具
- 浏览器
- curl
设置解密变量
export SSLKEYLOGFILE=~/Downloads/ssl.key
测试
发送 https 请求
curl https://baidu.com
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>bfe/1.0.8.18</center>
</body>
</html>
查看 ssl.key 是否有交流 key
cat ~/Downloads/sslkey.log
CLIENT_RANDOM E358B7ECDEDA7FEC4684942DC6395CFFB34B72918CAFACD69AA06713BB25240D F3934E92E3B1562B13CBA7C8613E7DDCE23A46F68B2B489604C99B65628833738230970A6A2940AA55F600AA06E4874E
有交流 key 说明乐成,若是没有交流的 key 信息,那就说明使用的 https 的应用程序(客户端)不支持捕捉 SSLKEYLOGFILE
环境变量输出交流的 key 信息,建议换客户端或查询资料排查。
最先抓包
- 查询域名的 IP 地址,通过 dns 剖析域名的 IP: 220.181.38.148
$ ping baidu.com -t 1
PING baidu.com (220.181.38.148): 56 data bytes
64 bytes from 220.181.38.148: icmp_seq=0 ttl=49 time=6.459 ms
--- baidu.com ping statistics ---
2 packets tran *** itted, 1 packets received, 50.0% packet loss
round-trip min/avg/max/stddev = 6.459/6.459/6.459/0.000 ms
在其他终端执行
sudo tcpdump -i any host 220.181.38.148 -w https_baidu.cap -vv
Password:
tcpdump: data link type PKTAP
tcpdump: listening on any, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes
54 packets captured
1027 packets received by filter
0 packets dropped by kernel
发送两次请求
,,www.huangguan.us是一个提供皇冠代理APP下载、皇冠会员APP下载、皇冠体育最新登录线路、新2皇冠网址的的体育平台。新皇冠体育官网是多年来值得广大客户信赖的平台,我们期待您的到来!
export SSLKEYLOGFILE=~/Downloads/ssl.key
$ curl https://baidu.com
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>bfe/1.0.8.18</center>
</body>
</html>
$ curl https://baidu.com
<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>bfe/1.0.8.18</center>
</body>
</html>
使用 wireshark 剖析抓的包
- wireshark 打开抓的包
发现大量的 tls 协议包, 无法知道做了什么请求
- 使用 wireshark 打开 sslkey.log
wireshark --> 首选项 > protocol > ssl
©著作权归作者所有:来自51CTO博客作者zhaogaolong8的原创作品,如需转载,请注明出处,否则将追究法律责任
抓包 https
tools
0
珍藏
上一篇:我的友情链接
网友评论
11条评论UG环球APP下载
回复欧博网址开户www.sunbet.us欢迎进入欧博网址(Allbet Gaming),欧博网址开放会员注册、代理开户、电脑客户端下载、苹果安卓下载等业务。更新蛮勤,适合消遣
皇冠足球网址(www.22223388.com)
回复@UG环球APP下载
很容易懂Allbet手机版下载
回复Us apple developer accounts for saleAppledeveloper.io is a reputed website selling apple developer account, providing us, China and worldwide developer individual accounts for sale. It's at low price and good quality. Always provides satisfying services!我要看超甜的!!
卡利注册
回复欢迎进入欧博官网手机(Allbet Game):www.aLLbetgame.us,欧博官网是欧博集团的官方网站。欧博官网开放Allbet注册、Allbe代理、Allbet电脑客户端、Allbet手机版下载等业务。揪心,继续啊
欧博会员开户
回复USDT钱包菜包钱包(caibao.it)是使用TRC-20协议的Usdt第三方支付平台。免费提供Usdt钱包支付接口、Usdt自动充值接口、Usdt无需实名寄售回收。菜包Usdt钱包一键生成Usdt钱包、一键调用API接口、一键无实名出售Usdt。懒人宅家看文,安逸~
皇冠官网手机版
回复allbetgame.uswww.allbetgame.us欢迎进入欧博平台网站(www.allbetgaming.net),www.allbetgaming.net开放欧博平台网址、欧博注册、欧博APP下载、欧博客户端下载、欧博游戏等业务。这情节我都想不到
皇冠官网平台
回复@皇冠官网手机版 这个不差的
皇冠正网平台出租(rent.22223388.com)
回复@皇冠官网平台
USDT充提教程
回复这个文好玩
以太坊彩票网
回复泉源:新华网挺好看的,比较喜欢
皇冠官网手机版
回复住手当天收盘,道琼斯工业平均指数下跌107.39点,收于34888.79点,跌幅为0.31%;尺度普尔500种股票指数下跌15.42点,收于4369.21点,跌幅为0.35%;纳斯达克综合指数下跌55.59点,收于14677.65点,跌幅为0.38%。佩服大家!