官术网_书友最值得收藏!

Metasploit with slack

In this section, we will learn about a module called ShellHerder. This plugin is used to monitor all Metasploit/Meterpreter sessions. It was created with a basic idea in mind: to easily monitor new incoming sessions. In a red-team activity, this is useful as it can be used to monitor live phishing campaigns or a Rubber Ducky attack.

This plugin uses session subscriptions to monitor activity and send alerts to slack. Let's take a look at how to set it up.

We clone ShellHerder and copy it to our Metasploit plugins directory using the following commands. In our case, we saved the file as notify.rb in the destination folder:

 git clone https://github.com/chrismaddalena/ShellHerder.git
cp ShellHerder/ShellHerder.rb /opt/metasploit-framework/embedded/framework/plugins/notify.rb

We will then register an account on https://slack.com.

At this point, we choose Create a new workspace and follow the instructions:

Once the account is ready and we are logged in, we should be taken to a web page which will look something like this:

From the left-side menu in the Channels tab, we add a channel, as shown in the following screenshot:

ShellHerder relies on slack's incoming Webhooks to send real-time alerts from Metasploit. So, as shown in the following screenshot, we now choose Add an application in the channel we created.

At this point, we search for an incoming Webhook app and add it. We will be redirected to the next page to configure the app. Here, we choose the channel name where we want the alerts to be posted:

Once we click on Add Incoming WebHooks integration, we will be taken to the next page where we will see the generated URL of our Webhook. We will copy this for later use and save the settings:

Now we connect to our team server and load the plugin from the console, as follows:

To configure the plugin, we run the help command:

We set the options and save the configuration using notify_save:

Running the notify_test command will show us a message on slack, as shown in the following screenshot:

Every time a new session pops up, we will get a notification on slack:

The preceding screenshot shows the connection on our Armitage. We can see a new notification message on our slack, as shown in the following screenshot:

主站蜘蛛池模板: 西贡区| 迁安市| 增城市| 中江县| 广宁县| 清镇市| 渭南市| 绥江县| 四子王旗| 奉贤区| 高清| 腾冲县| 福州市| 讷河市| 安龙县| 双牌县| 泾阳县| 明光市| 外汇| 隆林| 乌拉特前旗| 类乌齐县| 安吉县| 富阳市| 上栗县| 确山县| 老河口市| 余庆县| 吉林省| 寿光市| 舞阳县| 青铜峡市| 牟定县| 洪湖市| 天长市| 元阳县| 聊城市| 天祝| 兖州市| 巫溪县| 淮北市|