SlideShare a Scribd company logo
1 of 27
Download to read offline
Fourteenforty Research Institute, Inc.
1
Fourteenforty Research Institute, Inc.
Fourteenforty Research Institute, Inc.
株式会社 フォティーンフォティ技術研究所
http://www.fourteenforty.jp
Ver 2.00.01
続Man in the Browser
in Androidの可能性
Fourteenforty Research Institute, Inc.
2
はじめに
• この資料は、2013年2月28日に行われた「Security Days」 ナイトセッション
での発表資料を一部修正し作成したものです。
• 2012年12月ののマンスリーリサーチ「Man in the Browser in Androidの可
能性」をまだお読みでない方は、そちらをご覧になってからお読みいただく
と理解しやすいと思います。
Fourteenforty Research Institute, Inc.
• Androidマルウェアの増加
• 従来からのWindows PCマルウェアの攻撃手法の高度化
– オンラインバンクを狙ったMan in the Browser (MITB)
3
背景:Androidの普及とMan in the Browser
McAfee脅威レポート 2012年第3四半期より転載
Fourteenforty Research Institute, Inc.
• ブラウザ内に侵入して、画面を書き換える、送信されるデータを書き換え
る、パスワードを盗むなどを行う攻撃手法
• 主にオンラインバンクへのアクセスを監視、ユーザーの入力の搾取、改ざ
んを行う
• 二要素認証を用いても、正規のセッション、パスワードを攻撃時に用いる
こともできるため防げない
4
Man in the Browser (MITB)とは
画面書き換え
送受信情報書き換え
Fourteenforty Research Institute, Inc.
• Operation High Roller※
– 2012年 US、ヨーロッパを中心に行われたMITB攻撃
– 2ヵ月間で最大で20億ユーロの被害が発生(およそ2,000億円)
MITBの現状(海外)
5
※McAfeeホワイトペーパー Operation High Rollerより
Fourteenforty Research Institute, Inc.
• ZeusやSpyeyeといったツールキット
– 2012年、国内でも銀行などを対象にした攻撃が現実に起きている
• 三菱東京UFJ銀行
• 三井住友銀行
• みずほ銀行
など
MITBの現状(国内)
6
画面は http://www.bk.mufg.jp/info/phishing/ransuu.html より引用
Fourteenforty Research Institute, Inc.
スマートフォンユーザーの増加
脅威予測
7
スマートフォン上で、MITB攻撃が成立するのか
対策方法があるのか
スマートフォンによるオンラインバンク利用者の増加
Fourteenforty Research Institute, Inc.
• Android端末のブラウザに侵入
– 画面書き換え
– 送受信情報の書き換え
• 現状では現実の脅威の報告例はない
8
MITB in Android
Fourteenforty Research Institute, Inc.
• 典型的な手法
– メールなどでマルウェアをユーザーに配布、実行させる
– IEなどのブラウザプロセスのメモリを書き換え
– 特定のURLへの接続を見張る
9
MITB in Windows
Malware
Process
Browser
Process
書き換えられた画面
コードインジェクション
Fourteenforty Research Institute, Inc.
Android
Androidのセキュリティアーキテクチャ
10
ProcessA
uid = 10009
ProcessB
uid = 10112
すべてのアプリケーションが原則別ユーザーで動作
メモリ、ファイルにアクセスできない
ファイル ファイル
Fourteenforty Research Institute, Inc.
Windows
• Windowsで起きるMITBがそのままAndroidで起きるか?
– Windowsでは同じユーザーで動作させている他のプロセスのメモリを変更可能
– MITBの基本的な手法として利用
• Androidでは各プロセス(アプリ)が別ユーザーとして動いており、他のプロセスにアクセスで
きないように設計されている
• Androidマルウェアをインストールしてしまってもブラウザそのものへの影響は原則ない
11
AndroidとPC(Windows)との大きな違い
Malware
Process
Browser
Process
Android
Malware
Process
Browser
Process
Androidではマルウェアが直接ブラウザに介入することができない
Fourteenforty Research Institute, Inc.
• AndroidにおいてMITBを成功させるには?
– 相手プロセスのメモリへの侵入方法を考える
• Androidにおいて、ブラウザに介入できるとすれば、以下の4つの可能性が考
えられる
– root化端末への侵入
– Androidシステム、アプリの脆弱性
– Class Loading Hijacking脆弱性
– Browser Extension
• 今回は、下の二つについて詳しく見てみる
12
Man in the Browser in Androidの可能性
Fourteenforty Research Institute, Inc.
• Class Loadingという外部のDEXコードを読み込む機能
– ファイルなどをコードとして取り込める
• WindowsのDLL Hijackingと同様の脆弱性の可能性
• 2011年シマンテックより発表された
– http://www.symantec.com/connect/blogs/android-class-loading-
hijacking
13
Class Loading Hijacking脆弱性の利用
Fourteenforty Research Institute, Inc.
Local PC Network Dir
Windows DLL Hijacking
14
System Dir
①ファイル実行
②対応アプリ起動
Data.abc
Foo.dll
③Foo.dll?
④Foo.dll?
ネットワーク上におかれたファイルを開いたとき、
アプリケーションがFoo.dllを読み込もうとするが、
ローカルに見つからないと、ネットワーク上のものを読んでしまう。
Fourteenforty Research Institute, Inc.
• classes.dex (複数のコードのアーカイブ)を動的に読み込む
• 引数
– dexPath : 読み込むdexファイルのパス
– optimizedDirectory : 最適化適用後のodexファイルの出力パス
DexClassLoader
いずれかのパスが他アプリから書き換え可能な場合脆弱
15
Fourteenforty Research Institute, Inc.
16
Class Loading Hijacking脆弱性の利用
ProcessA Browser
DexClassLoader
dexdex
書き換え
ブラウザが読み込むdexファイルを書き換えられるとすれば、ブラウザに侵入可能
Fourteenforty Research Institute, Inc.
• Android APIのドキュメントにも注意書き
– 主要ブラウザでこのような問題を作りこんでしまう可能性は低い
– 標準ブラウザ、Chrome, Firefoxを調べた限りは現状脆弱性はない
• 対策
– システム(アプリ)のアップデート
17
Class Loading Hijacking脆弱性の利用
Fourteenforty Research Institute, Inc.
• Android版Firefoxはブラウザアドオンをサポート
– 悪意あるアドオンを導入
– 画面等を書き換えられる可能性がある
• アドオンが安全かどうか判定する明確な方法はない
• AMO(addons.mozilla.org)には、審査を通ったもののみが登録されている
• 対策としては、ウェブページなどで促されるままにAMO以外からアドオンを
導入しないこと
18
Browser Extension
Fourteenforty Research Institute, Inc.
• ユーザーが悪意あるアドオンをFirefoxにインストールしてしまった場合何
ができるのか?
– 画面の書き換え
– 情報の読み取り(パスワードなど)
– 送信データの書き換え
• 実際にどのような動きになるのか
First PoC of Firefox for Mobile MITB Addon
19
Fourteenforty Research Institute, Inc.
Firefox for Android
Addon
Addonの構造1
20
main.js
http://yahoo.co.jp/...
http://www.demo_bank.co.jp/...
特定ページ上に
JavaScriptを挿入
PageMod({
include: “*.demo_bank.co.jp/”,
contentScript:data.url(“content.js”)
});
content.js
Fourteenforty Research Institute, Inc.
Firefox for Android
Addon
Addonの構造2
21
main.js
content.js
ログイン
var button =
document.getElementsByName(‘login_button’).item(0)
button.onclick = function(){
// ここで攻撃者サーバーに情報送信
}
ユーザーID
パスワード
ログインボタンイベントの書き換え
Fourteenforty Research Institute, Inc.
デモ
22
Attackers Server
192.168.1.181
Mal Addon
1.アドオンインストール
2.オンラインバンク
ログイン
3.アドオンが
ログイン情報送信
Online Bank
Fourteenforty Research Institute, Inc.
23
最初に、悪意あるアドオンをインストール
デモ用に作成した銀行サイトにログインすると、攻撃者側に
ユーザーIDとパスワードが送信されていることがわかる。
Fourteenforty Research Institute, Inc.
• ユーザーに許可なく、悪意あるAddonをFirefoxにインストールことができる
か?
• できる場合、root化なし、ユーザーによる悪意あるアドオンのインストール
なしで、MITBが成立する
• Firefoxの脆弱性を発見(すでに報告済み)
• 悪意あるアプリ(特殊なパーミッションは必要なし)をインストール、実行す
ると、ユーザーに気づかれることなくアドオンをインストール可能
(方法の詳細は現在は公開不可)
→その結果どのようなことが起きるかは、先ほどお見せした通り。
Firefox Addon Install without User Awareness
24
Fourteenforty Research Institute, Inc.
25
今回は、APKファイルをインストール後、起動する。
その後Firefoxで、とある操作を行うが、現在は公開できないため暗転
この操作は、特別なものではなくユーザーが通常利用で行う操作
このタイミングで、悪意あるアドオンがインストールされる
Fourteenforty Research Institute, Inc.
危険度の比較(攻撃者視点)
26
Mal-Addon
のインストール
Androidマルウェアによる
Addonインストール
審査 △
(AMOによる審査)
△
(Playストアによる審査)
インストール可能性 ×
(Addonはインストール数
が少ない)
○
(Playストア、またはその他
の場所からインストールさ
れる可能性が高い)
脆弱性 ○
(脆弱性を探す必要なし)
×
(脆弱性を突く必要あり)
Fourteenforty Research Institute, Inc.
• AndroidのブラウザのMITB可能性
– 有り
– Windowsに比べるとハードル高
• root化によるリスク大
• root化されてない場合
– システムの脆弱性
– ブラウザの脆弱性
– ブラウザプラグイン
• Androidのセキュリティモデルを適切に運用できることが重要
• Androidならではの対策の難しさも(サードパーティアプリには限界がある)
• MITBに関して言えば、マルウェアを実行してしまうだけで、MITBが可能となってしまう
Windows PCを利用するよりも、Androidを利用したほうが安全?
→ 脆弱性を突かないとMITBが成功しないという点ではAndroidのほうが安全と言える
• MITB以外の、フィッシングや、偽アプリにはWindows PC同様注意が必要
27
まとめ
怪しいアプリはインストールしない!

More Related Content

Similar to Mr201302 mitb in_android_2

Androidにおける強制アクセス制御
Androidにおける強制アクセス制御Androidにおける強制アクセス制御
Androidにおける強制アクセス制御Hiromu Yakura
 
Monacaエンタープライズのご紹介
Monacaエンタープライズのご紹介Monacaエンタープライズのご紹介
Monacaエンタープライズのご紹介アシアル株式会社
 
AndroidでのAntiVirus
AndroidでのAntiVirusAndroidでのAntiVirus
AndroidでのAntiVirusShoko Araki
 
「開発者とセキュリティのお付き合い」5パターン
「開発者とセキュリティのお付き合い」5パターン「開発者とセキュリティのお付き合い」5パターン
「開発者とセキュリティのお付き合い」5パターンToshi Aizawa
 
Cocos2d js セットアップ for windows
Cocos2d js セットアップ for windowsCocos2d js セットアップ for windows
Cocos2d js セットアップ for windows健一 茂木
 
Linux daemonとsupervisordの美味しい関係
Linux daemonとsupervisordの美味しい関係Linux daemonとsupervisordの美味しい関係
Linux daemonとsupervisordの美味しい関係Kazushige TAKEUCHI
 
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!hmimura_embarcadero
 
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話
Win/Mac/Android/iOS向けクロスプラットフォーム開発にXamarinがうまくハマりそうだった話Win/Mac/Android/iOS向けクロスプラットフォーム開発にXamarinがうまくハマりそうだった話
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話Takuya Kikuchi
 
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットと SNS上での構築とその課題
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットとSNS上での構築とその課題2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットとSNS上での構築とその課題
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットと SNS上での構築とその課題Ruo Ando
 
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptxMantarohYoshinaga
 
パッチを書いてみよう(第17回Nseg勉強会LT)
パッチを書いてみよう(第17回Nseg勉強会LT)パッチを書いてみよう(第17回Nseg勉強会LT)
パッチを書いてみよう(第17回Nseg勉強会LT)Masahiro Yamada
 
クラウドセキュリティ
クラウドセキュリティクラウドセキュリティ
クラウドセキュリティsoftlayerjp
 
Microsoft Edge F12 開発者ツール
Microsoft Edge F12 開発者ツールMicrosoft Edge F12 開発者ツール
Microsoft Edge F12 開発者ツールYoshihisa Ozaki
 
[デブサミ2012]趣味と実益の脆弱性発見
[デブサミ2012]趣味と実益の脆弱性発見[デブサミ2012]趣味と実益の脆弱性発見
[デブサミ2012]趣味と実益の脆弱性発見Yosuke HASEGAWA
 
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdfソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf耕二 阿部
 
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!泰史 栃折
 
NPAPIを使ったandroid標準ブラウザの拡張方法
NPAPIを使ったandroid標準ブラウザの拡張方法NPAPIを使ったandroid標準ブラウザの拡張方法
NPAPIを使ったandroid標準ブラウザの拡張方法Naruto TAKAHASHI
 

Similar to Mr201302 mitb in_android_2 (20)

DLL読み込みの問題を読み解く
DLL読み込みの問題を読み解くDLL読み込みの問題を読み解く
DLL読み込みの問題を読み解く
 
Androidにおける強制アクセス制御
Androidにおける強制アクセス制御Androidにおける強制アクセス制御
Androidにおける強制アクセス制御
 
Monacaエンタープライズのご紹介
Monacaエンタープライズのご紹介Monacaエンタープライズのご紹介
Monacaエンタープライズのご紹介
 
AndroidでのAntiVirus
AndroidでのAntiVirusAndroidでのAntiVirus
AndroidでのAntiVirus
 
Css2013 api distance
Css2013 api distanceCss2013 api distance
Css2013 api distance
 
「開発者とセキュリティのお付き合い」5パターン
「開発者とセキュリティのお付き合い」5パターン「開発者とセキュリティのお付き合い」5パターン
「開発者とセキュリティのお付き合い」5パターン
 
Cocos2d js セットアップ for windows
Cocos2d js セットアップ for windowsCocos2d js セットアップ for windows
Cocos2d js セットアップ for windows
 
Linux daemonとsupervisordの美味しい関係
Linux daemonとsupervisordの美味しい関係Linux daemonとsupervisordの美味しい関係
Linux daemonとsupervisordの美味しい関係
 
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!
デブサミ2013 【15-B-2】iOS/Android向け開発をビジュアルに!
 
Docker で Deep Learning
Docker で Deep LearningDocker で Deep Learning
Docker で Deep Learning
 
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話
Win/Mac/Android/iOS向けクロスプラットフォーム開発にXamarinがうまくハマりそうだった話Win/Mac/Android/iOS向けクロスプラットフォーム開発にXamarinがうまくハマりそうだった話
Win/Mac/Android/iOS向け クロスプラットフォーム開発にXamarinが うまくハマりそうだった話
 
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットと SNS上での構築とその課題
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットとSNS上での構築とその課題2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットとSNS上での構築とその課題
2013年度enPiT特設講義-iisec-2013-11-09-セキュアシステムのインターネットと SNS上での構築とその課題
 
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx
渕田研究室全体ゼミ論文紹介 - 第1回 -.pptx
 
パッチを書いてみよう(第17回Nseg勉強会LT)
パッチを書いてみよう(第17回Nseg勉強会LT)パッチを書いてみよう(第17回Nseg勉強会LT)
パッチを書いてみよう(第17回Nseg勉強会LT)
 
クラウドセキュリティ
クラウドセキュリティクラウドセキュリティ
クラウドセキュリティ
 
Microsoft Edge F12 開発者ツール
Microsoft Edge F12 開発者ツールMicrosoft Edge F12 開発者ツール
Microsoft Edge F12 開発者ツール
 
[デブサミ2012]趣味と実益の脆弱性発見
[デブサミ2012]趣味と実益の脆弱性発見[デブサミ2012]趣味と実益の脆弱性発見
[デブサミ2012]趣味と実益の脆弱性発見
 
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdfソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf
ソフトウェア設計原則【SOLID】を学ぶ #2 インターフェイス分離の原則.pdf
 
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!
パーソナルデータのあり方を変える!オープンソース分散型PDS「Personium」を使ってみよう!
 
NPAPIを使ったandroid標準ブラウザの拡張方法
NPAPIを使ったandroid標準ブラウザの拡張方法NPAPIを使ったandroid標準ブラウザの拡張方法
NPAPIを使ったandroid標準ブラウザの拡張方法
 

More from FFRI, Inc.

Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMFFRI, Inc.
 
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMFFRI, Inc.
 
TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017) TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017) FFRI, Inc.
 
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...FFRI, Inc.
 
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017) An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017) FFRI, Inc.
 
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016) Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016) FFRI, Inc.
 
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)FFRI, Inc.
 
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...FFRI, Inc.
 
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)FFRI, Inc.
 
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)FFRI, Inc.
 
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7) About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7) FFRI, Inc.
 
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)FFRI, Inc.
 
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)FFRI, Inc.
 
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...FFRI, Inc.
 
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)FFRI, Inc.
 
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...FFRI, Inc.
 
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)FFRI, Inc.
 
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)FFRI, Inc.
 
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)FFRI, Inc.
 
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...FFRI, Inc.
 

More from FFRI, Inc. (20)

Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
 
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
 
TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017) TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017)
 
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
 
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017) An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
 
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016) Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
 
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
 
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
 
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
 
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)
 
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7) About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
 
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
 
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
 
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
 
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
 
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
 
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
 
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
 
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
 
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
 

Mr201302 mitb in_android_2

  • 1. Fourteenforty Research Institute, Inc. 1 Fourteenforty Research Institute, Inc. Fourteenforty Research Institute, Inc. 株式会社 フォティーンフォティ技術研究所 http://www.fourteenforty.jp Ver 2.00.01 続Man in the Browser in Androidの可能性
  • 2. Fourteenforty Research Institute, Inc. 2 はじめに • この資料は、2013年2月28日に行われた「Security Days」 ナイトセッション での発表資料を一部修正し作成したものです。 • 2012年12月ののマンスリーリサーチ「Man in the Browser in Androidの可 能性」をまだお読みでない方は、そちらをご覧になってからお読みいただく と理解しやすいと思います。
  • 3. Fourteenforty Research Institute, Inc. • Androidマルウェアの増加 • 従来からのWindows PCマルウェアの攻撃手法の高度化 – オンラインバンクを狙ったMan in the Browser (MITB) 3 背景:Androidの普及とMan in the Browser McAfee脅威レポート 2012年第3四半期より転載
  • 4. Fourteenforty Research Institute, Inc. • ブラウザ内に侵入して、画面を書き換える、送信されるデータを書き換え る、パスワードを盗むなどを行う攻撃手法 • 主にオンラインバンクへのアクセスを監視、ユーザーの入力の搾取、改ざ んを行う • 二要素認証を用いても、正規のセッション、パスワードを攻撃時に用いる こともできるため防げない 4 Man in the Browser (MITB)とは 画面書き換え 送受信情報書き換え
  • 5. Fourteenforty Research Institute, Inc. • Operation High Roller※ – 2012年 US、ヨーロッパを中心に行われたMITB攻撃 – 2ヵ月間で最大で20億ユーロの被害が発生(およそ2,000億円) MITBの現状(海外) 5 ※McAfeeホワイトペーパー Operation High Rollerより
  • 6. Fourteenforty Research Institute, Inc. • ZeusやSpyeyeといったツールキット – 2012年、国内でも銀行などを対象にした攻撃が現実に起きている • 三菱東京UFJ銀行 • 三井住友銀行 • みずほ銀行 など MITBの現状(国内) 6 画面は http://www.bk.mufg.jp/info/phishing/ransuu.html より引用
  • 7. Fourteenforty Research Institute, Inc. スマートフォンユーザーの増加 脅威予測 7 スマートフォン上で、MITB攻撃が成立するのか 対策方法があるのか スマートフォンによるオンラインバンク利用者の増加
  • 8. Fourteenforty Research Institute, Inc. • Android端末のブラウザに侵入 – 画面書き換え – 送受信情報の書き換え • 現状では現実の脅威の報告例はない 8 MITB in Android
  • 9. Fourteenforty Research Institute, Inc. • 典型的な手法 – メールなどでマルウェアをユーザーに配布、実行させる – IEなどのブラウザプロセスのメモリを書き換え – 特定のURLへの接続を見張る 9 MITB in Windows Malware Process Browser Process 書き換えられた画面 コードインジェクション
  • 10. Fourteenforty Research Institute, Inc. Android Androidのセキュリティアーキテクチャ 10 ProcessA uid = 10009 ProcessB uid = 10112 すべてのアプリケーションが原則別ユーザーで動作 メモリ、ファイルにアクセスできない ファイル ファイル
  • 11. Fourteenforty Research Institute, Inc. Windows • Windowsで起きるMITBがそのままAndroidで起きるか? – Windowsでは同じユーザーで動作させている他のプロセスのメモリを変更可能 – MITBの基本的な手法として利用 • Androidでは各プロセス(アプリ)が別ユーザーとして動いており、他のプロセスにアクセスで きないように設計されている • Androidマルウェアをインストールしてしまってもブラウザそのものへの影響は原則ない 11 AndroidとPC(Windows)との大きな違い Malware Process Browser Process Android Malware Process Browser Process Androidではマルウェアが直接ブラウザに介入することができない
  • 12. Fourteenforty Research Institute, Inc. • AndroidにおいてMITBを成功させるには? – 相手プロセスのメモリへの侵入方法を考える • Androidにおいて、ブラウザに介入できるとすれば、以下の4つの可能性が考 えられる – root化端末への侵入 – Androidシステム、アプリの脆弱性 – Class Loading Hijacking脆弱性 – Browser Extension • 今回は、下の二つについて詳しく見てみる 12 Man in the Browser in Androidの可能性
  • 13. Fourteenforty Research Institute, Inc. • Class Loadingという外部のDEXコードを読み込む機能 – ファイルなどをコードとして取り込める • WindowsのDLL Hijackingと同様の脆弱性の可能性 • 2011年シマンテックより発表された – http://www.symantec.com/connect/blogs/android-class-loading- hijacking 13 Class Loading Hijacking脆弱性の利用
  • 14. Fourteenforty Research Institute, Inc. Local PC Network Dir Windows DLL Hijacking 14 System Dir ①ファイル実行 ②対応アプリ起動 Data.abc Foo.dll ③Foo.dll? ④Foo.dll? ネットワーク上におかれたファイルを開いたとき、 アプリケーションがFoo.dllを読み込もうとするが、 ローカルに見つからないと、ネットワーク上のものを読んでしまう。
  • 15. Fourteenforty Research Institute, Inc. • classes.dex (複数のコードのアーカイブ)を動的に読み込む • 引数 – dexPath : 読み込むdexファイルのパス – optimizedDirectory : 最適化適用後のodexファイルの出力パス DexClassLoader いずれかのパスが他アプリから書き換え可能な場合脆弱 15
  • 16. Fourteenforty Research Institute, Inc. 16 Class Loading Hijacking脆弱性の利用 ProcessA Browser DexClassLoader dexdex 書き換え ブラウザが読み込むdexファイルを書き換えられるとすれば、ブラウザに侵入可能
  • 17. Fourteenforty Research Institute, Inc. • Android APIのドキュメントにも注意書き – 主要ブラウザでこのような問題を作りこんでしまう可能性は低い – 標準ブラウザ、Chrome, Firefoxを調べた限りは現状脆弱性はない • 対策 – システム(アプリ)のアップデート 17 Class Loading Hijacking脆弱性の利用
  • 18. Fourteenforty Research Institute, Inc. • Android版Firefoxはブラウザアドオンをサポート – 悪意あるアドオンを導入 – 画面等を書き換えられる可能性がある • アドオンが安全かどうか判定する明確な方法はない • AMO(addons.mozilla.org)には、審査を通ったもののみが登録されている • 対策としては、ウェブページなどで促されるままにAMO以外からアドオンを 導入しないこと 18 Browser Extension
  • 19. Fourteenforty Research Institute, Inc. • ユーザーが悪意あるアドオンをFirefoxにインストールしてしまった場合何 ができるのか? – 画面の書き換え – 情報の読み取り(パスワードなど) – 送信データの書き換え • 実際にどのような動きになるのか First PoC of Firefox for Mobile MITB Addon 19
  • 20. Fourteenforty Research Institute, Inc. Firefox for Android Addon Addonの構造1 20 main.js http://yahoo.co.jp/... http://www.demo_bank.co.jp/... 特定ページ上に JavaScriptを挿入 PageMod({ include: “*.demo_bank.co.jp/”, contentScript:data.url(“content.js”) }); content.js
  • 21. Fourteenforty Research Institute, Inc. Firefox for Android Addon Addonの構造2 21 main.js content.js ログイン var button = document.getElementsByName(‘login_button’).item(0) button.onclick = function(){ // ここで攻撃者サーバーに情報送信 } ユーザーID パスワード ログインボタンイベントの書き換え
  • 22. Fourteenforty Research Institute, Inc. デモ 22 Attackers Server 192.168.1.181 Mal Addon 1.アドオンインストール 2.オンラインバンク ログイン 3.アドオンが ログイン情報送信 Online Bank
  • 23. Fourteenforty Research Institute, Inc. 23 最初に、悪意あるアドオンをインストール デモ用に作成した銀行サイトにログインすると、攻撃者側に ユーザーIDとパスワードが送信されていることがわかる。
  • 24. Fourteenforty Research Institute, Inc. • ユーザーに許可なく、悪意あるAddonをFirefoxにインストールことができる か? • できる場合、root化なし、ユーザーによる悪意あるアドオンのインストール なしで、MITBが成立する • Firefoxの脆弱性を発見(すでに報告済み) • 悪意あるアプリ(特殊なパーミッションは必要なし)をインストール、実行す ると、ユーザーに気づかれることなくアドオンをインストール可能 (方法の詳細は現在は公開不可) →その結果どのようなことが起きるかは、先ほどお見せした通り。 Firefox Addon Install without User Awareness 24
  • 25. Fourteenforty Research Institute, Inc. 25 今回は、APKファイルをインストール後、起動する。 その後Firefoxで、とある操作を行うが、現在は公開できないため暗転 この操作は、特別なものではなくユーザーが通常利用で行う操作 このタイミングで、悪意あるアドオンがインストールされる
  • 26. Fourteenforty Research Institute, Inc. 危険度の比較(攻撃者視点) 26 Mal-Addon のインストール Androidマルウェアによる Addonインストール 審査 △ (AMOによる審査) △ (Playストアによる審査) インストール可能性 × (Addonはインストール数 が少ない) ○ (Playストア、またはその他 の場所からインストールさ れる可能性が高い) 脆弱性 ○ (脆弱性を探す必要なし) × (脆弱性を突く必要あり)
  • 27. Fourteenforty Research Institute, Inc. • AndroidのブラウザのMITB可能性 – 有り – Windowsに比べるとハードル高 • root化によるリスク大 • root化されてない場合 – システムの脆弱性 – ブラウザの脆弱性 – ブラウザプラグイン • Androidのセキュリティモデルを適切に運用できることが重要 • Androidならではの対策の難しさも(サードパーティアプリには限界がある) • MITBに関して言えば、マルウェアを実行してしまうだけで、MITBが可能となってしまう Windows PCを利用するよりも、Androidを利用したほうが安全? → 脆弱性を突かないとMITBが成功しないという点ではAndroidのほうが安全と言える • MITB以外の、フィッシングや、偽アプリにはWindows PC同様注意が必要 27 まとめ 怪しいアプリはインストールしない!