在1.7版的burp,已经默认支持2048CA证书,无需自己配置生成新的根证书。
但是在IOS新版本中,通过 http://burp 将CA证书导入到IOS系统后,需要执行一个操作,才可以让新导入的证书生效,并且让burp能够正确的截取https的流量,操作方式如下:
On some versions of iOS you may need to go to "Enable Full Trust for the PortSwigger CA".
You can configure this setting at Settings > General > About > Certificate Trust Settings.
这个设置对应的报错:
1553236877564 Error Proxy [59] The client failed to negotiate an SSL connection to sit.xxxx.com:443: Remote host closed connection during handshake
-------------------------------------update line-------------------------------------------
Burp Suite默认CA证书公钥位长是1024 bits,而在IOS 9之后,应用都是使用2048 bits的,
这就导致很多https流量无法协商ssl隧道,导致流量无法被截取。
具体的话,会看到下面的日志:
The client failed to negotiate an SSL connection to alogs.umengcloud.com:443: Received fatal alert: certificate_unknown
这篇文章,详细介绍了这类问题的解决方案
但是按照那篇文章做,最大的问题在于,der格式证书与密钥的生成,经过几天的研究,
按照下面两个链接做就可以完成:
1. 自建CA,生成根证书
2. 生成der格式证书的命令,重点看Creating a Custom CA Certificate 节
3. 关于证书格式的说明与操作 (阿里云文档)
生成后导入burp,按照上面文章的设置,便可以捕获所有IOS app的https流量而没有任何问题了。
下图是burp进行https流量截断的原理:
具体的证书生成方法如下:
Creating a Custom CA Certificate You can use the following OpenSSL commands to create a custom CA certificate with your own details, such as CA name: openssl req -x509 -days 730 -nodes -newkey rsa:2048 -outform der -keyout server.key -out ca.der [OpenSSL will prompt you to enter various details for the certificate. Be sure to enter suitable values for all the prompted items.] openssl rsa -in server.key -inform pem -out server.key.der -outform der openssl pkcs8 -topk8 -in server.key.der -inform der -out server.key.pkcs8.der -outform der -nocrypt Then click on the "Import / export CA certificate" button in Burp, and select "Cert and key in DER format". Select ca.der as the certificate file, and server.key.pkcs8.der as the key file. Burp will then load the custom CA certificate and begin using it to generate per-host certificates.
Burp Suite error “burpsuite handshake alert: unrecognized_name”的问题解决方法
java -Djsse.enableSNIExtension=false -jar burpsuite_pro_v1.5.21.jar
java -Djsse.enableSNIExtension=false -jar BurpLoader.jar
Burp生成证书后如何正确导入浏览器
证书导入chrome,正常截断百度https流量
Proxy --> Proxy Listeners --> import/export CA certificate
--> Export --> Certificate in DER format
建议将导出的证书与原来的证书合理放置,未来要用的话就不用再生成与导出了。
还有就文件命名与后缀的选择。
https_chrome_1024.cer
这种证书适合IE浏览器与chrome使用
在chrome与IE浏览器导入
chrome --> HTTPS/SSL --> 管理证书 --> 受信任的根证书办法机构 --> 导入
在firefox导入
地址栏输入“http://burp”,下载CA证书,双击导入即可
没有评论:
发表评论