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
Android開発でmitmproxyを使った話
Search
bigbackboom
December 18, 2018
2
1.3k
Android開発でmitmproxyを使った話
bigbackboom
December 18, 2018
Tweet
Share
More Decks by bigbackboom
See All by bigbackboom
Proto Datastoreを使う前の心構え
bigbackboom
0
80
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
2
Have A Dog in CircleCI
bigbackboom
0
13
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
44
解明!楽しいプレゼンする話すスキル
bigbackboom
0
42
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
28
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
220
Shallow Dip into Kotlin Coroutine
bigbackboom
0
160
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
0
610
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Being A Developer After 40
akosma
87
590k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
Music & Morning Musume
bryan
46
6.2k
Making Projects Easy
brettharned
116
5.9k
Fireside Chat
paigeccino
34
3.1k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Transcript
Android։ൃͰ mitmproxyΛͬͨ
Who am I? — ٠/bigbackboom — גࣜձࣾΞΠελΠϧɹ ϝσΟΞ։ൃ౷ׅ෦ ΞϓϦάϧʔϓ —
ͳΜͪΌͬͯAndroid։ൃऀ — ࠷ۙαʔόʔαΠυ Golangʹුؾத — ҟ໊ɿ͓٠ɺ٠ɺ٠͞Μ
ܦҢ — responseͷΛॻ͖͑ͯɺຊ൪ڥͰΞϓϦͷڧ੍Ξο ϓσʔτͷςετ͕͍ͨ͠ɻ — iOSCharlesΛ͑Ͱ͖Δ͕ɺAndroidʁ — CharlesͰ͍͚Δ͚ͣͩͲɺͳΜ͔httpsΩϟονͰ͖ͳ ͍Αɾɾɾ(´ŋωŋ`) —
Charles͕ͩΊͳΒଞͷΞϓϦέʔγϣϯ୳ͯ͠ΈΑ͏ʂ
mitmproxy — Charlesͱ΄΅ಉͷػೳΛఏڙ͢ΔOSS — UIίϚϯυϕʔε — WebUIʢβʣ·Ͱ͋Δʂ
ݒ೦ — ਖ਼ίϚϯυϥΠϯϕʔε͕ɾɾɾͬͨΔ͍
ͱ͍͑ɾɾɾଞʹํ๏ͳ͍
ͱΓ͋͑ͣͬͯݟΔ͖
Πϯετʔϧ $ brew install mitmproxy
ىಈ $ mitmproxy -p ϙʔτ൪߸
ΞϓϦͷ४උ 1. pcͷipΞυϨεΛϝϞ 2. AndroidΛ༻ҙͯ͠ɺઃఆʼWi-Fiͱը໘ΛભҠ 3. ଓࡁΈͷwifiΛԡ͢͠Δͱɺ"ωοτϫʔΫΛมߋ"ͷ߲͕ग़ΔͷͰλοϓ͢Δ 4. දࣔ͞ΕͨΟϯυͷ”ৄࡉઃఆ߲"ͷϓϩΩγ߲Λखಈʹมߋ͢Δ 5.
Ճදࣔ͞Ε߲ͨͷ”ϓϩΩγͷϗετ໊”ʹᶃͷipΞυϨεΛೖྗ͢Δ 6. ”ϓϩΩγϙʔτʹ”mitmproxyىಈ࣌ʹ༻ͨ͠ϙʔτ൪߸Λೖྗ 7. อଘϘλϯΛλοϓ͢Δ(*1) 8. ϒϥβΛ։͖ɺ"mitm.it"ΛΞυϨεʹೖྗ͢Δ(࣍ϖʔδը૾ࢀর) 9. ։͍ͨϖʔδͷAndroidϩΰͷϘλϯΛԡͯ͠ɺূ໌ॻΛμϯϩʔυɾΠϯετʔϧ͢Δ
None
ͦͯ͠ɾɾɾಈ͔ͯ͠ΈΔ
Https͕औΕ͍ͯͳ͍ͩͱʁ
ͦͯ͜͠ͷ ใ Λݟ͚ͭΔ "ࣗͷΞϓϦͰड͚͚ΔΑ͏ʹ͢ΔʹωοτϫʔΫɾη ΩϡϦςΟͷઃఆΛΞϓϦʹՃ͢Δඞཁ͕͋ΔΑ͏Ͱ͢ɻ"
None
ͬͯΈΑ͏ — app/src/main/res/xmlʹnetwork_security_config.xml Λ࡞ɻҎԼͷ༰Λهड़ɻ <network-security-config> <!-- ͜͜ΛೖΕͯͳ͍ͱɺຊ൪ͷڥͰڐՄΛग़ͤͪΌ͏ͷͰҙ͕ඞཁΒ͍͠ --> <debug-overrides> <trust-anchors>
<!-- Additionally trust user added CAs --> <certificates src="user" /> </trust-anchors> </debug-overrides> </network-security-config>
— AndroidManifest.xmlʹҎԼΛه <application android:networkSecurityConfig="@xml/network_security_config" > ... </application>
τϥΠΞήΠϯ
None
࣮ɾɾɾcharlesͰ͍͚ͨ Android7͔ΒcharlesͰssl௨৴͕ݟΕͳ͘ͳͬͨ݅
·ͱΊ — charlesͷଞʹແྉͷmitmproxy͕͋Δ — ͍উखݴ͏΄Ͳѱ͘ͳ͍ — Android 7Ҏ্͔Β໌ࣔతʹূ໌ॻͷڐՄΛϓϩδΣΫτ ʹઃఆ͢Δඞཁ͕͋Δ