A Slack webhook I created using Flask
Big shout out to Eric and everyone at Recon InfoSec
-
Linux server requirements
-
sudo apt-get update && sudo apt-get -y upgrade
-
sudo apt-get install python-pip
-
sudo pip install flask
-
sudo pip install request
-
sudo pip install requests
-
-
Add the following environmental variables:
-
export hookURL=https://hooks.slack.com/services/<yourslackwebhook>
-
export hiveURL=https://yourhiveserver.com or IP
- note: You might have to edit your
.bashrc
or.profile
to add your variables
- note: You might have to edit your
-
-
Configure your Hive server to send webhooks to Flask
-
$PROFIT
- Make sure you change your
crypto secret
on TheHive (source) - Make sure you configure SSL and a Proxy if you use in production (source)
- I used the Flask builtin development server for TESTING ONLY. Please change it if you will use this in production(source)
- I recommend Gunicorn with NGINX. You have lots of choices
- Better yet, get with the times and go serverless
- @cyberGoatPsyOps
- @eric_capuano
- And of course everyone at TheHive Project