Feeding DShield with OSSEC Logs
Today, I'd like to promote a tool that I wrote four years ago and that is running every 30 minutes on my OSSEC server. DShield offers many clients to collect and process logs from multiple firewall brands/vendors. But today, more and more logs are already centralized to a SIEM. Collecting the events twice can be a pain for performance, complexity and security reasons. I'm collecting firewall logs from many devices with OSSEC so there are stored in a central place. The idea of ossec2dshield is to read the logs from OSSEC and forward them to DShield. Writing a DShield agent is easy, everything is described here. Basically, the script parses the OSSEC's firewall.log and generates the corresponding DShield events.
The script syntax is self-explanatory:
$ ossec2dshield.pl --log=file --userid=dshieldid --statefile=file --from=email --mta=hostname [--help] [--debug] [--test] [--obfuscate] [--ports=port1,port2,...] Where: --help : This help --debug : Display processing details to stdout --test : Test only, do not mail the info to dshield.org --obfuscate : Obfuscate the destination address (10.x.x.x) --ports=port1,!port2,... : Filter destination ports ex: !25,!80,445,53 --log=file : Your OSSEC firewall.log --userid=dshieldid : Your dshield.org UserID (see http://www.dshield.org) --statefile=file : File to write the state of log processing --from=email : Your e-mail address (From:) --mta=hostname : Your Mail Transfer Agent (to send mail to dshield.org)
You will need your dshield.org UserID, a mail relay (MTA). The state file is very important: it contains the timestamp of the last processed event. This prevents events to be sent twice to dshield.org. Once processed, the data will be submitted to register(at)dshield(dot)org. Using “–-port“, you can exclude or restrict to some interesting ports. Example: “–-port=’!80,!22,!443′” will report all blocked firewall traffic except for the destination ports 80, 22 and 443. The current version of the script is not so powerful as the regular Dshield clients but it works very well. Ideas and suggestions are always welcome. The script is available in my github.com repository. Happy logging!
Xavier Mertens
ISC Handler - Freelance Security Consultant
rootshell.be
truesec.be
Comments
Anonymous
Dec 3rd 2022
10 months ago
Anonymous
Dec 3rd 2022
10 months ago
<a hreaf="https://technolytical.com/">the social network</a> is described as follows because they respect your privacy and keep your data secure. The social networks are not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go.
<a hreaf="https://technolytical.com/">the social network</a> is not interested in collecting data about you. They don't care about what you're doing, or what you like. They don't want to know who you talk to, or where you go. The social networks only collect the minimum amount of information required for the service that they provide. Your personal information is kept private, and is never shared with other companies without your permission
Anonymous
Dec 26th 2022
9 months ago
Anonymous
Dec 26th 2022
9 months ago
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> nearest public toilet to me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
Anonymous
Dec 26th 2022
9 months ago
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> nearest public toilet to me</a>
<a hreaf="https://defineprogramming.com/the-public-bathroom-near-me-find-nearest-public-toilet/"> public bathroom near me</a>
Anonymous
Dec 26th 2022
9 months ago
Anonymous
Dec 26th 2022
9 months ago
https://defineprogramming.com/
Dec 26th 2022
9 months ago
distribute malware. Even if the URL listed on the ad shows a legitimate website, subsequent ad traffic can easily lead to a fake page. Different types of malware are distributed in this manner. I've seen IcedID (Bokbot), Gozi/ISFB, and various information stealers distributed through fake software websites that were provided through Google ad traffic. I submitted malicious files from this example to VirusTotal and found a low rate of detection, with some files not showing as malware at all. Additionally, domains associated with this infection frequently change. That might make it hard to detect.
https://clickercounter.org/
https://defineprogramming.com/
Dec 26th 2022
9 months ago
rthrth
Jan 2nd 2023
9 months ago