> 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/keyboard-press-caching.md).

# Keyboard press caching

## Description

Dans certaines applications, il arrive que celle-ci ai besoin d'enregistrer les frappes clavier pour proposer un préremplissage de l'entrée utilisateur. Cette fonctionnalité peut par exemple être utile dans le cas d'applications de messagerie. Cependant, le cache du clavier peut divulguer et faire fuiter des informations sensibles. La vulnérabilité "Mise en cache des frappes clavier" survient lorsque cette mise en cache n'est pas faite de manière sécurisé.

## Détection

### Analyse statique

#### Via le fichier de base de données

On peut retrouver le fichier de cache clavier à l'emplacement:

&#x20;`/data/data/com.android.providers.userdictionary/databases/user_dict.db`

#### Dans la balise \<EditText>

Dans la définition de mise en page d'une activité, vous pouvez définir des `TextViews` qui ont des attributs XML. Si la L'attribut XML `android:inputType` reçoit la valeur `textNoSuggestions`, le cache du clavier ne s'affichera pas lorsque le champ de saisie est sélectionné. L'utilisateur devra tout saisir à la main. Autrement, la suggestion d'autocompletion restera activé et pourra être retrouvé dans le cache.

Exemple:

```xml
<EditText
    android:id="@+id/KeyBoardCache"
    android:inputType="textNoSuggestions" 
/>
```

### Analyse dynamique

En analyse dynamique, il suffit simplement de tapper quelque chose dans un champs de l'application et regarder si des suggestions sont données.


---

# 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/keyboard-press-caching.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.
