Trustwave SpiderLabs Uncovers Unique Cybersecurity Risks in Today's Tech Landscape. Learn More

Trustwave SpiderLabs Uncovers Unique Cybersecurity Risks in Today's Tech Landscape. Learn More

Services
Capture
Managed Detection & Response

Eliminate active threats with 24/7 threat detection, investigation, and response.

twi-managed-portal-color
Co-Managed SOC (SIEM)

Maximize your SIEM investment, stop alert fatigue, and enhance your team with hybrid security operations support.

twi-briefcase-color-svg
Advisory & Diagnostics

Advance your cybersecurity program and get expert guidance where you need it most.

tw-laptop-data
Penetration Testing

Test your physical locations and IT infrastructure to shore up weaknesses before exploitation.

twi-database-color-svg
Database Security

Prevent unauthorized access and exceed compliance requirements.

twi-email-color-svg
Email Security

Stop email threats others miss and secure your organization against the #1 ransomware attack vector.

tw-officer
Digital Forensics & Incident Response

Prepare for the inevitable with 24/7 global breach response in-region and available on-site.

tw-network
Firewall & Technology Management

Mitigate risk of a cyberattack with 24/7 incident and health monitoring and the latest threat intelligence.

Solutions
BY TOPIC
Microsoft Exchange Server Attacks
Stay protected against emerging threats
Rapidly Secure New Environments
Security for rapid response situations
Securing the Cloud
Safely navigate and stay protected
Securing the IoT Landscape
Test, monitor and secure network objects
Why Trustwave
About Us
Awards and Accolades
Trustwave SpiderLabs Team
Trustwave Fusion Security Operations Platform
Trustwave Security Colony
Partners
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings
Trustwave PartnerOne Program
Join forces with Trustwave to protect against the most advance cybersecurity threats
SpiderLabs Blog

Abusing the Android Debug Bridge

The android debug bridge (or ADB for short) is a valuable tool, it is what allows smart phone tinkerers unobstructed access to their device for customization. This said, the debug bridge has a major caveat of being too easily left on, and requiring no authentication before granting access. ADB can expose your phone to anyone who can gain physical access or is on the same network.

The tools to access ADB are free to download (they are bundled with the Android SDK) and allow access to all of the commands listed here: http://developer.android.com/tools/help/adb.html

Some of the more powerful actions are:

  • Install applications onto the phone.
  • Copy files to and from the device.
  • Open an interactive shell on the device.

If you've used ADB before, you know the standard approach is to access ADB via USB. Turn on USB debugging, plug in your phone to your computer and have fun! The caveat here is, when you unplug your phone, USB debugging is not always turned back off and it is not always apparent that it has been left on. The next time you plug your phone in to a USB port, if debugging was left on you have opened your phone up for attack.

I should clarify that these settings are unique to the OS you have installed on your phone, some operating systems turn off ADB automatically when you un plug from the network or USB host while others come shipped with ADB turned on by default. To expand on this below is the status bar from three different devices showing how each operating system decided to show if ADB has been turned on:

11563_bf40136c-7c79-471b-b271-83250d9fc586

All of the above phones have debugging turned on, and are plugged in. The icon on the far left states USB is connected, and on the two top examples they also report that USB debugging is turned on/active. For those who are curious, the order of the devices are a development HTC one, Stock Motorola , and finally a rooted phone with a common customized rom.

Seems safe right? Well I have encountered no devices or roms that give you the same notice in the status bar when ADB is enabled over the network, here is the same HTC development phone's status bar with ADB over the network enabled and currently connected:

7752_074e9169-dea3-40bf-ad46-449dc653476f

 

The two most publicized attacks related to this are juice jacking and a physical drive by. Juice jacking involves setting up a malicious charging kiosk, or malware on a computer; so that when a phone or tablet has been plugged in an automated attack is initiated against the device. The physical drive by attack is when the attacker maximizes the short period of time a phone may be left unattended (such as in a public setting) in order to exfiltrate as much data as possible. With these physical drive-by attacks, it is also trivial to setup a network backdoor immediately, by setting an option that turns ADB on over the network. An attacker could plug in to your phone at a coffee shop and enable ADB over the network with a single command, that's faster than it takes you to retrieve your beverage from the counter. Once that is done, they can return to their laptop and continue the attack for as long as you remain on the coffee shop's wifi.

ADB over the network only exasperates the problem, as shown above. It may help with managing a large number of devices on a safe and secured network, but it has a severe problem: Not only is it unauthenticated full access to the phone over the network, ADB binds to every interface and IP address the device is connected to (including the cellular data network) and has no status bar notification. This places a large amount of trust that your cell provider has properly secured their cellular data network from allowing directly connecting to other devices on the data network.

How big of a threat is this really? While the payoff is immense, the likelihood someone has ADB enabled is low. An average android user typical has no reason to enable it, and it would be unlikely for a phone modder/tinkerer/hacker who is conscientious about this threat to leave it on. There is a sweet spot though; anyone who leaves this option on for convenience or by accident, and it happens. I have personally seen 2 occasions where a device had ADB turned on unbeknownst to the device's owner, when explaining this threat to people over the past year.

All you need to do to secure your phones and make sure this option is turned off this option when it's not in use. The option is in the phone's settings under the Developer menu:

8574_2fb87d28-101e-44e1-906b-a1a719f16fc9

Our TrustKeeper Scan Engine has recently been updated to include tests to detect devices with this insecure feature enabled on the network.

Latest SpiderLabs Blogs

Why We Should Probably Stop Visually Verifying Checksums

Hello there! Thanks for stopping by. Let me get straight into it and start things off with what a checksum is to be inclusive of all audiences here, from Wikipedia [1]:

Read More

Agent Tesla's New Ride: The Rise of a Novel Loader

Malware loaders, critical for deploying malware, enable threat actors to deliver and execute malicious payloads, facilitating criminal activities like data theft and ransomware. Utilizing advanced...

Read More

Evaluating Your Security Posture: Security Assessment Basics

This is Part 4 in my ongoing project to cover 30 cybersecurity topics in 30 weekly blog posts. The full series can be found here.

Read More