Honeypot generating blacklists for Cisco Firepower

Honeypot generating blacklists for Cisco Firepower

I will iterate through the steps of grabbing data from the log files generated by Heralding to make blacklists on the fly.

I quickly spun up an Ubuntu 16.04 LXC container on my Qnap NAS to begin some testing. I found out that the container is initialized with the user ubuntu with the password of ubuntu.

The most important prerequisite for installing Heralding is Python 3.5 or never.

After following (do this first!) this guide for installing Heralding I found the log in the same folder.

The log file is named heralding_activity.log

Now I needed to make a few things work. I know that I can not use port 80 for my webserver, serving the blacklists to Firepower so I made my own. Luckily there is a build-in one in Python.

I made a folder, called "http" in the Heralding install directory, and after that a service for the webserver to start on port 8181, just as the service in the Heralding install guide was configured.

After this I of cause restarted the daemons and made the service run at system startup.

sudo systemctl daemon-reload 

sudo systemctl enable blacklist.webserver

sudo service blacklist.webserver start

Almost done!

Now we just need to extract the IPs and put them in the "http" folder, so they are served on port 8181. I did it with a file called "update.sh" which is run automaticly with CRON. Every 30min should be fine, but for testing purposes I run it every 5 minutes.

Make note of the log file.

If you want to copy my script, go to the bottom of this article.

After a successful run we should have these files in our http folder

Global.txt contains all the unique IPs.

Add a security intelligence to your Firepower Management Center by giving it the path:

http://[IP Address]:8181/global.txt

Have fun!


If you liked this post, please click "Like" so that others can find it.

About: Dennis Perto is an enthusiastic security consultant who places great honour in genuinely humble consulting. He believes in serving the client with expert knowledge, and in not being afraid to admit when he is not the right expert anymore. He enjoys configuring Cisco Firepower for every special need.

Feel free to connect with me here on LinkedIn, and follow me on Twitter: @PertoDK


#!/bin/sh
cd /home/ubuntu/heralding/http 
echo "$(date): Updating blacklists"

echo "$(cat global.txt | wc -l) lines in honeypot global blacklist before update"

for blacklist in ftp telnet ssh http https pop3 pop3s imap imaps smtp; do
cat ../heralding_activity.log | grep $blacklist | awk -F',' '/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]/{print $4}' | sort | uniq | tee $blacklist.txt >> temp
echo "$(cat $blacklist.txt | wc -l) lines in honeypot $blacklist blacklist"
done

cat temp | sort | uniq > global.txt
echo "$(cat global.txt | wc -l) lines in honeypot global blacklist after update"
rm temp

echo "$(date): Blacklist update done"
Christiaan Verhoef

An energetic go-getter and networker who "opens doors for you to walk through" with skills in Product Design, Business development, Scrum Master, business intelligence analyst and Lab leader. Are you "the one"?

7 年

Thank you so much Dennis Perto I'm going to look into this with the team ^^.

回复
Dennis Perto

Leading engineering in the OT SOC | Public speaker | OSCP | CCNP Security | Bitcoin maximalist | OWASP Chapter Leader

7 年

Updated with a high level overview block diagram in the bottom of the article. :)

回复
Daniel Williams

Computer Psychiatrist, Network Administrator. Left field composer. Got blockchain?

7 年

I appreciate the information - and the screen shots.

要查看或添加评论,请登录

Dennis Perto的更多文章

  • Concluding on my OSCP journey

    Concluding on my OSCP journey

    Some fear the OSCP. Some see the OSCP as an entrance into the penetration testing- or even the IT Security field.

    61 条评论
  • Testing Wazuh at home

    Testing Wazuh at home

    Today I had an hour to spare and decided to test Wazuh. I have heard about OSSEC many years ago but never tried it.

    7 条评论
  • Simple drop box for full network access

    Simple drop box for full network access

    Part 2. Why, How, What, Edit C2, Edit drop box, Full access.

    6 条评论
  • Simple drop box with reverse shell

    Simple drop box with reverse shell

    Part 1. Why, How, What, Create C2, Create drop box, Got shell.

    15 条评论
  • Cisco WLC on QNAP NAS

    Cisco WLC on QNAP NAS

    For a long time I have been looking for a home lab solution for the Cisco Wireless Lan Controller. My QNAP NAS supports…

    3 条评论
  • FirePOWER 8200 and 8300 hardware specs

    FirePOWER 8200 and 8300 hardware specs

    These specs are my personal notes from working with the different appliances. Please tell me if you find any of this…

    5 条评论
  • Looking at the future of Snort

    Looking at the future of Snort

    Differences between Snort 2 and Snort 3 (dubbed Snort++) can be seen in this document on Github. The biggest difference…

    10 条评论
  • Reimage "old" Firepower appliances

    Reimage "old" Firepower appliances

    As you may already know I am working with Cisco Firepower on a daily basis. Not just the new and shiny Firepower 2100…

    15 条评论
  • SSL/TLS decryption in Cisco hardware

    SSL/TLS decryption in Cisco hardware

    I am about to write a bit about the problems with decrypting traffic both before and after the year of 2018. I will…

    16 条评论
  • Firepower Threat Defense packet processing

    Firepower Threat Defense packet processing

    Do you ever have that feeling that the documentation is not technical enough? I do. I have seen a whole bunch of…

    20 条评论

社区洞察

其他会员也浏览了