# Passwords

### Check the history first

```
history
cat .bash_history
```

### Check for passwords

{% embed url="<https://swisskyrepo.github.io/InternalAllTheThings/redteam/escalation/linux-privilege-escalation/#looting-for-passwords>" %}

<pre><code><strong>grep --color=auto -rnw '/' -ie "PASSWORD" --color=always 2> /dev/nullf
</strong><strong>find . -type f -exec grep -i -I "PASSWORD" {} /dev/null \;
</strong></code></pre>

{% hint style="info" %}
Run linPEAS if nothing shows up manually
{% endhint %}

### Right in front of us

Sometimes the path is right in front of us like a file right in the home directory. Especially in a CTF situation, enumeration on very piece of information given will lead to success... AVOID RABBIT HOLES.

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


---

# 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://pnpt.adot8.com/linux-privilege-escalation/passwords-and-file-permissions/passwords.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.
