[IT-Security-2] 殭屍網路 Botnets and Stuxnet
Botnets and Stuxnet
Notes from RWTH Aachen University course 
“IT security 2” Wintersemester 2019/20
professor: Meyer, Ulrike Michaela
 What is botnets?
定義:- Bots: 是具有可遠端控制功能的malware
 - Bots傳播: worm或trojan
 - Botnets: 一群 compromised(折衷) 的電腦
- 被安裝bots
 - 被攻擊者遠端控制(command and control infrastructure (C&C))
 - Attacker被稱作herder(牧羊人)
 
 - 被感染的電腦稱作 drones 或 zombies
 
- Bot在malware中的分類:
- 具有worm的利用軟體弱點、backdoor、利用rootkit、用skyware、可以擴增
 - 辨別的方式:是否遠端控制
 
 
 Attacks mounted with the help of botnets
- spam/phishing
 - DDoS攻擊
 - spyware竊取資料
 - click-fraud(詐騙)
 - 散播新的malware
 
 Lifecycle of a Botnet from a Herder’s View
| 時期 | 說明 | 
|---|---|
| Creation | 重複利用existing code | 
| Infection | 利用軟體弱點、drive-by-download、Trojan、email附件等 | 
| Rallying(團結) | Bots 第一次 start up並連線C&C server(s) | 
| Waiting | 等待command | 
| Executing | 執行command | 
 Lifecycle of a Botnet from a Defense’s View
| 時期 | 說明 | 
|---|---|
| Detection | 安全偵測(infection, rallying, executiong時期) | 
| Capturing | 被抓到 | 
| Analysis | 分析散播策略、目的、C&C infrastructure | 
| Tear down | 拆除 | 
 Command and Control(C&C) Techniques
- 中心化:
- IRC server: server推送
 - HTTP server: victim clients拉回
 
 - 分散式:
- P2P
 
 
現今多為hybrid
Internet Relay Chat (IRC):- 網路上的即時對話系統(real-time messaging service)
 - 群組通訊或個人通訊
 - 分成多個channels
 
- IRC bots
- C&C server是IRC server
 - 被感染的電腦加入一個特殊的IRC通道
 - 優點:
- IRC servers are fr:eely available
 - attackers經驗豐富
 
 - IRC backdoor
- standalone(單機)檔案自我複製
 - 產生Registry key以開始檔案
 - 修改
WIN.INI及SYSTEM.INI或複製給其他users - 一些backdoor用IRC client取代
.INI - example: Agobot(2009)
 
 
 
Web-based Command and Control:- HTTP 成為最有名的C&C protocol
 
 連續不斷連線
 定時詢問且等待下個連線- malware被設定為request 網站 PHP script且導向下載command的網頁
 
- HTTP bots
- 通常有使用者友善的介面以控制bots
(less skilled的人也可以用) - client-side exploits(利用瀏覽器弱點)
 - example: Bobax(2004) 利用buffer overflow弱點
 
 - 通常有使用者友善的介面以控制bots
 
Decentralized botnets:- 並非所有都是P2P
 - 減少server load或為了fault-tolerance
 - example: Waledac
- Hybrid P2P/Centralized infrastructure
 - 用AES和RSA混合加密
 - 散播: Social Engineering, Vulnerabilities
 - 更新IP list: 和其他節點交換, 連接hard-coded Waledac domains
 - 惡意行為: 下載並執行程式, 傳送spam, 取得email帳號密碼, DDoS
 
 
 Taking down botnets
Centralized:- 定位C&C server(分析traffic, honeypots)
 - 使C&C server無法連結
- 封鎖hostname, 封鎖IP, 切斷連線
 
 
隱藏 C&C server的 IP:- Domain Generating Algorithms(DGAs)
- 用seed產生不同的domain name
 - 攻擊者必須註冊queried domain name
 
 - Fast Flux in DNS
- 不同的IP 地址對應到同個domain name
 - IP 地址通常是受害者的
 
 
- Domain Generating Algorithms(DGAs)
 
Decentralized:- 較困難
 - 需要對所有感染的節點做disinfection(消毒) (Waledac)
 - 汙染peer list (Conficker)
 - 沒有一勞永逸的辦法
 - 減輕Waledac
- 沒有cryptographic authentication
發行有clean-up指令的"update" - 汙染P2P cache,就沒有新的Tier 2節點可以被汙染
take down Tier 2 節點定位 main C&C 
 - 沒有cryptographic authentication
 - 減輕Conficker
- 因為command都被簽章,無法發行update
 - Peer lists存不同的IP,但沒有network range
 - Peer lists被整理,提供peer更大的network range
 - 合法的peer只會跟cleaning peer溝通
 
 
 Mirai IoT Botnet
- 感染IoT設備(DVR, routers, IP cameras, printers…)
 - 中心化
 - 沒有避免被偵測
 - 執行DDoS攻擊
 
lifecycle:
- Loader對各平台加速傳播
 - Report Server有每個被感染的裝置的資料, 可能被感染的裝置
 
- 衍生
- Hajime: 非中心化
 - BrickerBot: Permanent DoS, 清除資料
 
 - IoT裝置適合被Botnet攻擊
- Constant operation
 - 較少保護
 - 維護不佳
 - 適合的攻擊路徑(traffic)
 - 沒有或較少user interface
 
 - 保護機制
- 修改預設密碼
 - 時常更新
 - 封鎖port
 - 只允許non-routable IP address
 
 
 Stuxnet
- 第一個威脅主要建設(critical infrastructure)的malware
- 電力, 水利, 醫療, 交通, 股市等
 
 - Advaced persistent threat
 - Cyber attack: 利用cyber attack,遠端攻擊,勒索主要建設
 
Supervisory Control and Data Acquisition System (SCADA):- 監測及控制製造過程
 - 通常在不同的物理位置
 - 安全迷思: 大家以為SCADA很安全因為protocols和介面,且如果沒有連上網路就很安全
 - 威脅:
- 非授權的存取(personal物理性存取, stuxnet利用漏洞)
 - 存取沒有受保護的通訊
 
 
 Stuxnet overview:- 2010/6/17被發現
 - 利用Windows的漏洞
 - 尋找SCADA控制的電腦
 
- windows漏洞:
- 一開始在USB上
- 資料夾被瀏覽後惡意的DLL執行
 - 用 privilege escalation(升級) 的漏洞
 - 安裝兩個簽章後的驅動檔案,確保reboot後的Stuxnet繁殖(propagation)
- Propagation:用網路驅動, Windows printer spooler(後臺處理程序)service 漏洞, RPC漏洞
 - 上列三個屬於 Zero-day exploits, security experts不知道的漏洞(previously unknown)
 
 
 
 - 一開始在USB上
 - Update:
- HTTP連線到update servers
 - 兩個感染的裝置互相update
 
 - Vulnerabilities in WinCC/Step7
- 一個漏洞允許修改WinCC/Step7和被控制的PLC的通道
 - WinCC/SCADA 資料庫軟體(存取只被一個default且不能修改的password保護)
 
 - 操作PLCs
- PLC連到一個converter
 - converter被特殊製造商製造
 - 附在motor上,運轉807-1210 Hz
 - 更改頻率, 旋轉速度
 
 - Origin:
- 跟worms不同
- 特定攻擊
 - 沒有竊取資料
 - 沒有C&C特性(除了update)
 - 破壞性攻擊
 - 高度的financial investment
 - 用合法的certificates的簽章
 
 
 - 跟worms不同
 - Patching and Cleaning
 - Windows漏洞已被補好
 - scanner也可以偵測被感染的機器
 
Readings
§Check out the “Know your enemy” papers on the honeynet project site 
§Details on Waledac: Symantec Win32.Waledac Threat Analysis 
§Details on Mirai IoT Botnet:
    §Antonakakis et al: “Understanding the Mirai Botnet” USENIX Security 2017
§Deatils on Stuxnet: Ralph Langner’s Stuxnet Deep Dive

留言
張貼留言