Slide 1

Slide 1 text

資安工作的常用技術入門 虎虎

Slide 2

Slide 2 text

故事是從撿到一根魔杖開始…

Slide 3

Slide 3 text

然後就轉職成魔法師了(?)

Slide 4

Slide 4 text

但其實我原本的夢想呢(?)

Slide 5

Slide 5 text

畢業之後

Slide 6

Slide 6 text

資安工作的就職環境 • 客戶端 • 系統整合商 • 資安產品廠商

Slide 7

Slide 7 text

I am the King of the World

Slide 8

Slide 8 text

做人比做事重要

Slide 9

Slide 9 text

錢能解決的事都不是事兒

Slide 10

Slide 10 text

資安工作的初階轉職樹 • 軟體安全開發人員 • 產品相關檢測人員 • 網路設備管理人員 • 資安相關技術講師 • 漏洞獎金獵人

Slide 11

Slide 11 text

資安入門建議 • 培養資安意識 • 關注資安時事 • 加入資安社群

Slide 12

Slide 12 text

iThome 資訊安全 www.ithome.com.tw/security

Slide 13

Slide 13 text

台灣網路危機處理暨協調中心 twcert.org.tw

Slide 14

Slide 14 text

行政院國家資通安全會報中心 www.nccst.nat.gov.tw

Slide 15

Slide 15 text

HITCON ZeroDay zeroday.hitcon.org

Slide 16

Slide 16 text

社群資源 交流平台 社群分享 線上課程

Slide 17

Slide 17 text

TDOH tdoh.logdown.com

Slide 18

Slide 18 text

亥客書院 hackercollege.nctu.edu.tw

Slide 19

Slide 19 text

資訊安全聯合發展協會(ISDA) www.isda.org.tw

Slide 20

Slide 20 text

敢問 懂問

Slide 21

Slide 21 text

軟體開發安全

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

需求 設計 開發/測試 建置 維運 程式安全教育訓練 Secure Coding Security Requirements Code Review Dynamic Testing 安全威脅分析 程式碼安全檢查 主機弱點掃描 網站弱點掃瞄 滲透測試 Continuous Defense & Monitoring 網站防火牆 資安事件鑑識 Security Design Security Risk Analysis 安全需求分析 安全設計 ★ ★ ★ ★ ★ ★ ★

Slide 24

Slide 24 text

需求分析

Slide 25

Slide 25 text

花旗銀驚傳系統當機 客戶存款全面歸零 2019/01/30 www.ettoday.net/news/20190130/1369498.htm

Slide 26

Slide 26 text

需求 設計 開發/測試 建置 維運 程式安全教育訓練 Secure Coding Security Requirements Code Review Dynamic Testing 安全威脅分析 程式碼安全檢查 主機弱點掃描 網站弱點掃瞄 滲透測試 Continuous Defense & Monitoring 網站防火牆 資安事件鑑識 Security Design Security Risk Analysis 安全需求分析 安全設計 ★ ★ ★ ★ ★ ★ ★

Slide 27

Slide 27 text

開發設計

Slide 28

Slide 28 text

威脅類型列表 - STRIDE 字義 描述 Elevation of Privilege (權限提升) 未經正常授權取得權限能力 授權 
(Authorization) Spoofing
 (偽冒) 冒充為某人或某物 身分驗證
 (Authentication) Tampering
 (竄改) 惡意的修改資料 完整性 
(Integrity) Repudiation (否認行為) 使用者可以否認曾經進行某行為,
沒有 方法可以證明其行為 不可否認性
(Non- Reputation) Information Disclosure (資訊洩漏) 資訊被洩漏給不可存取的個體 機密性 
(Confidentiality) Denial of Service (拒絕存取服務) 對使用者拒絕服務或降低服務水準 可用性 
(Availability)

Slide 29

Slide 29 text

威脅類型 組成元素 偽冒 (S) 竄改 (T) 否認 行為 (R) 資訊 洩漏 (I) 拒絕存 取服務 (D) 權限 提升 (E) 威脅列表 使用者 V S︰未對來源進行驗證 新增留言 V V D︰同時間可能有大量存取 E︰該程序使用過高系統權限 留言內容 V V T︰未對資料進行完整性保護 I︰未對資料進行加密保護 留言資料表 V R︰未記錄資料存取行為

Slide 30

Slide 30 text

風險因子 - DREAD 字義 高(3分) 中(2分) 低(1分) Da ma ge Potential (可能傷害) 攻擊者取得完整的機敏資 料以取得系統最高權限 洩漏部分機敏資料 洩漏系統細節資訊 Reproducibility (可重製性) 攻擊可以不停重製且不需 要暫停時間 攻擊可以重製,但需要 暫 停時間 攻擊難以重製,或需 要對弱點有深入知識才能 重製 Exploitability (可刺探性) 不具有相關技能者也可以 發動攻擊 具有相關技能者可以發 動 攻擊 需要對弱點有深入知識才 能發動攻擊 Affected Users (影響使用者數) 所有的使用者 部分使用者 極低比例的使用者 Discoverability (可發現性) 公開資訊已揭露攻擊手法 及漏洞 已被找到相關的資訊, 但 漏洞尚未被揭露 極少用到的功能且使用者 難以找到漏洞

Slide 31

Slide 31 text

風險值評估 - DREAD 威脅項目 資產項目 可重製 性 可刺探 性 可發現 性 可能傷 害 影響人 數 風險值 未對來源進行驗證 使用者 2 2 2 2 3 30 (2+2+2) X (2+3) = 6 X 5 = 30 未對資料進行加密保護 留言內容 2 1 1 3 3 24 (2+1+1) X (3+3) = 4 X 6 = 24 拒絕存取 新增留言 1 1 1 3 3 18 (1+1+1) X (3+3) = 3 X 6 = 18 未驗證資料完整性 留言內容 2 1 1 1 3 16 (2+1+1) X (1+3) = 4 X 4 = 16 使用過高系統權限 新增留言 1 2 2 1 2 15 (1+2+2) X (1+2) = 5 X 3 = 15 未記錄資料存取行為 留言資料表 1 1 1 1 3 12 (1+1+1) X (1+3) = 3 X 4 = 12

Slide 32

Slide 32 text

風險值優先與控措措施 威脅項目 資產項目 風險值 控制措施 未對來源進行驗證 使用者 30 ▪ 採用帳號密碼登入認證 ▪ 限制來源IP 未對資料進行加密保護 留言內容 24 ▪ 使用HTTPS協定 拒絕存取 新增留言功能 18 ▪ 使用分散式系統架構 未對資料進行完整性保護 留言內容 16 ▪ 使用HTTPS協定 使用過高系統權限 新增留言功能 15 ▪ 採一般使用者權限執行 未記錄資料存取行為 留言資料表 12 ▪ 記錄資料的存取行為

Slide 33

Slide 33 text

花旗系統漏洞60萬額度爽刷6300 萬 2018/11/07 https://news.ltn.com.tw/news/focus/paper/1245068

Slide 34

Slide 34 text

需求 設計 開發/測試 建置 維運 程式安全教育訓練 Secure Coding Security Requirements Code Review Dynamic Testing 安全威脅分析 程式碼安全檢查 主機弱點掃描 網站弱點掃瞄 滲透測試 Continuous Defense & Monitoring 網站防火牆 資安事件鑑識 Security Design Security Risk Analysis 安全需求分析 安全設計 ★ ★ ★ ★ ★ ★ ★

Slide 35

Slide 35 text

Defense In Depth

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

A1-Injection Security Misconfiguration Broken Authentication Cross-Site Scripting (XSS) Sensitive Data Exposure Insecure Deserialization XML External Entities (XXE) Using Components with Known Vulnerabilities Broken Access Control Insufficient Logging&Monitoring

Slide 39

Slide 39 text

OWASP Zed Attack Proxy (ZAP) www.owasp.org/index.php/Category:OWASP_WebScarab_Project

Slide 40

Slide 40 text

需求 設計 開發/測試 建置 維運 程式安全教育訓練 Secure Coding Security Requirements Code Review Dynamic Testing 安全威脅分析 程式碼安全檢查 主機弱點掃描 網站弱點掃瞄 滲透測試 Continuous Defense & Monitoring 網站防火牆 資安事件鑑識 Security Design Security Risk Analysis 安全需求分析 安全設計 ★ ★ ★ ★ ★ ★ ★

Slide 41

Slide 41 text

資安事件鑑識

Slide 42

Slide 42 text

「火災來了,身為資安人員,你該怎麼辦?」 (A) 把握時間,衝進機房救硬碟 (B) 降低損失,協助消防人員滅火 (C) 快速逃命,協助清點資訊部門人數 (D) 關閉大門,不讓公司的營運機密外洩 (E) 搶救資產,快速將資產文件運走

Slide 43

Slide 43 text

救火第一

Slide 44

Slide 44 text

那麼,出事了呢?

Slide 45

Slide 45 text

保留現場

Slide 46

Slide 46 text

備下環境

Slide 47

Slide 47 text

給予對應的工具

Slide 48

Slide 48 text

Windows Resource Monitor

Slide 49

Slide 49 text

Autoruns 註冊異常

Slide 50

Slide 50 text

Process Explorer 異常程式

Slide 51

Slide 51 text

TcpLogView 異常連線

Slide 52

Slide 52 text

Wireshark 流量分析

Slide 53

Slide 53 text

NetLimiter Monitor 流量監控

Slide 54

Slide 54 text

CurrPorts 異常服務

Slide 55

Slide 55 text

SterJo NetStalker 程式防火牆

Slide 56

Slide 56 text

產品相關檢測人員

Slide 57

Slide 57 text

先懂邏輯再檢測

Slide 58

Slide 58 text

網路設備管理人員

Slide 59

Slide 59 text

Defense In Depth

Slide 60

Slide 60 text

www.ithome.com.tw/news/123912

Slide 61

Slide 61 text

資安相關技術講師

Slide 62

Slide 62 text

十八般武藝

Slide 63

Slide 63 text

漏洞獎金獵人

Slide 64

Slide 64 text

駭客年會資安專家分享抓漏洞甘苦 news.ltn.com.tw/news/life/breakingnews/1772258

Slide 65

Slide 65 text

對話台灣漏洞挖掘達人Orange Tsai www.pixpo.net/technology/0Ia8LXzy.html

Slide 66

Slide 66 text

CTF Time ctftime.org

Slide 67

Slide 67 text

Over The Wire http://overthewire.org/war games/natas/

Slide 68

Slide 68 text

LEVEL 0

Slide 69

Slide 69 text

LEVEL 0

Slide 70

Slide 70 text

LEVEL 0 → LEVEL 1

Slide 71

Slide 71 text

LEVEL 1 → LEVEL 2

Slide 72

Slide 72 text

LEVEL 2 → LEVEL 3

Slide 73

Slide 73 text

LEVEL 3 → LEVEL 4

Slide 74

Slide 74 text

LEVEL 4 → LEVEL 5

Slide 75

Slide 75 text

惡意程式逆向分析

Slide 76

Slide 76 text

PokémonGo Hacking without Jailbreak aaaddress1@HITCON2016, LightningTalk - PokemonGo Hacking without Jailbreak

Slide 77

Slide 77 text

破解彩蛋

Slide 78

Slide 78 text

隔壁鄰居家場景

Slide 79

Slide 79 text

線上分析

Slide 80

Slide 80 text

靜態分析

Slide 81

Slide 81 text

動態分析

Slide 82

Slide 82 text

逆向工程核心原理

Slide 83

Slide 83 text

惡意代碼分析實戰

Slide 84

Slide 84 text

滲透測試攻防

Slide 85

Slide 85 text

No content

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

你想為一個駭客嗎?

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

相關法規

Slide 90

Slide 90 text

保密契約 (Non-Disclosure Agreement)

Slide 91

Slide 91 text

攻擊步驟

Slide 92

Slide 92 text

公開資訊情蒐

Slide 93

Slide 93 text

機密性( Confidentiality ) 完整性 ( Integrity ) 可用性( Availability) 資安三要素

Slide 94

Slide 94 text

情報蒐集(Reconnaissance) ✓目標狀態 • 是否在線上正常服務 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構

Slide 95

Slide 95 text

情報蒐集(Reconnaissance)

Slide 96

Slide 96 text

✓蒐集情報 • Netcraft: www.netcraft.com • Whois:whois.domaintools.com • Archive:web.archive.org 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 情報蒐集(Reconnaissance)

Slide 97

Slide 97 text

web.archive.org

Slide 98

Slide 98 text

✓蒐集情報 • Shodan: www.shodan.io • ZoomEye:www.zoomeye.org • Censys:censys.io 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 情報蒐集(Reconnaissance)

Slide 99

Slide 99 text

www.shodan.io

Slide 100

Slide 100 text

www.shodan.io

Slide 101

Slide 101 text

情報學校電腦被駭!印表機狂印恐嚇信

Slide 102

Slide 102 text

✓Google Hacking • 網域 site: • 網址 inurl: • 標題 intile: • 鍵結 inlink: • 檔案 filetype: <.bak .csv .git .svn .mdb> 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 情報蒐集(Reconnaissance)

Slide 103

Slide 103 text

Google Hacking Information • Index of

Slide 104

Slide 104 text

Google Hacking FileType • filetype:xls password

Slide 105

Slide 105 text

Google Hacking Default Page • inurl:phpmyadmin • "phpMyAdmin" "running on" inurl:"main.php"

Slide 106

Slide 106 text

✓https://www.exploit-db.com/google-hacking- database/ Google Hacking Databases(GHDB)

Slide 107

Slide 107 text

Google Hacking Databases(GHDB) ✓http://www.hackersforcharity.org/ghdb/

Slide 108

Slide 108 text

網站入侵流程

Slide 109

Slide 109 text

掃瞄列舉(Scanning Enumeration) • Check for Live Systems • Check for Open Ports • Scanning Beyond IDS • Banner Grabbing • Scan for Vulnerability • Draw Network Diagrams • Prepare Proxies • Scanning Pen Testing

Slide 110

Slide 110 text

✓作業系統、服務掃瞄 • Nmap *nmap -O 作業系統 *nmap -p Port 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 作業系統掃瞄(Scanning)

Slide 111

Slide 111 text

TCP Flag SYN (連線) ACK (同意) PSH (傳輸) RST (結束) FIN (完成) URG (重連)

Slide 112

Slide 112 text

TCP 三向交握 (Three-way Handshake) Client Server SYN SYN+ACK ACK

Slide 113

Slide 113 text

✓服務掃瞄 • ICMP Scan (-sn) • TCP scan(-sT) *Stealth Scan、Inverse TCP Scan、IDLE… *FIN Scan、Xmas Scan、Null Scan… • UDP Scan (-sU) 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 服務掃瞄(Scanning)

Slide 114

Slide 114 text

✓網路架構 • tracert • traceroute • tcptraceroute • paratrace 目標狀 態 主機情 蒐 服務掃 瞄 作業系 統 網路架 構 網路架構(Scanning) ✓Zone Transfer Server • nslookup \ dig

Slide 115

Slide 115 text

SuperScan

Slide 116

Slide 116 text

Zero Day ✓ 利用 Web 應用程式的漏洞 ✓ 利用服務本身的弱點 Zero Day One Day N Day

Slide 117

Slide 117 text

系統攻擊四大類 Operating System Attacks Misconfiguration Attacks Application Level Attacks Shrink Wrap Code Attacks

Slide 118

Slide 118 text

弱點掃瞄(vulnerability assessment ) ✓服務弱點掃描工具 *Nessus *OpenVAS *Dragonsoft Vulnerability Scanner ✓人工驗證 人工驗證 弱點 掃瞄 服務 掃瞄

Slide 119

Slide 119 text

✓網頁弱點掃描工具 *HPE WebInspect *IBM AppScan *Acunetix Web Vulnerability Scanner ✓人工驗證 弱點掃瞄(vulnerability assessment ) 人工驗證 弱點 掃瞄 服務 掃瞄

Slide 120

Slide 120 text

漏洞資料庫(Exploit Database) ✓Rapid7:https://www.rapid7.com/db/search

Slide 121

Slide 121 text

漏洞資料庫(Exploit Database) ✓CVE:https://www.cvedetails.com/

Slide 122

Slide 122 text

ZeroDay 買賣平台:zerodium zerodium.com/program.html

Slide 123

Slide 123 text

駭入目標(System Hacking) 密碼破解 提升權限 執行權限 隱藏檔案 清除軌跡

Slide 124

Slide 124 text

密碼破解(Cracking Passwords) 字典攻擊 暴力破解 規則破解

Slide 125

Slide 125 text

Passwords List github.com/danielmiessler/SecLists

Slide 126

Slide 126 text

hydra -L FilePath/User.txt -P FilePath/Pass.txt TargetIP Password Dictionary

Slide 127

Slide 127 text

Have I been Pwned

Slide 128

Slide 128 text

權限提升(Privilege Escalation) 權限提升 權限 設定 系統 漏洞 脆弱 密碼

Slide 129

Slide 129 text

權限提升(Privilege Escalation) ✓DLL Hijacking • Services ✓ Command Prompt • psexec -s -i cmd.exe ✓ Reset Password • net use • pspasswd • chntpw sam system

Slide 130

Slide 130 text

入侵目標 ✓破解使用者密碼 ✓修改登入頁面取得密碼 ✓更改密碼或修補漏洞 ✓備份資料 ✓啟動竊聽 ✓繼續尋找並攻擊內部網路中其他主機 ………

Slide 131

Slide 131 text

啟用竊聽:WireShark

Slide 132

Slide 132 text

植入後門 ✓植入後門程式、惡意程式 ✓隱藏蹤跡及保留存取權限的工具 ✓修改log紀錄 ✓置換系統工具 之類的啦………

Slide 133

Slide 133 text

隱藏踨跡 ✓Tor thehiddenwiki.org

Slide 134

Slide 134 text

隱藏踨跡 ✓Lightbeam:www.mozilla.org/en-US/lightbeam/

Slide 135

Slide 135 text

隱藏檔案 ✓Command Prompt • notepad ✓Command Prompt • notepad

Slide 136

Slide 136 text

清除軌跡 ✓Command Prompt • eventvwr <手動刪除> ✓切換身份再手動刪除 • psexec -s -i cmd.exe • psexec -s -i eventvwr ✓CClear

Slide 137

Slide 137 text

應用程式弱點

Slide 138

Slide 138 text

Cookie 詐騙 (Cookie Poisoning) Cookie 偷聽 (Cookie Snooping) 儲存不安全 (Insecure Storage) 資料外洩 (Information Leakage) 錯誤處理不當 (Improper Error Handling) 脆弱帳號管理 (Broken Account Management) 目錄遍歷 (Directory Traversal ) (SQL Injection) 服務阻絕 (Denial of Service) 緩衝區溢位 (Buffer Overflow) 竄改日誌 (Log tampering) 未驗證的輸入 (Unvalidated Input) 跨站腳本 Cross Site cripting (XSS) Injection Flaws Cross Site Request Forgery 脆弱存取 (Broken Access Control) 平台漏洞 (Platform Exploits) 不安全的直接引用 (Insecure Direct Object References) 傳輸層保護不足 (Insufficient Transport Layer Protection) Failure to Restrict URL Access Insecure Cryptographic Storage Obfuscation Application DMZ Protocol Attacks Security Management Exploits Authentication Hijacking Network Access Attacks Web Services Attacks 隱藏處理 (Hidden Manipulation) 未驗證的導向 (Unvalidated Redirects and Forwards) 會話固定攻擊(Session Fixation Attack)

Slide 139

Slide 139 text

No content

Slide 140

Slide 140 text

Injection 01

Slide 141

Slide 141 text

SQL Injection SQL 語句中的「動態字串結合」的導致攻擊成功的主因。 SELECT * FROM Account WHERE username='admin' or 1='1' AND password='*' SELECT * FROM Account WHERE username= 'admin' AND password='password'

Slide 142

Slide 142 text

SQL Injection http://demo.testfire.net/login.jsp SELECT * FROM Account WHERE username=''or'1'='1' AND password='*'

Slide 143

Slide 143 text

弱點機會 '

Slide 144

Slide 144 text

資料庫存取程式改寫 傳統的寫法程式範例: Bad SQL Injection string userName = ctx.getAuthenticatedUserName(); string query = "SELECT * FROM items WHERE owner = "'" + userName + "' AND itemname = '" + ItemName.Text + "'"; sda = new SqlDataAdapter(query, conn); DataTable dt = new DataTable(); sda.Fill(dt); ...

Slide 145

Slide 145 text

止血的根源 程式改成 Parameterized Queries 的寫法來存取資料庫 弱點原因來自於攻擊者可以操縱最後執行的SQL語法。 所以最佳的防治方法就是將SQL語句的邏輯與資料互相隔離。 所有 SQL語句都要改寫才有效 在程式開始設計時,教育訓練告知所有程式設計師。

Slide 146

Slide 146 text

輸入資料過濾 • 白名單過濾:長度、英數、正規化 • 黑名單過濾:不建議,不正常的語法關鍵字,檢查不完 • /* • -- • or 1=1-- • or 2>1-- • ' or ''=' • and 1=1-- • and 1=2-- • ';declare @a int;-- • @@version>1 • order by 100 • ' union select col1,col2,… from table-- • ;exec master..xp_cmdshell 'net user Hacker Hacker /add';-- • ;exec master..xp_cmdshell 'echo WEBSHELL > path/a.asp'-- • ;exec master..xp_regread 'HKEY_CURRENT_USER,Software\ORL\WinVNC3',Password;--

Slide 147

Slide 147 text

資料庫存取權限的限制 分離應用程式中各個功能模組存取DB 的權限,以免一個注入點就可取得所有資料 。 切分權限,關閉預設帳號,不用 sa 執行所有資料庫存取動作。 限制資料庫執行程式本身的權限 將一般用不到但功能強大的延伸程序刪除或限制其操作者身份。 MS-SQL: sp_addextendedproc、sp_addlogin、sp_password、sp_addsrvrolemember、 xp_cmdshell、xp_availablemedia、xp_dirtree、xp_servicecontrol、xp_subdirs ……等。

Slide 148

Slide 148 text

Sample Code .NET – C# : string connString = WebConfigurationManager.ConnectionStrings["myConn"].ConnectionString; using (SqlConnection conn = new SqlConnection(connString)) { conn.Open(); SqlCommand cmd = new SqlCommand("SELECT Count(*) FROM Products WHERE ProdID=@pid", conn); SqlParameter prm = new SqlParameter("@pid", SqlDbType.VarChar, 50); prm.Value = Request.QueryString["pid"]; cmd.Parameters.Add(prm); int recCount = (int)cmd.ExecuteScalar(); }

Slide 149

Slide 149 text

Sample Code Java: String custname = request.getParameter("customerName"); // perform input validation to detect attacks String query = "SELECT account_balance FROM user_data WHERE user_name = ? "; PreparedStatement pstmt = connection.prepareStatement( query ); pstmt.setString( 1, custname); ResultSet results = pstmt.executeQuery( );

Slide 150

Slide 150 text

Batch Queries in MS-SQL 利用 ; 符號中止原查詢語句,串接其他指令。 Select / Insert / Delete / Update / Drop … 資料庫管理用的 Stored Procedure 指令 攻擊字串範例: id=1 ; drop table account;-- id=1 ; exec master..xp_cmdshell 'net user Hacker Hacker /add ‘;-- 攻擊權限沒成功,就代表需要驗證更進一步的存取權限

Slide 151

Slide 151 text

進階預存程序名稱 功用 xp_cmdshell 能夠以 SQL Server 的系統帳號身分來執行任 何應用程式 。 xp_regXXXX 存取作業系統的registry 資料。 xp_servicecontrol 停掉或啟動某個服務。 xp_terminate_process 停掉某個執行中的程序,但賦予的參數是 Process ID。 xp_dirtree 顯示某個目錄下的子目錄與檔案架構。 xp_oaXXXX 存取伺服器外部 OLE 物件 。 MS-SQL 還有很多可以用: Batch Queries in MS-SQL

Slide 152

Slide 152 text

從錯誤訊息中取得弱點利用的機會

Slide 153

Slide 153 text

盲測

Slide 154

Slide 154 text

Blind SQL Injection 原理就是利用等待時間。 如果條件成立,就等待5秒,否則不等待。 透過這樣的方式獲取資料庫更進一步的訊息。 ' and condition and '1'='1 '; if condition waitfor delay '0:0:5' — '; union select if( condition , benchmark (100000, sha1('test')), 'false' ),1,1,1,1;

Slide 155

Slide 155 text

No content

Slide 156

Slide 156 text

錯誤訊息客製頁面 .NET Web.Config: ON 顯示客製頁面 OFF 顯示錯誤訊息 RemoteOnly 僅向本機用戶顯示詳細錯誤

Slide 157

Slide 157 text

錯誤訊息客製頁面 Apache Tomcat: $CATALINA_HOME/conf/web.xml 404 /error/404.html

Slide 158

Slide 158 text

SQL injection 自動測試工具 http://sqlmap.org/ http://www.hackerspedia.com/2014/12/download-havij-pro- 117-pro-free.html https://addons.mozilla.org/en-US/firefox/addon/sql-inject-me/ http://sqlninja.sourceforge.net/index.html http://sourceforge.net/projects/absinthe/

Slide 159

Slide 159 text

給資料庫管理人員 1. 將資料庫獨立安裝,確保所有系統都在最新的版本 2. 將資料庫中所有的預設帳號關閉,包括超級使用者: 3. 在資料庫中新建應用程式的使用者帳號,這個帳號是限制最小權限, 只給允許存取必要的資料。移除所有範例資料表。禁止應用程式的使 用者任意存取不必要的預存程序: 4. SQL 查詢必需是透過應用程式且只能執行允許的查詢,如Select, Insert, Update 等… 5. 當情境是不需要 Insert 與 Updates 時,只能予唯讀(Read-Only)權限 如資料檢索或登入功能

Slide 160

Slide 160 text

給開發人員 1. 在程式中對於輸入資訊進行消毒驗證 2. 使用參數化查詢而非動態組合查詢。 以 JAVA 來說通常會使用 Prepared Statement 取代 Statement 3. 採用適合的錯誤處理、系統日誌方式,避免將資料庫錯誤、或 任何技術資訊透漏給使用者 4. 選擇不容易被猜到的資料表與欄位名稱 5. 盡可能使用預存程序取代原始 SQL

Slide 161

Slide 161 text

Broken Authentication 02

Slide 162

Slide 162 text

Cookie Control

Slide 163

Slide 163 text

Cookie Manager

Slide 164

Slide 164 text

Broken Authentication 不安全的驗證機制 應用程式中的身分驗證相關功能有缺陷 使用預設密碼 或 密碼太簡單 允許自動化的暴力破解或字典攻擊 透過隱藏欄位或 cookie 越權存取 登出時沒有把 session cookie 清乾淨

Slide 165

Slide 165 text

常見的存取控制 Cookie 如果發現 Cookie 中存在類似以下數值 • UID :整數 • User :字串 • Admin :0 / 1 / Y / N 表單隱藏欄位 URL GET 改參數內容

Slide 166

Slide 166 text

改 Cookie 直接登入 OverTheWire v4 > v5 :http://overthewire.org/wargames/natas/

Slide 167

Slide 167 text

隱藏欄位的隱藏風險

Slide 168

Slide 168 text

修改參數重送

Slide 169

Slide 169 text

防護建議 修改個人密碼 • 登入之後才能進行 • 再次登入驗證(Re-authentication) • 千萬別讓使用者有任何機會操縱要修改的帳號 • SSL 加密傳輸 • 通知使用者 忘記密碼 • 不好的做法:我家寵物名稱? 來福?來旺?小白? • 發送驗證信時,唯一+時間限制+訪問一次性URL => 註冊信箱

Slide 170

Slide 170 text

防護建議 安全的 Session Management • 最大原則:每次登入所使用的 session ID 都要夠亂且不同 傳輸保護 • 如果使用cookie傳送 • 限制 cookie scope (domain & path) • 設定 httpOnly 無法在用戶端用javascript讀取。 • 設定 secure flag:Cookie只能透過https的方式傳輸。

Slide 171

Slide 171 text

Cookie 設定 • Cookie Interface • Response Header • web.xml • Tomcat context.xml https://www.ajoshow.com/2017/07/19/201707192223/

Slide 172

Slide 172 text

Cookie 設定 Cookie Interface Cookie cookie = getMyCookie("CookieName"); cookie.setHttpOnly(true); cookie.setSecure(true); resp.addCookie(cookie); https://www.ajoshow.com/2017/07/19/201707192223/ Response Header String sessionid = request.getSession().getId(); response.setHeader("SET-COOKIE", "JSESSIONID=" + sessionid + "; httpOnly; secure");

Slide 173

Slide 173 text

防護建議 in.NET Logout ( ) 清除所有存放於後端的 Session 資料 Session token 失效 http://forums.asp.net/t/1755872.aspx?SessionID+not+getting+reset+after+Session+Abandon protected void LoginStatus1_LogOut(object sender, LoginCancelEventArgs e) { this.Session.Clear(); this.Session.Abandon(); FormsAuthentication.SignOut(); } Session.Abandon(); Response.Cookies.Add(new HttpCookie("ASP.NET_SessionId", ""));

Slide 174

Slide 174 text

防護建議 in Java Logout ( ) Sample 1: 身份驗證時重置 session cookie Sample 2:嚴謹的檢查登入後的 session http://stackoverflow.com/questions/4836106/how-to-reset-jsessionid public static ... (HttpServletRequest request) { HttpSession session = request.getSession(false); if (session!=null && !session.isNew()) { session.invalidate(); public static HttpSession resetSessionId(HttpSession session, HttpServletRequest request) { session.invalidate(); session = request.getSession(true); return session; }

Slide 175

Slide 175 text

防護建議 Limit session lifetime Coding: web.xml 15 // Inactivity timeout in seconds session.setMaxInactiveInterval(900); https://stackoverflow.com/questions/15382895/session-timeout-in-web-xml

Slide 176

Slide 176 text

Broken Authentication 建議 成功登入後更換Session ID,並在期限內失效 機敏參數不應放在URL、隱藏欄位或Cookie中 防止暴力破解或其他自動攻擊 系統不使用預設密碼,程式控管密碼強度,定期更新 有效的多因子驗證登入 不開啟自動記錄密碼功能

Slide 177

Slide 177 text

Sensitive Data Exposure S 03

Slide 178

Slide 178 text

Sensitive Data Exposure 在網路上撿資料 應用程式無意中回應機敏資料 IP、第三方套件、身份證、電話、路徑、信用卡、密碼… 應用程式沒有對機敏資料加密保護 採用不安全的加密機制:SHA1、MD5、RC2… 金鑰儲存控管不佳

Slide 179

Slide 179 text

Reconnaissance 網域 site:com.tw 網址 inurl:phpMyAdmin 標題 intile:index of 鍵結 inlink:upload 檔案 filetype: .bak .csv .git .svn .mdb

Slide 180

Slide 180 text

Google Hacking Database https://www.exploit-db.com/google-hacking-database

Slide 181

Slide 181 text

帶有技術細節的網頁原始碼

Slide 182

Slide 182 text

防護建議 避免將機敏資料放置於公開的網站中 網站正式上線時,應移除非必要註解、備份、暫存 機敏資訊傳輸時應加密

Slide 183

Slide 183 text

機敏資料傳輸時需加密 使用 SSL/TLS 保護所有傳輸機敏資料的網頁 • 身份認證資料 • Password、Session ID • 個人資料、交易資料、信用卡資料 關閉非 SSL/TLS 的存取管道

Slide 184

Slide 184 text

不安全的傳輸

Slide 185

Slide 185 text

Tomcat 設定 $CATALINA_BASE/conf/server.xml 設定: http://wiki.jikexueyuan.com/project/tomcat/ssl-tls.html

Slide 186

Slide 186 text

Apache修補方式 httpd.conf 設定 SSLProtocol 以黑名單關閉 SSL: SSLProtocol all -SSLv2 -SSLv3 http://www.techoism.com/enable-tls-version-mod_ssl-apache-webserver/

Slide 187

Slide 187 text

IIS 關閉不安全的設定 以修改機碼的方式,關閉SSL: 執行機碼設定(regedit.exe) 找到路徑 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Cont rol\SecurityProviders\SCHANNEL\Protocols\SSL2.0] 在SSL2.0資料夾上按右鍵→新增→機碼,然後輸入「Server」 接著在剛剛建立Server的資料夾下按右鍵→新增→DWORD(32 位元)值,然後輸入「Enabled」 確認資料欄位值是否為「0x00000000 (0)」或手動將值改為 0

Slide 188

Slide 188 text

密碼不要明文儲存 Password : 12345678 Algorithm Value Base64 MTIzNDU2Nzg= DES (13 chars) aaNN3X.PL2piw MD5 (32 chars) 25d55ad283aa400af464c76d713c07ad SHA1 (40 chars) 7c222fb2927d828af22f592134e8932480637c0d Salted MD5 $1$tsLFcOYh$5ibC1Ui2OPwUvyGUttUFI1 LanMan 0182BD0BD4444BF836077A718CCDF409 NTLM 259745CB123A52AA2E693AAACCA2DB52 Encoding ? Hash? Encryption?

Slide 189

Slide 189 text

觀念說明 Encoding (編碼) : Base64 、HTML Encoding Hash (雜湊函數) : MD5、SHA1 Encrypt (加密) : AES 資料 編碼值 資料 編碼值 f(data) 資料 編碼值 f(data) f(data) http://www.rsa.com/rsalabs/node.asp?id=2176

Slide 190

Slide 190 text

Password Crackers John the Ripper http://www.openwall.com/john/ DES/MD5/Salted MD5/LM John The Ripper MPI Patch http://bindshell.net/tools/johntheripper DES/MD5/Salted MD5/LM/NTLM/… Cain & Abel http://www.oxid.it/ LM/NTLM/MD5/SHA1/… RainbowCrack http://www.antsight.com/zsl/rainbowcrack/ MD5/SHA1/LM/NTLM/…

Slide 191

Slide 191 text

密碼防護建議 核心期望:拿不到、解不開 機敏資料不要回傳到前端 傳輸或儲存時透過Hash或是加密保護。 使用通過國際標準的演算法 & 較長的 Key Size Hash 不要再用 : LM、MD5、SHA1 在每個產生的 hash 值再加入亂數字串(salt) 例 : Hash("secret", "1lkjdo3opf"), Hash("secret", “mkdi2kan7") Cipher 不要再用: DES、3DES,請使用 : AES(AES-128, AES-192 and AES-256)

Slide 192

Slide 192 text

Java Secure Hashing https://howtodoinjava.com/security/how-to-generate-secure-password-hash-md5-sha-pbkdf2-bcrypt-examples/ private static byte[] getSalt() throws NoSuchAlgorithmException { //Always use a SecureRandom generator SecureRandom sr = SecureRandom.getInstance("SHA1PRNG"); //Create array for salt byte[] salt = new byte[16]; //Get a random salt sr.nextBytes(salt); //return salt return salt; }

Slide 193

Slide 193 text

防護建議 For encryption keys 別在程式裡寫入加密金鑰或資料庫的存取資訊 For configuration store 內容加密 .NET : Aspnet_setreg.exe https://support.microsoft.com/en-us/help/329290/how-to-use-the-asp.net-utility-to-encrypt-credentials-and-session-stat

Slide 194

Slide 194 text

XML External Entities 04

Slide 195

Slide 195 text

XML External Entities XML 外部實體攻擊 此漏洞發生在應用程式解析 XML 輸入時,沒有禁止外部實體 的載入。 主要是針對使用XML互動的Web應用程式的攻擊方法。 https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet

Slide 196

Slide 196 text

XML Basic https://www.cnblogs.com/r00tuser/p/7255939.html *DTD 外部宣告 *DTD 內部宣告 ]> George John Reminder Don't forget the meeting! George John Reminder Don't forget the meeting!

Slide 197

Slide 197 text

XML Basic DTD 的實體(ENTITY)又分內部參考與外部參考 內部實體宣告 外部實體宣告 ]> &writer;&copyright; ]> &writer;&copyright;

Slide 198

Slide 198 text

XML External Entities • 攻擊者嘗試獲取密碼 ]> This is my Stuff

Slide 199

Slide 199 text

XML External Entities • 傳送外部請求 ]> This is my Stuff 開 Port 8888,啟動 python SimpleHTTPServer ,可以遠端傳送 http 請求

Slide 200

Slide 200 text

XML External Entities 防禦方式 ·在應用程式中禁止引用 XML 外部資源。 ·即時更新 SOAP 版本 <1.2 à Vulnerable ·程式中增加白名單驗證,防止惡意資訊 ·改用簡單的資料格式(JSON)

Slide 201

Slide 201 text

防護建議 • Disable DTD 禁用外部實體的方法 • 如果不能完全關閉參照外部 DTD,過濾 XML 處理: External DOCTYPE External ENTITY • 限縮程式執行權限

Slide 202

Slide 202 text

防護建議 PHP: libxml_disable_entity_loader(true); JAVA: DocumentBuilderFactory dbf =DocumentBuilderFactory.newInstance(); dbf.setExpandEntityReferences(false); .NET: XmlTextReader reader = new XmlTextReader(stream); reader.ProhibitDtd = true; //NEEDED because the default is FALSE!! Python: from lxml import etree xmlData = etree.parse(xmlSource,etree.XMLParser(resolve_entities=False))

Slide 203

Slide 203 text

Broken Access Control 05

Slide 204

Slide 204 text

A5:Broken Access Control 無效的存取控管,沒控管存取權限,角色檢查不完善 檢查存取資源是否被授權 攻擊者可以利用這些缺陷訪問未經授權的功能或數據, 例如:訪問其他用戶的帳戶、查看敏感文件、修改其他 用戶的數據、更改訪問權限等。

Slide 205

Slide 205 text

Broken Access Control 攻擊者只需修改瀏覽器中的URL 參數,即可發送他們想 要的任何資訊,如果沒有正確驗證,攻擊者可以訪問任 何用戶的帳戶。 http://URL/Account?Role={OtherUserID}

Slide 206

Slide 206 text

Access Control:WordPress http://URL/author/admin/ http://URL?author=

Slide 207

Slide 207 text

Broken Access Control 除了公開資訊,其他檔案應限制存取 確實設定後台或內部功能頁面進行存取控制的要求 停用伺服器目錄列表

Slide 208

Slide 208 text

白名單過濾 限定檔案名稱及副檔名只限定出現數字及大小寫字母 [0-9],[a-zA-Z] 使用Hard Code 副檔名,限制能下載的檔案類型

Slide 209

Slide 209 text

白名單存取副檔名 Spring 套件中設定 Web.xml : .NET web.config 設定: defaultr *.jpg

Slide 210

Slide 210 text

Security Misconfiguration 06

Slide 211

Slide 211 text

Security Misconfiguration • 不安全的組態設定 • 未經授權的訪問內容 • 使用預設設定、頁面、帳密 • 未使用的功能頁面 • 目錄列表未關閉 • Debug 關掉

Slide 212

Slide 212 text

Security Misconfiguration 構建最精簡平台,不安裝沒必要的功能 移除不再使用的項目、備份、日誌、暫存檔案 不使用簡單易懂的命名規則 Test/phpMyAdmin/admin/ 設定符合帳號密碼的複雜規則

Slide 213

Slide 213 text

Cross-Site Scripting 07

Slide 214

Slide 214 text

A7:Cross-Site Scripting 跨站腳本攻擊 當應用程式中包含不受信任、未經驗證或轉址的來源資料時,利用 HTML或JavaScript 的瀏覽器API 取得XSS弱點 攻擊者能夠在受害者的瀏覽器中執行腳本,並劫持用戶會話、破壞網 站、發起中間人攻擊或竊取機敏資訊或轉址至惡意網站 https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet

Slide 215

Slide 215 text

Cross-Site Scripting(XSS) Reflected XSS Stored XSS DOM-Based XSS

Slide 216

Slide 216 text

Cross-Site Scripting(XSS) 設定屬性 Set-Cookie: HttpOnly 不信任使用者輸入內容,嚴密限制輸入來源 嚴格定義字串內容及長度:白名單 > 黑名單 輸出頁面做 Encoding 檢查 PHP 使用 htmlentities 過濾字串 .NET 使用 Microsoft Anti-XSS Library

Slide 217

Slide 217 text

Cross-Site Scripting(XSS) HttpOnly Flag Cookie只限被伺服器端存取,無法在用戶端讀取。 Cookie Interface Cookie cookie = getMyCookie("myCookieName"); cookie.setHttpOnly(true); cookie.setSecure(true); resp.addCookie(cookie); Response header String sessionid = request.getSession().getId(); response.setHeader("SET-COOKIE", "JSESSIONID=" + sessionid + "; httpOnly; secure");

Slide 218

Slide 218 text

Cross-Site Scripting(XSS) web.xml true true Tomcat context.xml ...

Slide 219

Slide 219 text

修改建議 in VB.NET VB.NET範例: Dim sb As StringBuilder = New StringBuilder( _ HttpUtility.HtmlEncode(input)) sb.Replace("<b>", "") sb.Replace("</b>", "") sb.Replace("<i>", "") sb.Replace("</i>", "") Response.Write(sb.ToString())

Slide 220

Slide 220 text

修改建議 in C# C# 範例: StringBuilder sb = new StringBuilder( HttpUtility.HtmlEncode(input)); sb.Replace("<b>", ""); sb.Replace("</b>", ""); sb.Replace("<i>", ""); sb.Replace("</i>", ""); Response.Write(sb.ToString());

Slide 221

Slide 221 text

Insecure Deserialization 08

Slide 222

Slide 222 text

甲骨文計畫放棄Java物件序列化 2018-05-29 https://www.ithome.com.tw/news/123511

Slide 223

Slide 223 text

Insecure Deserialization 不安全的反序列化 導致遠程代碼(remote code execution) 執行。 攻擊者利用它們來執行重播攻擊、注入攻擊和特權升級 。 https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet 參數控制 反序列化 自動利用 敏感參數

Slide 224

Slide 224 text

Insecure Deserialization 修改cookie提權內容: :4:{i:0;i:132;i:1;s:7:"Mallory";i:2;s:4:"user";i:3;s:32:"b6a 8b3bea87fe0e05022f8f3c88bc960";} 攻擊者更改序列化對象以增加admin權限: a:4:{i:0;i:1;i:1;s:5:"Alice";i:2;s:5:"admin";i:3;s:32:"b6a8b 3bea87fe0e05022f8f3c88bc960";}

Slide 225

Slide 225 text

Insecure Deserialization 不接受不可信任的來源的序列化對象 執行完整性檢查,以防止竄改 嚴格定義字串內容及長度:白名單>黑名單 監控反序列化,再次驗證,當執行異常時應顯示告警

Slide 226

Slide 226 text

Using Components with Known Vulnerabilities 09

Slide 227

Slide 227 text

A9:Using Components with Known Vulnerabilities 使用已知漏洞的套件 (框架、套件、函式庫) 未使用最新版本 或是 未解決已知弱點問題 使用含有已知漏洞的套件的應用程式或API可能會破壞應用程 式防禦、造成各種攻擊並產生嚴重影響 https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet

Slide 228

Slide 228 text

Struts 1 End Of Life

Slide 229

Slide 229 text

CVE-2017-5638:Apache Struts 2 漏洞可能讓駭客從遠端執行程式

Slide 230

Slide 230 text

jQuery-File-Upload <= 9.x 遠程命令執行漏洞利用 jQuery-File-Upload是Github上繼jQuery之後最受關注的jQuery項 目,該項目最近被披露出一個存在了長達三年之久的任意文件上 傳漏洞,該漏洞在隨後發布的v9.22.2版本中被修復,但是在 VulnSpy團隊對代碼的複查中發現了另外一個嚴重的命令執行漏洞 ,該漏洞允許攻擊者通過上傳惡意的圖片文件來執行任意系統命 令。 http://www.vulnspy.com/cn-jquery-file-upload-below-v9.x-rce/

Slide 231

Slide 231 text

CVE-2014-0166 WordPress 偽造 Cookie 弱點 CVE-2014-0166 是 WordPress 上面驗證登入 cookie 的 弱點,攻擊者可以暴力偽造出合法 cookie,藉此獲得 WordPress 最高權限,進而拿到 shell 取得系統操作權。 https://devco.re/blog/2014/04/16/cve-2014-0166-wordpress-forged-cookie-vulnerabilities/ 預設的 cookie_name 如下 define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH); COOKIEHASH 的值是這個網站 url 做 MD5 後的結果 define( 'COOKIEHASH', md5( $siteurl ) ); 如果 wordpress 首頁是 http://domain.my/wordpress 它的 COOKIEHASH 就是 "http://domain.my/wordpress".md5 => "de5be3cf9fcea023a1303527e10ea67a"

Slide 232

Slide 232 text

WPSCANS WPSCANS 是一套非常知名的 WordPress 漏洞掃描工具,可以去抓出你的網站目 前所使用的佈景主題或外掛是否包含有漏洞的程式碼或是第三方套件,同時也會建 議你應該將程式更新到安全的版本,來避免讓駭客有機會利用漏洞來進行網站入侵 。 https://wpscans.com/

Slide 233

Slide 233 text

WordPress 4.7.1修復八大漏洞 1.PHPMailer中存在的遠程代碼執行漏洞 2.REST API會向已被授權訪問文章的所有用戶暴露資料。 3.update-code.php 檔案中標頭引起的跨站腳本攻擊漏洞。 4、通過上傳Flash文件引起的跨站點請求偽造攻擊。 5、因主題名稱回滾引起的跨站攻擊。 6、通過郵件發表文章時,預設設定沒有修改的認證。 7、在可訪問模式下編輯工具時存在跨站點請求偽造攻擊。 8、多站點啟動密鑰的弱加密安全。 https://kknews.cc/tech/2ag63vg.html

Slide 234

Slide 234 text

All Your Nodes Are Belong To Us https://www.bishijie.com/shendu_2085 The Story of an EOS Chain Remote Code Execution Bug

Slide 235

Slide 235 text

All Your Nodes Are Belong To Us Reviewing EOS source code on Github http://blogs.360.cn/post/eos-node-remote-code-execution-vulnerability.html The Story of an EOS Chain Remote Code Execution Bug 全球最大男性交友網站

Slide 236

Slide 236 text

All Your Nodes Are Belong To Us The Bug in Web Assembly Sample Code : libraries/chain/webassembly/binaryen.cpp (Line 78) Function binaryen_runtime::instantiate_module The Story of an EOS Chain Remote Code Execution Bug Out-of-Bounds Write Here • Useless checking here: assert doesn't work in release build • Copy-pasted code from WebAssembly project wasm-js.cpp • No code review & misunderstanding the scope of asser

Slide 237

Slide 237 text

All Your Nodes Are Belong To Us The Bug in Web Assembly Sample Code : libraries/chain/webassembly/binaryen.cpp (Line 78) Function binaryen_runtime::instantiate_module The Story of an EOS Chain Remote Code Execution Bug Out-of-Bounds Write Here • Useless checking here: assert doesn't work in release build • Copy-pasted code from WebAssembly project wasm-js.cpp • No code review & misunderstanding the scope of asser

Slide 238

Slide 238 text

The Bug The table is a vector from std::vector and resized before written The valid value of the module->table.initial is 0~1024 The offset is a signed int32 read from WASM file By manipulate the fields of WASM file, we could overwrite memory behind the table vector

Slide 239

Slide 239 text

Bug Reporting We directly contacted Daniel Larimer on Telegram and sent the bug report to him

Slide 240

Slide 240 text

Bug Fixing The Final Fixed Version Force converted the “offset” to unsigned int64 to avoid overflow

Slide 241

Slide 241 text

The Bug is Fixed, But…

Slide 242

Slide 242 text

The Truth is… They lost “significant” money because the factor that EOS is buggy was leaked 740M USD(22B TWD) of market cap. of EOS vanished, 2 hours after our report

Slide 243

Slide 243 text

弱點建議 儘可能不要用不安全的套件 定期檢新版本的框架、函式庫、元件 檢視所使用的框架\函式庫\元件\工具是否在CVE 上有嚴重已知弱點 即使程式並未做修改,仍然需要定期將相關套件 升級至最新版,減少弱點可攻擊的時間落差

Slide 244

Slide 244 text

漏洞資料庫(Exploit Database) Rapid7:https://www.rapid7.com/db/search

Slide 245

Slide 245 text

漏洞資料庫(Exploit Database) CVE:https://www.cvedetails.com/

Slide 246

Slide 246 text

Insufficient Logging&Monitoring 10

Slide 247

Slide 247 text

A10:Insufficient Logging & Monitoring 不足的日誌記錄和監控 事件回報缺失或無效的內容 攻擊者能夠進一步攻擊系統或轉向更多系統, 以及篡改、存取或銷毀資訊。 記錄登入失敗的存取控制,並適時發出告警 日誌檔中不能記錄完整機敏資訊 https://www.owasp.org/index.php/OWASP_Top_Ten_Cheat_Sheet

Slide 248

Slide 248 text

上傳日誌是否驗證內容

Slide 249

Slide 249 text

例外處理(Exception Handler) https://en.wikipedia.org/wiki/Exception_handling

Slide 250

Slide 250 text

社交工程

Slide 251

Slide 251 text

Shoulder Surfing

Slide 252

Slide 252 text

Dumpster Diving

Slide 253

Slide 253 text

Tailgating

Slide 254

Slide 254 text

DDOS

Slide 255

Slide 255 text

嫌肯德基不乾淨 掏65萬現金買雞桶癱瘓店家 tw.appledaily.com/new/realtime/20120905/140982/

Slide 256

Slide 256 text

1人霸1桌 70人癱瘓餐廳討債 tw.appledaily.com/headline/daily/20091207/32143663/

Slide 257

Slide 257 text

客人一句:不要了麥當勞丟61份餐 tw.appledaily.com/new/realtime/20170210/1053584/

Slide 258

Slide 258 text

hping3 hping3 –S Target –a FakeIP –p 22 --flood

Slide 259

Slide 259 text

Ping flood Ping of Death Ping Sweep Syn flood Smurf Land-based Teardrop

Slide 260

Slide 260 text

無線網路

Slide 261

Slide 261 text

Buletooth Hacking • Bluejacking • Bluesnarfing • Bluebugging

Slide 262

Slide 262 text

WEP & WPA & WPA2 WEP •RC4 •IV 24 bit +40/104 bit WPA •RC4,TKIP •IV 48 bit + 128 bit WPA2 •AES-CCMP •IV 48 bit + 128 bit

Slide 263

Slide 263 text

Evil Twin

Slide 264

Slide 264 text

WiFi Sniffing

Slide 265

Slide 265 text

MITM

Slide 266

Slide 266 text

APP

Slide 267

Slide 267 text

APK Downloader apps.evozi.com/apk-downloader/

Slide 268

Slide 268 text

網路設備

Slide 269

Slide 269 text

IDS & IPS

Slide 270

Slide 270 text

HIDS

Slide 271

Slide 271 text

NIDS

Slide 272

Slide 272 text

HIDS & NIDS

Slide 273

Slide 273 text

加密防禦機制

Slide 274

Slide 274 text

Heartbleed

Slide 275

Slide 275 text

Symmetric vs Asymmetric

Slide 276

Slide 276 text

No content

Slide 277

Slide 277 text

自訂憑證

Slide 278

Slide 278 text

硬碟加密: Advanced Encryption Package

Slide 279

Slide 279 text

硬碟加密:VeraCrypt

Slide 280

Slide 280 text

謝謝大家:)