Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Your App is a Giant DDOS Botnet and Other Reaso...
Search
Sanae Rosen
November 30, 2018
Technology
65
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Your App is a Giant DDOS Botnet and Other Reasons to Manage and Monitor Your Network Traffic
Presented at Droidcon SF 2018
Sanae Rosen
November 30, 2018
Other Decks in Technology
See All in Technology
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
5
1.3k
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
930
React改造してみた
tsukina_7mochi
0
120
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
170
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
170
大型犬好きによるPugの紹介
yamanoku
1
160
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
200
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
360
DGX Spark でどこまでハッキングができるのか?
kash1064
3
1.4k
AIがコードを書く時代に、エンジニアは何で自分の価値を証明するのか / In an era where AI writes code how do engineers prove their value
carta_engineering
3
1.1k
Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
1
770
Featured
See All Featured
Designing for Timeless Needs
cassininazir
1
530
Faster Mobile Websites
deanohume
310
32k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
930
How to train your dragon (web standard)
notwaldorf
96
6.9k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
For a Future-Friendly Web
brad_frost
184
10k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
460
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Transcript
Sanae Rosen
[email protected]
Your App is a Giant DDOS Botnet
and Other Reasons to Manage and Monitor Your Network Traffic
Sanae Rosen Since early 2017: Software Engineer, Core Android team
PhD related to mobile networking About me
Yelp’s Mission Connecting people with great local businesses.
None
None
What if we log all 5xx server errors? What if
we retry all failed analytics?
/analytics 500
/analytics 500
/analytics 500
None
There are many more problems with mobile traffic...
None
https://www.theverge.com/2018/10/22/18011028/google-news-app- bug-background-data-overage-charge
Android device fragmentation (2014) (https://opensignal.com/reports/2014/android-fragmentation/)
None
I’m totally a VPN and you should definitely install me!
None
None
None
What about experiments? Feature 1 Experiment 1 Experiment server: Experiment
1: on Experiment 2: on Feature 2 Experiment 2 The app Main server
What about experiments? Feature 1 Experiment 1 Experiment server: Experiment
1: on Experiment 2: off Feature 2 Experiment 2 The app Main server
What about experiments? • What if experiments break? • What
if you forget to use an experiment? • What about infrastructure problems?
Do we even need to fix this problem?
Our solution Shut off bad traffic Monitor network traffic
Part 1: shut off bad network traffic
Feature 1 Experiment 1 Experiment server Feature 2 The app
Main server Network monitor
OkHttp Interceptors
class TrafficMonitorInterceptor( val monitor: NetworkMonitor ) : Interceptor { override
fun intercept(chain: Chain): Response { val request = chain.request() monitor.record(request) if (monitor.shouldDropRequest(request)) { return monitor.generateErrorResponse() } val response = chain.proceed(request) monitor.record(response) return response } }
class TrafficMonitorInterceptor( val monitor: NetworkMonitor ) : Interceptor { override
fun intercept(chain: Chain): Response { val request = chain.request() monitor.record(request) if (monitor.shouldDropRequest(request)) { return monitor.generateErrorResponse() } val response = chain.proceed(request) monitor.record(response) return response } }
class TrafficMonitorInterceptor( val monitor: NetworkMonitor ) : Interceptor { override
fun intercept(chain: Chain): Response { val request = chain.request() monitor.record(request) if (monitor.shouldDropRequest(request)) { return monitor.generateErrorResponse() } val response = chain.proceed(request) monitor.record(response) return response } }
class TrafficMonitorInterceptor( val monitor: NetworkMonitor ) : Interceptor { override
fun intercept(chain: Chain): Response { val request = chain.request() monitor.record(request) if (monitor.shouldDropRequest(request)) { return monitor.generateErrorResponse() } val response = chain.proceed(request) monitor.record(response) return response } }
class TrafficMonitorInterceptor( val monitor: NetworkMonitor ) : Interceptor { override
fun intercept(chain: Chain): Response { val request = chain.request() monitor.record(request) if (monitor.shouldDropRequest(request)) { return monitor.generateErrorResponse() } val response = chain.proceed(request) monitor.record(response) return response } } Look! Kotlin!
Idea 1: Do it like experiments How to turn endpoints
off? Network monitor server Endpoint 1: on Endpoint 2: off The app Main server Network monitor Network monitor server Endpoint 1: on Endpoint 2: off
Idea 1: Do it like experiments • What if the
network monitor server goes down? • High complexity How to turn endpoints off? Network monitor server Endpoint 1: on Endpoint 2: off The app Main server Network monitor Network monitor server Endpoint 1: on Endpoint 2: off
Our actual solution Feature The app CDN Main server Network
monitor
Our actual solution Feature The app 555 error code Network
monitor CDN Main server
Feature The app Network monitor Our actual solution CDN Main
server
Main server Can be endpoint-specific too Endpoint 1 The app
CDN Network monitor 556 error code Network monitor Endpoint 2
Network monitor Can be endpoint-specific too Endpoint 1 The app
Main server Endpoint 2 CDN
Retries Bad timers: 10 min Good timers: ~10 min
Persistence 555
Persistence 555 No persistence: Persistence: 555
Stage 2: the network monitor https://www.networkworld.com/article/3237944/lan-wan/network-verification-predicting-the-future-of-complex-networks.html https://dumielauxepices.net/monitor-lizard-clipart/monitor-lizard-clipart-transparent-background
• What about the subtler problems? ◦ Only slightly bad
data usage ◦ Problems with only a few devices Stage 2: the network monitor
Stage 2: the network monitor Feature 1 Experiment server Feature
2 The app Main server Network monitor
Stage 2: the network monitor Network logs Feature 1 Experiment
server Feature 2 The app Main server Network monitor
Stage 2: the network monitor Network controller and monitor Data:
0 kb Network requests: 0 Time: 0 min
Stage 2: the network monitor 2 kb Network controller and
monitor Data: 2 kb Network requests: 1 Time: 4 min
Stage 2: the network monitor 4 kb Network controller and
monitor Data: 6 kb Network requests: 2 Time: 7 min
Stage 2: the network monitor Network controller and monitor Data:
6 kb Network requests: 2 Time: 10 min
Stage 2: the network monitor Data: 6 kB Network requests:
2 Time: 10 Network controller and monitor Data: 0 kb Network requests: 0 Time: 0 min
• Can also flag high traffic in the outgoing logs
◦ Based on a per-endpoint config • “Endpoint” is a fairly flexible concept - can track related endpoints together Other details
Problem 2: How cellular networks work Network traffic energy Tail
timer #1 Tail timer #2 Time Energy Time Energy Periodic traffic Batched traffic
Piggyback logs on other requests 10 minutes Logs not quite
accurate, but no problem to detect Network traffic Logs sent 10 minutes Logs accurate, and something’s gone wrong Network traffic Logs sent
Use case: too much data (for one user)
Release monitoring
Alerting
• Coming before droidcon soon! • Set up so you
can extend it to be compatible with things other than okhttp Next steps: Open source
None
www.yelp.com/careers/ We're Hiring!
@YelpEngineering fb.com/YelpEngineers engineeringblog.yelp.com github.com/yelp
@YelpEngineering fb.com/YelpEngineers engineeringblog.yelp.com github.com/yelp https://github.com/Yelp/ kotlin-android-workshop