行動app安全分析與防護 - apistek測試期 app 平台 上架 app 正式 對外服務 對 應...
TRANSCRIPT
![Page 1: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/1.jpg)
行動APP安全分析與防護
果核數位技術顧問連振道 Eric
![Page 2: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/2.jpg)
Agenda
•講師介紹•APP安全分析
•APP安全防護
•結語
• 靜態分析• 外掛破解• 動態注入• 實例影片
• 防護重點• 解決辦法
![Page 3: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/3.jpg)
講師介紹
• NCTU Applied Mathematics• 6 years engineer experience• C/C++、Java、PHP、Python• Reverse Engineering• Have protected over a
hundred of Apps連振道 Eric Lien
![Page 4: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/4.jpg)
APP安全分析
![Page 5: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/5.jpg)
APKAndroid逆向助手
JD-GUIILSpy +Reflexil或dnspy
IDA-Pro
分析需要:
其他輔助工具:Root手機或手機模擬器
HxD HEX EditorDalvik Bytecode Editor
rootexploreXposed installer、Cydia substrate
Lucky Patcher….
邏輯分析能力以及一些知識(程式語言、中間語言、組合語言等)
![Page 6: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/6.jpg)
靜態分析實例:旅行青蛙
![Page 7: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/7.jpg)
不同平台流竄修改APK、破解APK
![Page 8: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/8.jpg)
Unity3D遊戲(旅行青蛙)Assembly-CSharp.dll
ILSpy
decompile
編譯 VS 反編譯
C#
IL(Intermediate Language)
CLR(Common Language Runtime)/JIT
Compile
Assemble
![Page 9: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/9.jpg)
C#程式碼
![Page 10: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/10.jpg)
1.逆向分析(中文化翻譯)
![Page 11: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/11.jpg)
修改IL code(ILspy+Reflexil)
1.
2.
![Page 12: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/12.jpg)
2.逆向分析(修改重要函數)
Before
After
![Page 13: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/13.jpg)
Trace codeLogical analysisGuessTest&Prove
1.
2.
![Page 14: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/14.jpg)
3.逆向分析(竄改本地端遊戲紀錄檔數值)
1.
2.
![Page 15: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/15.jpg)
HEX Editor
![Page 16: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/16.jpg)
4.逆向分析(國外銀行被破解root偵測)
![Page 17: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/17.jpg)
Dalvik Bytecode Editor
![Page 18: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/18.jpg)
Dalvik Bytecode Editor(修改Java程式碼中偵測root機制的回傳值)
![Page 19: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/19.jpg)
Root偵測失效
二次打包的修改APK
![Page 20: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/20.jpg)
5.通用外掛(幸運破解器Lucky Patcher)
![Page 21: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/21.jpg)
破解內購
![Page 22: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/22.jpg)
6.通用外掛(GameGuardian或燒餅修改器)
![Page 23: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/23.jpg)
修改記憶體的資料
![Page 24: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/24.jpg)
7.案例分享-動態注入攻擊
![Page 26: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/26.jpg)
駭客攻擊流程是否可以反編譯
是否可以監測記憶體
看到原始碼
放棄Or找其他
是
否 否
動態監測
是
是否可以修改
是否可以注入
放棄Or
找其他
放棄Or
找其他
攻擊成功透過SMS感染 否
否
是
是
修改成功
丟出修改包欺騙使用者造成傷害
竊取重要資料
![Page 27: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/27.jpg)
APP安全防護
![Page 28: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/28.jpg)
● 使用者如何避免惡意程序感染
避免使用免費插座
SMS簡訊網址不要亂點
聊天軟體網址不要亂點
新聞出處:新浪新聞影片連結: https://v.qq.com/x/page/s0385ej201n.html
![Page 29: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/29.jpg)
● 避免從不正常管道下載
![Page 30: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/30.jpg)
● APP 應該要的保護項目
原始碼保護
完整性校驗
防記憶體修改
儲存資料加密綁定
SO檔可保護
HTML檔可保護
![Page 31: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/31.jpg)
解決辦法
![Page 32: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/32.jpg)
● APP上線流程
APP開發期
APP內部測試期
APP平台上架
APP正式
對外服務
對應資安措施
Source code
需針對Source code 做Code Reivew。透過工具審查,可降低開發時造成的開發
錯誤。
APP安全檢驗
APP需提供給APP檢測實驗室做檢驗。
透過專業認證機構和法規,提高APP安全性
(認證實驗室)
APP相容性
APP需通過大量設備實際測試。
透過實測確定APP相容性,確保使用者不會
無法使用
APP安全性
APP需加裝安全工具。
透過APP保護工具防止APP被破解或是攻
擊
Server端
Server端需做VA、PT透過VA、PT了解
Server端的問題,降低Server端被攻擊風
險
主動式監測系統
了解客戶終端遭受什麼攻擊或問題
透過主動式監控系統了解客戶端風險,立即解決降低風險
傳輸安全
APP傳輸需要加密。透過加密傳輸
降低被中間人攻擊(HTTPS)
![Page 33: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/33.jpg)
● APP資安四大防護
防止逆向工程阻止反編譯
加密方式完全隱藏原始碼
加密技術使用AES對稱性加密演算法
金鑰長度256 bits金鑰使用白箱加密保護
分段加解密技術
阻擋Debugger防記憶體被修改
監控與防護技術避免記憶體被修改
讓Debugger工具失效
防止動態程式碼注入攻擊
完整性校驗敏感資料加密及綁定
針對APP敏感性資料做完整加密
客製化檔案加密
加密技術使用AES對稱性加密演算法
金鑰長度256 bits金鑰使用白箱加密保護
針對APP做完整性校驗確保APP是正版
計算Hash值只要被修改就閃退
防止APK被竄改和散佈
![Page 34: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/34.jpg)
●防止逆向工程阻止反編譯
保護前 保護後
1.反編譯工具完全無法使用2.原始碼完全加密隱藏3.字串完全加密隱藏4.命名完全加密隱藏
![Page 35: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/35.jpg)
●阻擋Debugger防記憶體被修改保護前 保護後
1.可被使用Debugger工具2.駭客可以任意動態追蹤
1.無法使用Debugger工具2.讓駭客無法任意動態追蹤3.讓記憶體相關的攻擊確定失效
![Page 36: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/36.jpg)
●完整性校驗
保護前 保護後
1.只要被竄改就Crash2.避免市面上出現修改包
1.市面上會出現修改包2.造成商譽損失
![Page 37: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/37.jpg)
●敏感資料加密及綁定保護前 保護後
敏感性資料未加密
SO檔未加密
敏感性資料已加密
SO檔加密,駭客工具失效
![Page 38: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/38.jpg)
保護前 保護後
APK內含資源檔已加密APK內含資源檔未加密
●敏感資料加密及綁定
![Page 39: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/39.jpg)
是否可以反編譯
是否可以監測記憶體
看到原始碼
放棄Or找其他
是
否 否
動態監測
是
是否可以修改
是否可以注入
放棄Or
找其他
放棄Or
找其他
攻擊成功
透過SMS感染
否
否
是
是
修改成功
丟出修改包欺騙使用者造成傷害
竊取重要資料
敏感資料加
密及綁定
阻擋Debugger防
記憶體被修改
防止逆向工程阻止反編譯
完整性較驗
敏感資料加
密及綁定
阻擋Debugger防
記憶體被修改
防止逆向工程阻止反編譯
完整性校驗
![Page 40: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/40.jpg)
●保護APP的安全
●避免APP被竄改或竊取
●保護公司及個人權益
![Page 41: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/41.jpg)
結語
![Page 42: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/42.jpg)
舉安全之盾,防事故之患。
![Page 43: 行動APP安全分析與防護 - Apistek測試期 APP 平台 上架 APP 正式 對外服務 對 應 資 安 措 施 Source code 需針對Source code 做Code Reivew。 透過工具審查,可降](https://reader035.vdocuments.pub/reader035/viewer/2022062318/6050076b32ef4a3c8104219c/html5/thumbnails/43.jpg)
© 2014 Digicentre Company Limited. All Rights Reserved.