> For the complete documentation index, see [llms.txt](https://ivalexev.gitbook.io/rednote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ivalexev.gitbook.io/rednote/pentesting-process/password-cracking/offline.md).

# Offline

## Identify Hash

<table><thead><tr><th width="189">Tool</th><th>Detail</th></tr></thead><tbody><tr><td><a href="https://hashcat.net/wiki/">hashcat</a></td><td><code>hashcat --identify &#x3C;HASH></code></td></tr><tr><td><a href="https://psypanda.github.io/hashID/">hashid</a></td><td><code>hashid -m -j &#x3C;HASH></code><br><code>-m</code> modes hashcat, <code>-j</code> format john</td></tr><tr><td><a href="https://github.com/blackploit/hash-identifier">hash-identifier</a></td><td><code>hash-identifier</code> <em>(inside type hash)</em></td></tr></tbody></table>

## Cracking

### [hashcat](https://hashcat.net/wiki/)

{% tabs %}
{% tab title="Usage" %}
{% code overflow="wrap" %}

```bash
hashcat -D <DEVICE> -m <TYPE> -a <ATTACKMODE> -r <RULE> <FILEtoCRACK> <WORDLIST/MASK>
```

{% endcode %}

Device: `1`=CPU, `2`=GPU\
AttackMode: `0`=[Wordlist](https://hashcat.net/wiki/doku.php?id=dictionary_attack), `3`=[BruteForce](https://hashcat.net/wiki/doku.php?id=mask_attack)\
Type: [Wiki](https://hashcat.net/wiki/doku.php?id=example_hashes)\
Rule: [Wiki](https://hashcat.net/wiki/doku.php?id=rule_based_attack) (`/usr/share/hashcat/rules`)\
Mask: [Wiki](https://hashcat.net/wiki/doku.php?id=mask_attack)

To see the results after cracking a file:

{% code overflow="wrap" %}

```bash
hashcat -m <TYPE> <FILEtoCRACK> --show
```

{% endcode %}
{% endtab %}

{% tab title="Clear" %}

```bash
rm ~/.local/share/hashcat/hashcat.potfile
```

{% endtab %}

{% tab title="Utils" %}
Very useful [**Hashcat Utils**](https://hashcat.net/wiki/doku.php?id=hashcat_utils)**.**
{% endtab %}
{% endtabs %}

### [JohnTheRipper](https://www.openwall.com/john/doc/)

{% tabs %}
{% tab title="Usage" %}
{% code overflow="wrap" %}

```bash
john --format=<FORMAT> --wordlist=<WORDLIST> --rules=<RULES> <FILEtoCrack>
```

{% endcode %}

Format: [Wiki](https://pentestmonkey.net/cheat-sheet/john-the-ripper-hash-formats)

{% code overflow="wrap" %}

```bash
john --list=formats
```

{% endcode %}

To see the results after cracking a file:

{% code overflow="wrap" %}

```bash
john --show <FILEtoCRACK>
```

{% endcode %}
{% endtab %}

{% tab title="Rule" %}
Rule: [Wiki](https://www.openwall.com/john/doc/RULES.shtml)

When your rule file is created then you have to add the name and append it to `/etc/john/john.conf`.

```
[List.Rules:<NAME_RULE>]
c $1 $3 $7 $!
c $1 $3 $7 $@
c $1 $3 $7 $#
```

{% code overflow="wrap" %}

```bash
sudo sh -c 'cat <NAME_RULE> >> /etc/john/john.conf'
```

{% endcode %}

*When rules are written: if they are on the same line divided by space then they are applied together, if they are on separate lines then a new additional word is created.*
{% endtab %}

{% tab title="Clear" %}
{% code overflow="wrap" %}

```bash
rm ~/.john/john.pot
```

{% endcode %}
{% endtab %}

{% tab title="Utils" %}
Very useful **2john**.

```bash
ls /usr/share/john/
locate *2john*
```

{% code overflow="wrap" %}

```bash
./zip2john --help
```

{% endcode %}

es. `unshadow /etc/passwd /etc/shadow > unshadowfile`
{% endtab %}
{% endtabs %}

### Other

<table><thead><tr><th width="196">Tool</th><th>Detail</th></tr></thead><tbody><tr><td><a href="https://github.com/Paradoxis/StegCracker">stegcracker</a></td><td>On hidden image files covered by passphrase.<br><code>stegcracker &#x3C;FILE> [&#x3C;WORDLIST>]</code></td></tr><tr><td><a href="https://crackstation.net/">crackstation</a></td><td>Online Password Hash Cracker</td></tr><tr><td><a href="https://github.com/Nabeelcn25/dpyAesCrypt.py">dpyAesCrypt</a></td><td>A multithreaded brute-force tool to crack .aes files encrypted using the pyAesCrypt library</td></tr></tbody></table>


---

# 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://ivalexev.gitbook.io/rednote/pentesting-process/password-cracking/offline.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.
