or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
CDN 網站攻擊 - 這次換駭客當鬼來抓你了 - Mico
tags:
SITCON 2020 共筆
SITCON 2020
2020
共筆
R0
歡迎大家來到SITCON 2020 ヽ(✿゚▽゚)ノ
共筆入口:https://hackmd.io/@SITCON/2020
手機版請點選上方 按鈕展開議程列表。
outline
Speaker: Mico
1. Architecture
一蘭拉麵
伺服器服務模式
單一節點網站服務模式(常見)
節點式網站服務模式
content deliver network
CDN Domain Resolve
使用者不會知道網站的真實 ip
一般直連
透過CDN快取 可以更快取得資料
2. threats and mitigations
Disclosure of Origin IPs
bypass cdn and waf
dos, attack directly to host
how to
域名的 a 紀錄
dig query name server
multi ping
異地 domain 的解析IP不同
網址/cdn-cgi/trace
是否使用CDN
cdn-cgi trace
製造parse error
%
%後面一般接上兩個十六進位的字元
單一一個%造成
request for comments(RFC)
IETF
RFC 規範了一個標準
不遵循 RFC 開發的例子,粽子沒有規定烹飪方式
子/域名探測
wordlist scanner
passive dns
過往的 dns 紀錄
virustotal
x509v3
subject altermative name
crt.sh
查詢憑證申請紀錄中有無目標 domain
associated domain
buildwith
cloudflair
查找所有很像的憑證網站
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →domain fronting
透過修改 Host header 讓 cdn 將封包導向與連線 domain 不同的主機
直接打 ip 訪問(不帶 host header
infected pc
tructed website attackers web server
c c server
osint
whois 資料庫
作者名稱、社交網頁等 GET一些可能有用內容
theharvester build by python
content search
不會出現同個網域的結果藉以找到旁站
integration tools
功能探測
利用公開網站提供的預覽功能(該網站的IP連接)
其他思路
xss -> 打客服
上傳 webshell
crimeflare
濫用早期 cloudflare 的檢舉功能
撈 phpinfo.php or web config
cf-connnecting-ip
CDN Domain resolve
永遠是 CDN IP 要怎麼知道真實 IP
Cloudflare Header: CF-Connecting-IP
防禦措施
web cache deception and poisoning
cached and confused web cache deception in the wild
caching 101
cache key
靜態資源副本
cache control headers
max-age 存留秒數(較被受用)
expires 過期時間
cach extension
預設快取項目
html php aspx
js css
custom route
web cache deception attack in paypal settings page
web chache poisoning
web cache poisoning - DOM
first cache time
X-Host 參數可以指定 js 來源
防禦措施
只快取指定資料夾 …
cache poisoned denial of service (CPDoS)
attack method
heep header oversize
usually maxmium 8192 bytes
http meta character
400 不該被快取
Get Post Delete
Http Method Override
rfc 7231
Method:
GET HEAD POST
Status Code:
200 203 204 206
300 301
404 405 410 414
501
CDN 平台
流量計價 連線計價
攻擊流量 > 預算
經濟式服務阻斷攻擊
CDN 流量放大
網站源地址相同 -> 容易被擋
CDN 來源三角映射
// 太多CDN節點會不提供服務
相同節點網站阻斷服務
防禦措施
Cache-Control: no-store
http desymc requests smuggling(協議走私attack)
http response splitting
http desymc attacks
lasted release:
blackhat usa 2019 8
defcon 27 2019 8
HTTP 1.0+ keep alive & pipeline
multiple connections
persistent connection(持久連線)->非常省時間
no pipelining
pipelining
駭客可以謊報自己的封包長度,用以穿插別人的封包
不會檢查嗎?
攻擊圍繞在這兩個方式
Content-Length (整體傳輸、較舊)
Transfer-Encoding
RFC2616
一起傳會怎麼樣
會忽略比較舊的那一個
Front-end->Back-end
CLTE
TECL
傳兩個 Content-Length 會怎樣
RFC2616 沒有意料到有這個操作 …
http desymc smuggling and web cache poisoning paypal bugbounty $38,900 usd
http desymc smuggling slack bugbounty
paypal bugbounty $6,900 usd
防禦措施
選擇會正規劃 header 的 CDN 服務
前後端不使用TCP重用
使用HTTP/2
嚴格遵守 RFC
結論
要精準的評估資訊安全的風險不容易,必須持續關注最新議題才能意識最新的資安攻擊
thank you
Q&A