
Google Drive をコマンド&コントロール(C2)に使用することを実証する概念実証。
このスクリプトは、Google Driveを介してデータを中継しながら、2つのソケットが通信できるようにするために使用されます。
詳細については、このブログ記事を参照してください。
pip2 install google-auth google-auth-oauthlib google-auth-httplib2 python-dateutil google-api-python-client
Usage: google_socks.py [options]
Options:
-h, --help show this help message and exit
--setup Setup script with Drive App
-c CREDS Index of creds in credentials array to use (default: 0)
-d Delete files with names provided to -s and -r
-l Enable Socket Mode: Listener
-i IP Enable Socket Mode: Connect
-p PORT Port number for socket mode (default: 8000)
-s SEND Sending channel (default: 0)
-r RECV Receiving channel (default: 1)
-P POLL Poll every x seconds (default: 0)
-j JITTER Amount of randomness in polling (default: 1.0)
-v Enable verbose output
--debug Enable debug output
できるだけ速くデータを送信する必要がある場合は、ポーリングなし(-P 0)またはジッターなし(-j 0)に設定してください。APIレート制限を超えたエラーが発生した場合は、ポーリング時間を少しずつ上げて、スイートスポットを見つけてください。私は0.2秒がうまく機能することを確認しました。