3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GHuntを使ってGmailから情報を探る

Last updated at Posted at 2023-06-07

インストール

今回はWindnws11ProのWSLで動かしているKali Linuxを使用して検証した。Pythonとブラウザーが動いている環境なら何でもいいとは思うが保証はしない。

サイト

(今回は特に参照しなくても問題ない)


pyenv でpythonの導入

GHuntを動かすにはPython3.10より新しいバージョンが動いている必要がある。
Kali Linuxをインストールしたてなのでpythonが入ってなかったのでインストールしたが、だいたいの人には必要ないと思われるので読み飛ばしてください。

pyenvの導入

sudo apt-get update
sudo apt-get install -y git
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
## 環境変数の設定
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.profile
source ~/.profile

pyenvを動かすライブラリのインストール

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl3 git

python のインストール

pyenv install -list
pyenv install 3.11.3
pyenv global 3.11.3
# python3.11環境の仮想環境を作成して有効化
python3.11 -m venv py311env
. py311env/bin/activate

ghuntのインストール

サイトに書いてあるとおりpipxでインストールする

pip3 install pipx
pipx ensurepath
pipx install ghunt
pipx ensurepath
ghunt

ghuntを使う

┌──(py311env)(kali㉿G1)-[~]
└─$ ghunt -h

     .d8888b.  888    888                   888
    d88P  Y88b 888    888                   888
    888    888 888    888                   888
    888        8888888888 888  888 88888b.  888888
    888  88888 888    888 888  888 888 "88b 888
    888    888 888    888 888  888 888  888 888
    Y88b  d88P 888    888 Y88b 888 888  888 Y88b.
     "Y8888P88 888    888  "Y88888 888  888  "Y888 v2

             By: mxrch (🐦 @mxrchreborn)
       Support my work on GitHub Sponsors ! 💖

usage: ghunt [-h] {login,email,gaia,drive} ...

positional arguments:
  {login,email,gaia,drive}
    login               Authenticate GHunt to Google.
    email               Get information on an email address.
    gaia                Get information on a Gaia ID.
    drive               Get information on a Drive file or folder.

options:
  -h, --help            show this help message and exit

ブラウザ拡張の導入

Cookieが必要だと言われるのでCookieを取得するためにブラウザにGhunt Companion 拡張機能をインストールする。

使っているブラウザに合わせて、どちらかをダウンロードする。筆者はChrome版を使った。Cookieを取得するには拡張をインストールしたブラウザにGoogleアカウントでログインしている必要があると思う。

Firefox

Chrome

Cookieの取得

拡張を開いて Synchronize to Ghunt ボタンをクリックするとVerify it's you画面が表示されるので、認証。

スクリーンショット 2023-06-07 9.08.41.png

Method 2を選ぶとクリップボードにコピーされる

スクリーンショット 2023-06-07 9.10.43.png

Cookieを貼り付けて実行

開いたGHuntで2を選択しコピーしたCookieを貼り付けるするとクレデンシャルが保存され使えることになる。

[-] No stored cookies found

You can facilitate configuring GHunt by using the GHunt Companion extension on Firefox, Chrome, Edge and Opera here :
=> https://github.com/mxrch/ghunt_companion

[1] (Companion) Put GHunt on listening mode (currently not compatible with docker)
[2] (Companion) Paste base64-encoded cookies
[3] Enter manually all cookies

Choice => 2
Paste the encoded cookies here => [ここにCookieを貼る]

[+] The cookies seems valid !

[+] Got OAuth2 token => oauth2_4/[snip]

[Connected account]
Name : you*ukezan
Email : si********a@gmail.com

ghuntを使う

ghunt email <gmailアドレス>

自分の別のgmailアドレスを入れると以下のような情報が取得された。一応多少のマスク処理を行っている。

[+] Authenticated !

[!] You have this person in these containers :
- Profile
- Contact

🙋 Google Account data

Name : 山本洋介山

[+] Custom profile picture !
=> https://lh3.googleusercontent.com/cm/AOLgnvv-vvgNUEpPzky7FPloxlmRmaI6Qija4WUk7rPYE-Q3pC1XWCRSbex55Ep1LKc
🎭 No face detected.

[-] Default cover picture

Last profile edit : 2023/03/27 20:32:29 (UTC)

Email : yo***n*@gmail.com
Gaia ID : 10127170254*****

User types :
- GOOGLE_USER (The user is a Google user.)

📞 Google Chat Extended Data

Entity Type : PERSON
Customer ID : Not found.

🌐 Google Plus Extended Data

Entreprise User : False

🎮 Play Games data

[+] New token for playgames has been generated

[-] No player profile found.

🗺️ Maps data

Profile page : https://www.google.com/maps/contrib/101271702547024314325/reviews

[-] No review.

🗓️ Calendar data

[-] No public Google Calendar.

公開されて問題あるような情報は取得できなかったが、人によっては何かあるかもしれない。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?