# Carte SD

La carte SD est un stockage externe accessible pour n'importe quelle application installée sur un appareil Android. Il est donc très dangereux d'y sauvegarder des données sensibles.

Une façon simple de vérifier si des données sensible sont enregistrés dessus par une application est de faire deux snapshots de ce stockage externe,&#x20;

* Le premier avant d'ouvrir l'application en créant un fichier vide qui va servir de timestamp
  * `$  adb shell "touch /data/local/tmp/timestamp"`
* Puis un deuxième après avoir utilisé chaque fonctionnalité de l'application qui va permettre de créer un fichier output.txt contenant tous les fichiers enregistrés dans l'arborescence de `/sdcard/` depuis le timestamp précédemment créé.

```
#!/bin/bash

# SUMMARY: List all files created after the creation date of a file created in run_before

adb shell "find /sdcard/ -type f -newer /data/local/tmp/timestamp" > output.txt
adb shell "rm /data/local/tmp/timestamp"
mkdir -p new_files
while read -r line; do
  adb pull "$line" ./new_files/
done < output.txt
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.s1rn3tz.ovh/pentest-mobile/android/stockage-de-donnees-non-securise/carte-sd.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
