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.2k
Android開発でmitmproxyを使った話
bigbackboom
December 18, 2018
Tweet
Share
More Decks by bigbackboom
See All by bigbackboom
Proto Datastoreを使う前の心構え
bigbackboom
0
71
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
1
Have A Dog in CircleCI
bigbackboom
0
8
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
42
解明!楽しいプレゼンする話すスキル
bigbackboom
0
37
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
24
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
210
Shallow Dip into Kotlin Coroutine
bigbackboom
0
150
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
0
600
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
110
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
A designer walks into a library…
pauljervisheath
204
24k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Designing for Performance
lara
604
68k
4 Signs Your Business is Dying
shpigford
180
21k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Designing the Hi-DPI Web
ddemaree
280
34k
What's new in Ruby 2.0
geeforr
343
31k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Building an army of robots
kneath
302
43k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
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Ҏ্͔Β໌ࣔతʹূ໌ॻͷڐՄΛϓϩδΣΫτ ʹઃఆ͢Δඞཁ͕͋Δ