Ask Us Almost Anything about Android Security, Privacy or Malware with beaups, Tim "diff" Strazzere, Joshua "jduck" Drake, and Jon "jcase" Sawyer

Tim "diff" Strazzere, Joshua "jduck" Drake, beaups (maybe) and Jon "jcase" Sawyer are here to discuss Android Security, Privacy and malware with /r/android today from 3-5pm EST.

jcase and beaups are from TheRoot.ninja, members of the team behind SunShine. Both have also been authors of numerous Android roots and unlocks. jcase has done talks with Tim at Defcon, GSMA and Qualcomm's own security summit.

Tim Strazzere is a lead research and response engineer at Lookout Mobile Security. Along with writing security software, he specializes in reverse engineering and malware analysis. Some interesting past projects include reversing the Android Market protocol, Dalvik decompilers, and memory manipulation on mobile devices. Past speaking engagements have included DEFCON, BlackHat, SyScan, HiTCON, and EICAR.

Joshua J. Drake is the Sr. Director of Platform Research and Exploitation at Zimperium Enterprise Mobile Security and lead author of the Android Hacker's Handbook. He also found numerous vulnerabilities in Android's stagefright, and completely changed the Android update ecosystem by doing so.

If we can't answer something, or we are wrong on something, please answer it for us with citations!

diff = /u/diff-t

jcase = /u/cunninglogic

jduck = /u/jduck1337

beaups = /u/HTC_Beaups

Discussions off limits:

ETAs

Requesting exploits

Requesting details about unreleased things

Requesting help developing malware

We are scheduled for questions between 3-5EST, and between 5-7EST for answers. We will probably answer questions as we see them.

257 comments · 90% upvoted · other discussions

comments

[deleted]

Which OEM's do best job patching disclosed vulns?

diff-t

BlackPhone is easily the fastest.

Though I have to give some props to Amazon as they respond very fast to things I've chatted with them about believe they handle things relatively well.

I can't speak to many other vendors as I rarely get responses, or if I do, ever see patches make it out to devices.

[deleted]

Do think it is becuase OEM's don't care about the vulns or just don't have time to deal/fix them?

diff-t

Most of my vuln hunting has occured on "low end OEMs" so I can't speak to the larger ones. In my opinion it seems like lots of vendors don't seem to care, or when trying to push updates they don't seem to express the impact to the customers downstream (think, vuln found in firmware updater by company X, they need to convince OEM and Carrier to force an update, which costs both of them money... and don't want to lose a contract they might have with them). So I never end up seeing patches downstream even though they claim to have fixed it internally.

It's also hard to get replies from some vendors, maybe they don't have security teams? Maybe they don't care? It's hard to tell. Lots of companies can see researchers as a nuisance that just cause them to have to do more work :(

CunningLogic [OP]

They all have their weaknesses, and strengths but from the ones I watch, these three (in no particular order) seem fastest at patching vulns (talking non carrier devices).

BlackPhone Samsung Motorola

[deleted]

Samsung and Blackphone I expected Motorola is a surprise. IIRC HTC has "patched" some vulns in that past while not actually fixing the problem and hence leaving the exploit open...

CunningLogic [OP]

I believe you are speaking possibly of my WeakSauce line of exploits. Yes their first attempt at patching was "improper" and did not address the problem appropriately. They checked to "ensure" we were not targetting a symlink and that the target was within the /data/data, however left it open to a path transversal that beaups pointed out to me while we were investigating their fix. We changed one line of code, and it worked again. They responded by entirely removing the function we were exploiting, as well as another vulnerable one.

[deleted]

Ah yes this what I was thinking of and this is a very thoroughly written reply; thanks!

load 2 more replies →

Zathu

What was the fastest discovery of a stupid root vulnerability you've ever come across and what was it?

diff-t

Was digging into some devices I bought off Amazon and was excited when I found a really strange one that had interesting specs. I plugged in the usb cable and was getting ready to dive head first into the device... Adb dropped directly to root without asking for device authorization... :sigh:

jduck1337

Oh my. Does this count? hehe. It certainly happens more than any of us would like :-/ Those Android TV sticks were the same way...

bmc08gt

Most knock off Chinese Android TV boxes are the same way. Amlogic.

CunningLogic [OP]

My case, considering no background research, probably the HP medfield devices. It kicked me into a shell with a debuggable ramdisk when I plugged it in when powered off. "adb root" and i had root.

Zathu

Nice. I've seen some scary stuff in the Dell medfield boot images. Such a different world than ARM.

jduck1337

grep -r boobz /proc -- OOPS?

death2all110

As its now officially 3:00PM on the east coast...

How did you get your start with finding root exploits in Android? Any resources you guys found particularly helpful?

Edit: If this is off limits I apologize. I'm not asking for an exploit or requesting help or even interested in developing malware.

CunningLogic [OP]

I was frustrated with a factory installed app that was behaving poorly, at the time no root solution was available for my phone. I looked at every open source exploit for Android I could fine, learned smali, and read every available disclosure I could find. I also bugged Dan Rosenberg often once I met him.

As a resource, I can recommend doing the same. Look at past works, and read what you can find. I can recommend two books on the subject, that both sit on book shelf:

http://www.amazon.com/Android-Security-Internals--Depth-Architecture/dp/1593275811/ref=sr_1_1?ie=UTF8&qid=1439924705&sr=8-1&keywords=android+security

http://www.amazon.com/Android-Hackers-Handbook-Joshua-Drake/dp/111860864X/ref=sr_1_2?ie=UTF8&qid=1439924705&sr=8-2&keywords=android+security

death2all110

Great thanks! What helped you learn Smali?

bmc08gt

This is a good resource: http://forum.xda-developers.com/showthread.php?t=2193735

and by matching up what the code would be in Java and following the flow of code.

diff-t

Most of us learned just through looking at it. I normally tell people who are devs to write Java then look at the smali. Since is a jasmin-style syntax it's relatively straight forward and easy to grasp - you might need to look at some opcode DOCs early on, however most things aren't too complicated.

load 1 more replies →

theixrs

how much do you get from donations and bounties per phone?

CunningLogic [OP]

Rather what is promised, so I don't even pay attention to bounties anymore.

Example, now i know a bounty existed, i dont know how much. I was one of a 3 that contributed to the LGG4 root. I ended up having to buy 3 phones, bricked one off the bat, by nuking the partition table. So $2200 there in phones. I received $237 in donations from my count. So u guess about -$1800something.

Sometimes it is better, rarely it is. Wasn't after money for the LGG4, was after some fun.

jduck1337

I started by reading and dissecting exploits that were out there at the time. These were things like GingerBreak and ZergRush... Other than that, just researching and reading all the papers/presentations I could find. There are a lot of them listed here: http://droidsec.org/wiki/

dr0id3ka

Josh (and co), thanks for doing the AMA! Really cool presentation at Black Hat, I didn't get a chance to meet you unfortunately.

After all of the media hype about Android's security being poor, how do you feel about the patches you provided to Google being shown as incorrect, or incomplete, leaving users open to further exploitation?

Thanks!

jduck1337

Thanks for the kind words. It's a tiny bit of a sore subject, but I'm not terribly bothered by it.

Regardless of what people might think, I'm human and thus am prone to making mistakes. Also, I never once said that the patches I submitted fixed all the bugs in Android, let alone Stagefright. I've always been very open about how I believe there to be many more issues and have since been proven correct in that belief. All in all, I'm thankful that the community responded so strongly. Future versions of Android will be much more secure because of the efforts of everyone involved.

_infiniteh_

This one is for /u/HTC_Beaups

How do you pronounce your handle?

Is it bee-ups, or Bopes?

CunningLogic [OP]

Please answer this, I've met the guy in person more than once and I still don't know the answer.

HTC_beaups

like ropes, but with a b

UberLaggyDarwin

Shitt. I've been pronouncing it as "beeups"

jduck1337

TIL. I'm also a BEE UPS guy

diff-t

"nopes" got it.

load 1 more replies →

[deleted]

[deleted]

HTC_beaups

bingo. My nick is loosely based on my (french) last name.

load 1 more replies →

iWizardB

I've got two questions -

  1. Now that Google is pushing for Android at workplaces, I'm sure they will try to lock it down more n more. That is, make it more difficult to unlock/root. Is that something you guys are expecting too? What's your take on it?

  2. How secure do you think fingerprint scanners are? After the HTC fiasco, do you think people should show some faith or should we wait for the tech to mature?

jduck1337
  1. Definitely expecting increased security. It's a good thing IMHO. Especially when it comes to devices like Nexus where you can root it if you want by design.

  2. I'm personally not a fan of fingerprint scanners because you simply cannot change your biometrics in the event that they get compromised. Once stolen, forever lost.

hbarSquared

Once stolen, forever lost.

This what terrifies me about biometrics as the sole security measure. Proper security needs dual-key identification, ideally picking two things from this list:

  1. Something you know (password)
  2. Something you have (dongle, RSA generation app)
  3. Something you are (biometrics)

Just using one of the three leaves you wide open to attack, but spoofing two (assuming competent implementation) is difficult.

mandrsn1

I'm personally not a fan of fingerprint scanners because you simply cannot change your biometrics in the event that they get compromised.

I like the idea of using biometrics as the ID/username rather than the password.

load 3 more replies →

CunningLogic [OP]

1) Maybe, but this isnt going to be the only driving factor. More and more people are doing banking, and sensitive non work functions on their mobile devices as well. Securing an OS is just plain smart, and good for consumers. We should have secure phones.

2) I love the one on my Galaxy S6 edge, I won't be using a phone without one again. The HTC fiasco is bad, but it also depends on local malware. Be responsible in what you install on your phone.

load 1 more replies →

bobdle

Are you excited for the upcoming permission handling that will be available in Android Marshmallow? Do you think that's going to cause more problems if users, who are not very savvy, start screwing with app permissions?

jduck1337

I'm really excited about the upcoming changes. I think they are really onto something with prompts that make sense in the context that they are needed. This is how permissions should have worked on Android since the beginning IMHO.

[deleted]

Do you own the 50+ android devices or do OEM's ship them to you like review devices?

jduck1337

I bought most of them on eBay and got some from friends/family. Very few of them were supplied by manufacturers. For some reason those large corporations are stingy with their devices!

For more information about my devices see https://www.blackhat.com/docs/us-14/materials/us-14-Drake-Researching-Android-Device-Security-With-The-Help-Of-A-Droid-Army.pdf

load 1 more replies →

HTC_beaups

It sounds like a major inconvenience to users, and thus I see people working to bypass it. But I'll reserve final judgement until official release.

[deleted]

[deleted]

CunningLogic [OP]

In my opinion, this depends entirely on the user's behavior. I don't personally, however I do for my kids, as they install lots of apps.

If you download outside the play store, apps from non major publishers, or are a (eww) pirate, you MAY need one.

zeabagsfull

What anti-virus softwares do you recommend? (All this time I'd gone and assumed Android wouldn't need one)

CunningLogic [OP]

I dont need one, I don't use one, many (most? some? alot? i dont know) dont need one.

I put one on my kids' phones, they install whatever crap they see. I know it has caught things for them, I believe it was a SMS fraud app. Its a personal choice, I use lookout on their phones because I know people there that I can bitch at if need be :P

ken27238

Follow up. What's the most common cause of non app malware?

CunningLogic [OP]

what do you mean non app malware?

ken27238

Sites, Rouge links. And the recent stagefright exploit.

diff-t

At Lookout, we've actively seen compromised sites being used to distribute malware and other malicious things. These often result in simple "drive-by" downloads which will attempt to have you download apps, though they can be odd and confusing to unsuspecting users - especially if they trusted those sites.

Ad networks are also another interesting vector (much like on the PC) which tends to confuse people. Again, most lead you to believe things or cause events to happen which might try an convince you to side load an app, however a user may have been trusting this application and not have been aware it was an AD at all.

load 1 more replies →

load 1 more replies →

load 1 more replies →

Shabaaab

Do you think having an anti-theft software is necessary on modern Android devices? Do they really make a difference? If so, which one would you objectively recommend?

CunningLogic [OP]

We located my son's Nexus 4 that was lost via one, I showed up at a trailer across town to a very surprised person to retrieve the phone. Necessary? dunno depends on you. Helpful? was for me.

ProTekk

To chime in on this, I had a time where my car was stolen with my phone left in it. /u/CunningLogic recommended a locator app that I was able to get installed OTA. In the end, was able to recover my car and phone. Never know when things will happen.

Caspid

Which one did you use?

naco_taco

I would think it is. Device Manager is pretty useful when you have internet. But what if the phone has no internet connectivity? That's why I have Cerberus, with it I can get the phone's location via SMS in case it gets stolen, and in the worst of cases, erase it.

efalk

Yeah, I know somebody who put her phone into airplane mode and had a pin code to unlock it. She left it behind in a restaurant and we couldn't figure out any way for her to get it back. Even if a good Samaritan found it, there was nothing they could have done.

load 1 more replies →

Caspid

What's next for Team Ninja?

HTC_beaups

moar s-off's

ladfrombrad

On HTC devices only, or others too?

HTC_beaups

We spend most of our time on HTC. Sometimes we get bored and research/add support for other devices.

CunningLogic [OP]

I have a rack of ribs in the smoker, so probably eating ribs for me.

[deleted]

It might be good for everyone to know: Which Android devices do you find the most secure?

CunningLogic [OP]

Android 5.x and up is particularly annoying for me to try and root, my go to tactics are often dead due to the strengthened SELinux policies. Historically, Samsung devices have been complained about by other researchers for being "hard'.

jduck1337

The latest devices with the latest updates are almost always harder to attack.

WeaponizedMeerkat

/u/jduck1337 what made you start looking at the stagefright libraries for possible exploits? Were you running static analysis tools on the code?

For all:
Google has mitigated webview vulnerabilities with the creation of the Android System WebView app. Do you think they should also do the same for the media playback frameworks?

jduck1337

I ended up in stagefright because of the name. I found it when looking around in frameworks/* of AOSP. There is a ton of code there and I don't think anyone really every reviewed any of it.

The issues I found were found by a combination of fuzzing and manual code review. I didn't use any SCA tools. Actually, I've not had a lot of luck with those in the paste either. Maybe they have improved since though!

I heard a rumor that they are strongly considering moving more components into the app-store-updatedable model in the future. Time will tell. From the time that the idea of making that change to WebView to the time it was implemented was over a year. I think I first started complaining about it in ICS and it wasn't until Lollipop that it happened (so not Jellybean, nor KitKat).

I'm a big fan of being able to update more things faster!! Update speed has a huge impact on bad guys. When's the last time you saw some Chrome exploit being exploited in the wild?!

CunningLogic [OP]

I don't think it is possible to do so for the media playback frameworks, without major push back from the OEMs. For example (as jduck pointed out to me) look at CM's implementation, these OEMs make massive and major modifications to the media playback frameworks.

The_Sexy_Cookie

As a CS student concentrating in Information Assurance and hoping to work on android security someday, what advice could you give that you wish you had when you were starting out doing this ?

jduck1337

Read everything you can get your hands on and experiment often! I'm a firm believer in applying what you learn to solidify your knowledge.

load 2 more replies →

_rs

What would you rather reverse, a binary with many small functions or one with just one function?

diff-t

I love looking at heavily obfuscated things that make my brain want to melt. It's like an old school MUD game where I need to map out things and understand (hopefully) new problems I've never come across.

With that said, it is nice when you see people leave symbol and debug code inside code which lets you completely understand the code and find issues in just a few minutes...

CunningLogic [OP]

Small, clearly defined functions.

Shabaaab

What's the toughest privacy/security challenge that you guys have had to overcome?

diff-t

Personally, treading the line of privacy/security while working for a defensive company is the hardest thing.

Most people tend to think security is (almost) never an issue. Whenever we discover or find something, it's genuinely a battle with press to keep them from overhyping it but still being interested in it. It's also a battle to make some things understandable to general audiences and still make it an approachable subject.

Just for an slight example - I can write a whitepaper on the most interesting malware I've ever seen and how complex it is. Though unless I have a TLDR with a tag line of "your nudes are stolen" or "phones blow up" it would likely never get traction. On the flip side, if I find one piece of malware that steals photos but it isn't widely distributed (because we got all the C&Cs taken down) we would be labeled as FUD and drumming up hype.

Media is weird and it's tough to be a sane voice when everyone around you wants hype. (This seems to ring true for all things that deal with media... security just has it real hard sometimes)

edit: doh, I spell well

gooz

Thanks for talking about this fine line you have to walk on when taking to media (or the general public) as a security researcher. It is something that I have noticed too in the few years that I've been doing security research as part of my PhD, and particularly when handling questions after a talk directed at a non-technical audience. To get the attention, you need to use examples such as an attacker trying to get to your Facebook messages, without limiting their thoughts (and actions) to only that particular example. The trick, it seems, is to never underestimate your audience. Most people are far more able to abstract and deduct information that is relevant to their specific situation. I tend to approach this in my talks by actively demonstrating the results of an exploit ("look at what information I was able to gather!"), causing the audience to be curious about (and even get excited about) how it was done, almost like a magic trick.

I think this (not underestimating the audience) might be true for reporting on vulnerabilities in general too, with the unfortunate exception that most media nowadays want information fast, in time to write an article about it before tomorrow (as reporters rarely get the time or resources to do all the research that is needed), thus requiring you (as a security researcher) to give very specific examples of the applicability of an exploit.

As you say, this is almost certainly true for other fields as well, though I'm sure we can do better for a field as new as computer security. In any case, I think communicating about the research to the general public is one of the most fun parts about it.

(sorry, long post typed out on my smartphone, hope it does not read too much like rambling)

CunningLogic [OP]

Ensuring that I feel my kids are safe with their mobile devices. I give them devices from OEMs (not carrier branded) that I believe will get quick updates, I also have Lookout installed on their devices, as they do download and install a lot of crap.

[deleted]

[deleted]

diff-t

(disclaimer, I work there -- see badging or bio :D )

Personally I think they can compliment each other very well. At Lookout we've been able to take some interesting approaches and have the ability to do some more interesting things as we aren't an enormous company. In my 5+ years there we've found lots of interesting things both in and outside of Google Play. While Google was still pretending/claiming nothing bad existed, we where notifying them of malicious application in the market. They've done an excellent job stepping up and protecting users as well though I'll leave you with this thought.

The bulk of our protection is based on the strength of the user base - which doesn't require the device to be a Google branded device. The bulk of Googles protection relies on the devices they are on, which are only Google branded ones. We see lots of interesting junk outside of Google branded devices much earlier than we see them on it. We also focus heavily on finding and defending users prior to those applications even reaching users devices.

TLDR; we are different beasts -- both trying to protect the ecosystem - both with strengths that can help each other.

CunningLogic [OP]

I haven't looked at any other ones in years, I know and trust many working with Lookout on a personal level. So I trust their work. In the past (years ago) I saw many doing detection based on packagename, and file name, which I found silly and flawed.

WeaponizedMeerkat

Is there anything Google can do, from a system architecture perspective, to directly push security updates or are they forever beholden to the OEM's since they like to roll their own OS's?

jduck1337

What Jon said. Also, there are carriers and more in play here. There's more to the problem than just who signs the update. OEMs typically are the only ones with the source code to build binaries for devices! Then, who runs the OTA infrastructure? See what we are up against?

WeaponizedMeerkat

So make OEM's only install binaries and limit the phones to a specific set of BSP's? I recall Motorola mentioning that they had to create over 200 variants of their patches to address Stagefright. It's a daunting task that requires every player to be on the same page.

In the end, you're just better off buying a Nexus. But, even then you're not guaranteed timely updates. Although, I could flash my old Nexus 4 with the patched ROM from Google, I'm checking to see how long it'll take them to finally release an OTA and I'm still waiting - on a pure Google Nexus, no less. Just makes me SMH sometimes.

jduck1337

A lot of the problem would go away if manufacturers didn't make a bajillion different models for more or less no reason. And why do they need to make a new phone every year? The technology underneath has basically stabilized. It's time for some longer term devices.

load 1 more replies →

load 1 more replies →

jerdog76

No question - just a comment. Great work guys and thanks for supporting the community like you do, and doing more than the community could even dream of.

Also - jcase - what's the ETA on your next bottle of wine?

Shabaaab

You're given a new android device. What are some of the must-have apps that you would install on it?

CunningLogic [OP]

Google Authenticator

Reddit Is Fun

A custom password manager

Twitter

Timely

Google Voice

epicwisdom

I wasn't even aware Reddit is Fun was being updated again. It looks much nicer than when I stopped using it. Might try it again.

load 9 more replies →

load 1 more replies →

Shabaaab

How would you say your mobile security suites compare to those of other companies, e.g. Bitdefender, avast etc.?

jduck1337

This is a strange question, but I'll bite. I'm primarily an offense guy so let me know if I get something wrong.

To my knowledge, most mobile security suites are very limited in what they can provide. They simply scan apps installed on the device or provide a rudimentary firewall.

Zimperium's zIPS product, to my knowledge, is completely different than the other tools out there. We use behavioral analysis and machine learning to differentiate between good and bad things going on. This allows us to do things such as detect previously unknown privilege escalation exploits without modifying our engine.

diff-t

Adding onto what jduck said --

Companies like zImperium and Lookout have a solid advantage, in my mind since we're "nimble start ups" (maybe I should add cloud and other buzz words here). Though, really, it's an advantage to have people who are researching and not weighed down with years of legacy tech debt or trying to fit new problems into older systems. This gives us a chance to separate from what some people might consider the "pack", though from my perspective - it makes the "incumbents" have to strive that much harder to catch up to us.

Similar to what jduck said, though specifically for Lookout, we rely on using data at scale to automate lots of interesting tasks for us - allowing the man power to focus on the next hard problem, opposed to scaling with people.

[deleted]
pyler2

What is your workstations? I mean.. PC/laptop. Brand, specs, etc. Win/Linux/OSX. If Linux, which distro? And of course.. current phone :)

Thanks for this AMA! :)

diff-t

Mac Book Pro (2013?) Lots of junk in some cloud services running ubuntu server... or some similar for heavy lifting :)

load 2 more replies →

Codename13
  1. Do you guys use custom ROMs?

  2. If so, do you use ones from the internet or do you compile your own from source?

  3. Which custom ROMs have the best security features?

Bonus question: Is security actually that much of an issue for Android? What percent of users are actually affected by or get viruses on their phones? And for experienced users, couldn't they just reboot to recovery and remove the viruses manually or does it not work that way? Thank you.

jduck1337

1) Usually not. I didn't even use CM until it shipped on the One Plus.

2) I think most sources are trustworthy, but be careful. ROMS with backdoors pre-baked in them are not unheard of.

3) I'm really excited about http://copperhead.co/ ! There have been a few others that got me excited too, but they never released :-/ I admire Blackphone's dedication to fast patching!

That's like a bonus three questions!

Security is an issue for everyone. The sheer number of users/devices in play in the Android ecosystem brings extra risk IMHO.

I couldn't give a good number for a percentage of users that get infected.

I think rebooting into safe mode or recovery is definitely one way to remove them. However, usually it's as simple as uninstalling some app.

load 3 more replies →

HangingOutHere

/u/cumminglogic Any plans on updating the TimePIN app to work with 5.1 or 6.0 or releasing the source code like you've previously mentioned you would do at one point?

[deleted]
[deleted]

load 102 more replies →