BurpSuite的https代理原理
生活随笔
收集整理的這篇文章主要介紹了
BurpSuite的https代理原理
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
BurpSuite的基本原理是搭配瀏覽器使用的http代理。對(duì)于HTTP協(xié)議,與一般的HTTP代理原理相同。對(duì)于HTTPS,即使用SSL的安全HTTP協(xié)議,BurpSuite需要發(fā)起“中間人攻擊”以獲得HTTP消息明文。具體原理如下。
1. 無(wú)BurpSuite的HTTPS交互過(guò)程
? ? Client ? ? ? ? ? ? ? ? ? ? ? ? ?Server ?
? ? ? | -----HTTPS(TCP443) Req------> |
? ? ? | <----- Certificate -----------|
? Verify Cert
? ? ? | <------SSL Negotiation------->|
? ? ? |<----Security Connection------>|
Client需要獲取Server的公鑰證書(shū),并利用非對(duì)稱(chēng)密碼算法協(xié)商對(duì)稱(chēng)密鑰,實(shí)現(xiàn)后面http消息的機(jī)密性和完整性保護(hù)。SSL的設(shè)計(jì)是能夠扛中間人攻擊的,所以無(wú)法通過(guò)傳統(tǒng)的中間人攻擊實(shí)現(xiàn)https代理。
2. 有BurpSuite的HTTPS交互過(guò)程
BurpSuite的基本思路是偽裝成目標(biāo)https服務(wù)器,讓瀏覽器(client)相信BurpSuite就是目標(biāo)站點(diǎn)。為了達(dá)成目標(biāo),BurpSuite必須:(1)生成一對(duì)公私鑰,并將公鑰和目標(biāo)域名綁定并封裝為證書(shū);(2)讓瀏覽器相信此證書(shū),即通過(guò)證書(shū)驗(yàn)證。所以, BurpSuite需要在操作系統(tǒng)添加一個(gè)根證書(shū),這個(gè)根證書(shū)可以讓瀏覽器信任所有BurpSuite頒發(fā)的證書(shū)。具體流程如下:
? ? Client ? ? ? ? ? ? ? ? ? ? BurpSuite ? ? ? ? ? ? ? ? ? ? ? ? ? ? Server
?
? ? |-----https(tcp 443) req------> |
? ? ? ? ? ? ? ? ? Generate an certificate1 bound
? ? ? ? ? ? ? ? ? ? ?with the target domain
? ? |<------ -certificate1---------->|
? ? |<-------SSL negotiation-------->|
? ? |<-----security connection------>|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| -------https(tcp 443) req------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<-------certificate2------------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<----------SSL connection-------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<-------security connection------>|
之后,BurpSuite擁有了兩套對(duì)稱(chēng)密鑰,一套用于與client交互,另外一套與server交互,而在BurpSuite處可以獲得https明文。
1. 無(wú)BurpSuite的HTTPS交互過(guò)程
? ? Client ? ? ? ? ? ? ? ? ? ? ? ? ?Server ?
? ? ? | -----HTTPS(TCP443) Req------> |
? ? ? | <----- Certificate -----------|
? Verify Cert
? ? ? | <------SSL Negotiation------->|
? ? ? |<----Security Connection------>|
Client需要獲取Server的公鑰證書(shū),并利用非對(duì)稱(chēng)密碼算法協(xié)商對(duì)稱(chēng)密鑰,實(shí)現(xiàn)后面http消息的機(jī)密性和完整性保護(hù)。SSL的設(shè)計(jì)是能夠扛中間人攻擊的,所以無(wú)法通過(guò)傳統(tǒng)的中間人攻擊實(shí)現(xiàn)https代理。
2. 有BurpSuite的HTTPS交互過(guò)程
BurpSuite的基本思路是偽裝成目標(biāo)https服務(wù)器,讓瀏覽器(client)相信BurpSuite就是目標(biāo)站點(diǎn)。為了達(dá)成目標(biāo),BurpSuite必須:(1)生成一對(duì)公私鑰,并將公鑰和目標(biāo)域名綁定并封裝為證書(shū);(2)讓瀏覽器相信此證書(shū),即通過(guò)證書(shū)驗(yàn)證。所以, BurpSuite需要在操作系統(tǒng)添加一個(gè)根證書(shū),這個(gè)根證書(shū)可以讓瀏覽器信任所有BurpSuite頒發(fā)的證書(shū)。具體流程如下:
? ? Client ? ? ? ? ? ? ? ? ? ? BurpSuite ? ? ? ? ? ? ? ? ? ? ? ? ? ? Server
?
? ? |-----https(tcp 443) req------> |
? ? ? ? ? ? ? ? ? Generate an certificate1 bound
? ? ? ? ? ? ? ? ? ? ?with the target domain
? ? |<------ -certificate1---------->|
? ? |<-------SSL negotiation-------->|
? ? |<-----security connection------>|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| -------https(tcp 443) req------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<-------certificate2------------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<----------SSL connection-------->|
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?|<-------security connection------>|
之后,BurpSuite擁有了兩套對(duì)稱(chēng)密鑰,一套用于與client交互,另外一套與server交互,而在BurpSuite處可以獲得https明文。
總結(jié)
以上是生活随笔為你收集整理的BurpSuite的https代理原理的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 夸克缓存视频合并小工具
- 下一篇: 中国计算机硬件cpu的发展趋势,中国计算