
Vthunting एक छोटी स्क्रिप्ट है जो वायरस टोटल हंटिंग के बारे में रिपोर्ट तैयार करने और उसे ईमेल, स्लैक या टेलीग्राम द्वारा भेजने के लिए उपयोग की जाती है।
VThunting अब VirusTotal पर फीचर्ड है।
Virus Total Hunting एक छोटा सा टूल है जो VT API वर्जन 3 पर आधारित है, जो मैलवेयर हंटिंग के बारे में दैनिक, साप्ताहिक या मासिक रिपोर्ट चलाने के लिए है। रिपोर्ट को ईमेल, स्लैक चैनल या टेलीग्राम के माध्यम से भेजा जा सकता है। टूल को CLI में भी इस्तेमाल किया जा सकता है ताकि कभी भी रिपोर्ट प्राप्त की जा सके। परिणामों की डिफ़ॉल्ट संख्या 10 है, लेकिन इसे कॉन्फ़िग भाग में बढ़ाया या घटाया जा सकता है। यह टूल केवल Virus Total Intelligence API के साथ काम करता है।
नीचे दिया गया अंश उत्पन्न रिपोर्ट का एक उदाहरण है।
__ _______ _ _ _ _
\ \ / /_ _| | | | |_ _ _ __ | |_(_)_ __ __ _
\ \ / / | | | |_| | | | | '_ \| __| | '_ \ / _` |
\ V / | | | _ | |_| | | | | |_| | | | | (_| |
\_/ |_| |_| |_|\__,_|_| |_|\__|_|_| |_|\__, |
|___/
McAfee ATR | Thomas Roccia | @fr0gger_
Get latest hunting notification from VirusTotal
Latest report from 2018-12-24 10:20:30.158831
-------------------------------------------------------------------------------------
Rule name: FancyBear_ComputraceAgent
Match date: 2018-12-24 17:38:17
SHA256: f5157e5b8afe1f79f29c947449477d13ede3d7341699256e62966474a7ee1eb5
Tags: [apt28, fancybear_computraceagent]
-------------------------------------------------------------------------------------
Rule name: Winexe_RemoteExecution
Match date: 2018-12-24 15:01:15
SHA256: 1e194647c05b0068c31cd443b5bcacc2dd41799e5d21a40e0c58adbad01c28c6
Tags: [winexe_remoteexecution, apt28]
-------------------------------------------------------------------------------------
Rule name: hatman_compiled_python: hatman
Match date: 2018-12-24 00:28:21
SHA256: 14c64fc93ae68f01989db992bf8ee47ffd33edf66223b84f3fae52f9a843a03f
Tags: [triton, hatman, hatman_compiled_python]
-------------------------------------------------------------------------------------
Rule name: Stuxnet_unpacked
Match date: 2018-12-24 15:00:00
SHA256: 86b05279bf4930ffc0c00e4fd22c8ab9e964e8d45d39bfca42e129b95dc33481
Tags: [stuxnet, stuxnet_unpacked]
-------------------------------------------------------------------------------------
Rule name: Stuxnet
Match date: 2018-12-24 14:59:59
SHA256: 86b05279bf4930ffc0c00e4fd22c8ab9e964e8d45d39bfca42e129b95dc33481
Tags: [stuxnet]
-------------------------------------------------------------------------------------
[truncated]
बस स्क्रिप्ट डाउनलोड करें:
git clone https://github.com/fr0gger/vthunting
फिर अपनी API कुंजियों और जानकारी के साथ कॉन्फ़िग भाग को कॉन्फ़िगर करें:
# Virus Total API
VTAPI = "<API_KEY>"
number_of_result = "" # 10 by default
# Email configuration
smtp_serv = "<SMTP_SERV>"
smtp_port = ""
gmail_login = "<EMAIL>"
gmail_pass = "<APP_PASS>" # pass from APP
gmail_dest = "<DEST_EMAIL>"
# Slack Bot config
SLACK_BOT_TOKEN = "<API>"
SLACK_CHANNEL = "<SLACK_CHANNEL>"
# Telegram Bot config
TOKEN = "<API>"
chat_id = "<CHAT_ID>"
# Microsoft Teams Bot config
TEAMS_CHANNEL_WEBHOOK = ""
एक बार कॉन्फ़िग तैयार हो जाने पर आप फ़ाइल को इसके साथ चला सकते हैं:
python vthunting.py --help
usage: vthunting.py [OPTION]
-h, --help Print this help
-r, --report Print the VT hunting report
-s, --slack_report Send the report to a Slack channel
-e, --email_report Send the report by email
-t, --telegram_report Send the report to Telegram
-m, --teams_report Send the report to Microsoft Teams
-j, --json Get full JSON report
आपको पहले आवश्यकता स्थापित करनी होगी:
pip install -r requirements.txt
Virus Total से अपनी API कुंजी प्राप्त करें। https://developers.virustotal.com/v3.0/reference
ऐप बनाने के लिए आप यहां दस्तावेज़ पा सकते हैं: https://support.google.com/accounts/answer/185833
टोकन जनरेट करने के लिए आपको यहां जाना होगा और चरण का पालन करना होगा: https://api.slack.com/custom-integrations/legacy-tokens
टोकन प्राप्त करने के लिए आपको @BotFather से बात करके एक टेलीग्राम बॉट बनाना होगा, यह आपके बॉट को कॉन्फ़िगर करने और आपका टोकन प्राप्त करने में मदद करेगा। एक बार आपको अपना टोकन मिल जाए, तो चैनल आईडी प्राप्त करने के लिए https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates पर जाएं।
उस माइक्रोसॉफ्ट टीम्स चैनल में एक वेबहुक कनेक्टर जोड़ें जहाँ आप रिपोर्ट प्राप्त करना चाहते हैं। https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using#setting-up-a-custom-incoming-webhook
यदि आप इस स्क्रिप्ट को कहीं भी एक्सेस करना चाहते हैं तो आप इसे बिना एक्सटेंशन के यहां कॉपी कर सकते हैं:
cp vthunting.py /usr/local/bin/vthunting
आप स्क्रिप्ट चलाने और समय-समय पर रिपोर्ट प्राप्त करने के लिए crontab का उपयोग कर सकते हैं।
crontab -e
नीचे प्रतिदिन सुबह 10:15 बजे रिपोर्ट प्राप्त करने का एक उदाहरण दिया गया है।
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user command to be executed
15 10 * * * /usr/local/bin/vthunting -r -t -e -s >> vthunt.log
रिपोजिटरी को क्लोन करें और स्क्रिप्ट में रिपोर्टिंग के लिए अपना API कॉन्फ़िगर करें। Dockerfile में अपना VirusTotal API जोड़ें।
फिर निम्नलिखित कमांड चलाएँ:
# Build the container
docker build -t vthunting:latest .
# run the script:
docker run -t vthunting -r
This project is licensed under the MIT License - see the LICENSE.md file for details