> For the complete documentation index, see [llms.txt](https://blog.s1rn3tz.ovh/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.s1rn3tz.ovh/pentest-mobile/android/stockage-de-donnees-non-securise/carte-sd.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
