> For the complete documentation index, see [llms.txt](https://vida03.gitbook.io/redteam/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vida03.gitbook.io/redteam/mobile/ios-pentest/insecure-data-storage/dump-keychain-datas.md).

# Dump keychain datas

## Apresentação

{% hint style="info" %}
Keychain não é um tipo de dado, e sim uma ferramenta
{% endhint %}

O iPhone indica o keychain para armazenamento de dados sensíveis, como por exemplo, senhas, informações para autenticação em sites, senhas de wifi, etc.

Logo abaixo iremos ver um exemplo de dados armazenados no keychain

```
username: joaosilva
password: XyZ12345
site: minhasenha.com
information: senha de login
```

## Dump datas

Podemos pegar essas informações utilizando a ferramenta [Keychain-Dumper](https://github.com/ptoomey3/Keychain-Dumper), porém para isso precisamos ter **JailBreak** no nosso dispositivo

Faça download da ferramenta em sua máquina usando

```
# Download do keychain
git clone https://github.com/ptoomey3/Keychain-Dumper.git

# Transfira o keychain para o device
sftp root@192.168.0.1

# Dentro do ftp rode os seguintes comandos:
put keychain_dumper /tmp/keychain_dumper

# Digite a senha do iPhone
ssh root@192.168.0.1

# Dentro do ssh execute o keychain_dumper
./keychain_dumper > keychain_data.txt

```

Após isso no arquivo "keychain\_data.txt" terá os dados sensíveis armazenados no KeyChain!

## Conclusão

Com isso vimos que podemos acessar informações sensíveis facilmente.


---

# 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://vida03.gitbook.io/redteam/mobile/ios-pentest/insecure-data-storage/dump-keychain-datas.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.
