Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
你的APP安全嗎
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
羊小咩
September 22, 2019
Programming
0
56
你的APP安全嗎
羊小咩@iPlayground2019
羊小咩
September 22, 2019
Tweet
Share
More Decks by 羊小咩
See All by 羊小咩
使用openCV做影像辨識 @ iplayground
lamb_mei
1
480
Other Decks in Programming
See All in Programming
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
290
AIに任せる範囲を安全に広げるためにやっていること
fukucheee
0
140
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
210
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
350
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
1.7k
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
440
Ruby and LLM Ecosystem 2nd
koic
1
980
20260315 AWSなんもわからん🥲
chiilog
2
160
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
5
1.1k
条件判定に名前、つけてますか? #phperkaigi #c
77web
1
130
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
340
米国のサイバーセキュリティタイムラインと見る Goの暗号パッケージの進化
tomtwinkle
2
610
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
860
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Claude Code のすすめ
schroneko
67
220k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
110
A better future with KSS
kneath
240
18k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
85
Discover your Explorer Soul
emna__ayadi
2
1.1k
Transcript
你的 App 安全嗎? 羊小咩@iPlayground
Blog : lamb-mei.com 羊小咩 E-mail :
[email protected]
FB : https://www.facebook.com/lamb.mei
GitHub:https://github.com/lamb-mei/ -BNC.FJ
"HFOEB • 緣由 • 有做到這三點嗎 • 駭客/攻擊者⼿手法 • 如何防⽌止和使⽤用技術 •
MAS ⾏行行動資安檢測
緣由
ㄒ 嗨,您好!我這是資安實 驗室 嗨 請問有什什麼事嗎?
其實也沒什什麼特別啦 ……………….. 要通知貴司,我們發現App 儲 存帳號沒有隱碼,因此會po 在我們FB喔 ,啾咪
有做到這三點嗎? • 連線採⽤用https • 資料檔案加密 • 傳輸訊息時押碼
駭客/攻擊者⼿手法 • 中間⼈人攻擊 / 嗅探器 • 取得未加密檔案/⽂文件 • 記憶體編輯 •
動態程式碼注入攻擊 • 反組譯 ClassDump
Burp Suite Fiddler Charles GUI Debug Proxy
IPA 解壓縮 •圖片 •plist⽂文件 •靜態wap⾴頁 •.bundle
取得AppStore IPA ⼩小技巧 Apple Configurator 2 Apple Configurator 2 在管理理⼿手機
App 時 會暫時把 ipa 暫存在電腦上 ~/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/ MobileApps/
iTools / iFunBox 查 App 沙盒⽬目錄 /private/var/mobile/Containers/Data/Application/E62249F1....E103A21/ 圖片、plist⽂文件、靜態wap⾴頁、.bundle 等 sqlite、plist
、RealM、產⽣生檔案或圖片
取得 UserDefault 檔案 Userdefault、Cookie、快取網⾴頁
使⽤用 IDA 或 Hopper 還原偽代碼
Flex是⼀一款iOS APP修改程式外掛,可以鎖定 function 回傳值 ,或編輯UI 最棒的是以下載別⼈人寫好的腳本
class dump 回傳值鎖定 下載腳本 Flex
https://www.slideshare.net/GaryNil/ios-iplayground-2018?fbclid=IwAR3igWfOEXjk5RNFjBdEXaRQREztnUnbDO_8GKTTOdv4Pkkzbpz_Xef-FEs 其他⼤大神分享
如何防範
⾸首先要先定義 防⽌止OO發⽣生 中間⼈人? 使⽤用者破解?
網路路通訊安全 • 訊息隱密性(Confidentiality) • 訊息完整性(Integrity) • 訊息來來源辨識性(Authentication) • 訊息不可重複性(Non-duplication) •
訊息不可否認性(Non-repudiation) 指訊息不會遭截取、窺竊⽽而洩漏資料內容致損害其秘密性 指訊息內容不會遭篡改⽽而造成資料不正確,即訊息如遭篡改時,該筆訊息無效 指傳送⽅方無法冒名傳送資料,資料進⾏行行數位簽章 指訊息內容不得重複,應採⽤用序號、⼀一次性亂數、時間戳記 指無法否認其傳送或接收訊息⾏行行為 電⼦子⽀支付專法 訊息防護措施
網路路通訊安全 • 訊息隱密性(Confidentiality) • 訊息完整性(Integrity) • 訊息來來源辨識性(Authentication) • 訊息不可重複性(Non-duplication) •
訊息不可否認性(Non-repudiation) 指訊息不會遭截取、窺竊⽽而洩漏資料內容致損害其秘密性 指訊息內容不會遭篡改⽽而造成資料不正確,即訊息如遭篡改時,該筆訊息無效 指傳送⽅方無法冒名傳送資料,資料進⾏行行數位簽章 指訊息內容不得重複,應採⽤用序號、⼀一次性亂數、時間戳記 指無法否認其傳送或接收訊息⾏行行為
資 料 加 密
• RSA加密演算法 • 橢圓曲線密碼學ECC (Elliptic Curve Cryptography) 密碼學 Cryptography 對稱式加密
(Symmetric Encryption) 非對稱式加密 (Asymmetric Encryption) • 進階加密演算法AES • 三重資料加密演算法3DES (Advanced Encryption Standard) (Triple Data Encryption Standard)
雜湊 Hash • 雜湊不是加密 • 雜湊無法還原 • 產⽣生出來來長度固定 • 只差⼀一bit產出也完全不同
Algorithm • md5 • sha • sah0 • sha1 • sha256 • sha512 • 校驗碼(Checksum) • 產⽣生不可還原資料
訊息鑑別碼 ⾦金金鑰雜湊訊息鑑別碼(Keyed-hash message authentication code) ⼜又稱雜湊訊息鑑別碼 (Hash-based message authentication code)
,縮寫為HMAC) Message authentication code (MAC)
https://github.com/TakeScoop/SwiftyRSA https://github.com/krzyzanowskim/CryptoSwift Swift cryptographic algorithms library pod ‘SwiftyRSA' pod 'CryptoSwift'
憑證綁定 Certificate Pinning 正常進⾏行行 https 連線狀狀況
憑證綁定 Certificate Pinning 被中間⼈人攻擊的連線
憑證綁定 Certificate Pinning 在 App 嵌入 SSL 公鑰,進⾏行行驗證 缺點:要注意公鑰過期,或server 更更換⾦金金鑰
憑證綁定 Certificate Pinning
混淆 Obfuscation 字串串混淆
混淆 Obfuscation 字串串混淆後原始碼
混淆 Obfuscation 字串串混淆後 反編譯
混淆 Obfuscation 程式碼混淆 CodeObfuscation
混淆 Obfuscation OLLVM (Obfuscator-LLVM) https://github.com/heroims/obfuscator • 控制流程扁平化 • 指令替换 •
虚假控制流程 if-else語法,轉成do-while語法 標準⼆二元運算符(+ , – , & , | 和^) 多⼀一堆垃圾程式碼 程式碼邏輯混淆
混淆 Obfuscation • 控制流扁平化
混淆 Obfuscation • 指令替换
Recap 中間⼈人攻擊 嗅探器 訊息完整性(訊息鑑別碼) 訊息隱密性(加密) 防⽌止竄改送出資料 憑證綁定 訊息隱密性(加密) 取得SQLite /
RealM 或其他資源檔案 檔案加密
Recap 程式碼混淆 程式碼邏輯混淆 反組譯 ClassDump 記憶體修改 動態注入程式碼 環境偵測 JB檢驗 字串串混淆
保護⾦金金鑰 Keychain
MAS⾏行行動資安聯聯盟 Mobile Application Security Alliance https://www.mas.org.tw/ ⾏行行動資安檢測 收保護費 ⺠民國107年年「經濟部⼯工業局」委託「財團法⼈人資訊⼯工業策進會」並協同「中華⺠民國資訊安全學 會」為執⾏行行單位,修訂「⾏行行動應⽤用App基本資安檢測基準」、「⾏行行動應⽤用App基本資安規範」及
「⾏行行動應⽤用App基本資安⾃自主檢測推動制度」
•甲類:無需使用者身分鑑別 •乙類:需使用者身分鑑別 •丙類:含有交易行為 訂定各類別之安全要求範圍,分為三類 ⾏行行動資安檢測
⾏行行動資安檢測項⽬目 資安檢測⼩小幫⼿手:https://www.im.taichung.gov.tw/ash/Appsecurehelper.html ⾏行行動應⽤用App基本資安檢測基準V3.0 (最新版): https://www.mas.org.tw/spaw2/uploads/files/02_1_V3.0_1070803.pdf
⾏行行動資安檢測 證書
⽺羊⼩小咩@iPlayground https://www.facebook.com/lamb.mei Thank You Watching! For