# Insecure  Logging

## Apresentação

Todo o aplicativo gera logs, o problema é quando esses logs são gerados de forma insegura, expondo assim dados sensíveis

## Visualizando logs

Podemos visualizar o logs de duas maneiras diferentes

* XCode
* ios-deploy

Após rodar o comando para executar o app no device, ele irá capturar os logs desse aplicativo

<figure><img src="/files/Tzvo3df1cg0GTnmQqN1U" alt=""><figcaption></figcaption></figure>

Agora vamos ver os logs usando o XCode

```
Windows -> Devices and Simulators -> Devices -> Open Console

Depois só filtrar por "password"
```

<figure><img src="/files/hprQ1WshLFlOVAqPvrlg" alt=""><figcaption></figcaption></figure>

## Conclusão

O porquê isso é perigoso? Pelo fato que malwares podem monitorar esses logs e capturar credenciais.


---

# 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://vida03.gitbook.io/redteam/mobile/ios-pentest/client-side-vulnerabilities/insecure-logging.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.
