April 02, 2015

Automatic Malware IP Filters for NfSen


Below are my plain text notes for adding crontab based automatic malware filters in my CentOS based nfsen.

This was done with nfsen 1.3.6p1 and nfdump 1.6.6 -- i have not yet upgraded to any newer versions which may may be different.

Note that this takes into account my setup's file-structure -- yours may differ.

###############################
NFSEN NETFLOW AUTOMATED FILTERS
###############################

###############################
HOW TO
###############################
For each of the following names: "Malware-Domain-List", "Hostile_IPs", "ZeusBotNet_CC" (if you change the names, you will have to change the scripts)
Create new Profile
Group under "malware"
Description "Crontab enabled automatic filter" (and whatever other info you like to add, maybe the URLs from the scripts below)
no start date
no end date
default max size
default expire
1:1 channels
Shadow Profile
Sources: select all the sources you like.
Filter: temporarily use "not any"
[Create]
This will create a "blank" filter for each of your sources.
Now Create the following scripts, mark executable and run-once manually; Afterward, add them to crontab.
note: The *-filter.txt files (created by the gui) should be marked writable.


###############################
 ✓ root@netflow: /usr/local/nfsen/profiles-stat/malware $ find ./ -name "*.sh"
###############################
./Malware-Domain-List/import-list.sh
./Hostile_IPs/import-list.sh
./ZeusBotNet_CC/import-list.sh


###############################
✓ root@netflow: /usr/local/nfsen/profiles-stat/malware $ cat Hostile_IPs/import-list.sh
###############################
#!/bin/bash

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

cd /usr/local/nfsen/profiles-stat/malware/Hostile_IPs

printf "IP in [\n" > temp.txt
wget -qO- http://www.autoshun.org/files/shunlist.csv | tail -n +2 | awk -F, '{print $1}' >> temp.txt
printf "]\n" >> temp.txt

for f in *-filter.txt ; do
   cp temp.txt $f
done

rm temp.txt

#-rw-rw-r--. 1 apache apache *-filter.txt

###############################
 ✓ root@netflow: /usr/local/nfsen/profiles-stat/malware $ cat ./Malware-Domain-List/import-list.sh
###############################
#!/bin/bash

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

cd /usr/local/nfsen/profiles-stat/malware/Malware-Domain-List

printf "IP in [\n" > temp.txt
wget -qO- http://www.malwaredomainlist.com/hostslist/ip.txt >> temp.txt
printf "]\n" >> temp.txt

for f in *-filter.txt ; do
   cp temp.txt $f
done

rm temp.txt

#-rw-rw-r--. 1 apache apache *-filter.txt


###############################
 ✓ root@netflow: /usr/local/nfsen/profiles-stat/malware $ cat ./ZeusBotNet_CC/import-list.sh
###############################
#!/bin/bash

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

cd /usr/local/nfsen/profiles-stat/malware/ZeusBotNet_CC

printf "IP in [\n" > temp.txt
wget --no-check-certificate -qO- https://zeustracker.abuse.ch/blocklist.php?download=badips | tail -n +7  >> temp.txt
printf "]\n" >> temp.txt

for f in *-filter.txt ; do
   cp temp.txt $f
done

rm temp.txt

#-rw-rw-r--. 1 apache apache *-filter.txt


###############################
 ✓ root@netflow: /usr/local/nfsen/profiles-stat/malware $ crontab -l | tail -n 4
 ###############################
0 * * * * /usr/local/nfsen/profiles-stat/malware/Hostile_IPs/import-list.sh
0 * * * * /usr/local/nfsen/profiles-stat/malware/Malware-Domain-List/import-list.sh
0 * * * * /usr/local/nfsen/profiles-stat/malware/ZeusBotNet_CC/import-list.sh




---
As Always, Good Luck!

Please comment or tip me or use any/all of my affiliate links; Thank YOU!

You can thank me with bitcoin.    



March 21, 2015

Linux Compatible Online Taxes


After leaving MS-Windows for good I had a hell of a time doing taxes. H&R Block online almost worked, but gave me problems AND wanted to charge more for processing my K-1.

Then I found TaxAct.com -- The best experience I've had doing taxes for the third year running. They are cheap and flawless even on Linux. Don't forget to whitelist the domain on any AdBlocker or ScriptBlocker you may use.

I absolutely recommend TaxAct.com.

---
Please consider crypto tipping:
  

December 16, 2014

PepperFlash in Firefox (Debian)


UPDATE MAY 2017 : Apparently Adobe is updating NPAPI flash player for firefox again.  Erase all this specialized stuff and sudo aptitude install flashplayer-mozilla instead.

https://steronius.blogspot.com/2017/05/latest-adobe-flash-player-in-firefox.html

~~~~~~~~~~~

Linux aficionados know that Adobe suspended further development of Flash for Linux. Only updates to version 11 will be provided through 2017.

Google Chrome does however continue to update and support a special embedded version of Flash called PepperFlash which is currently at version 16.

I just discovered that PepperFlash can be used with FireFox, albeit in a circumventual way.

"Fresh Player Plugin" is the PepperFlash wrapper for Firefox by i-rinat on github. I originally found this information on Web Upd8.

It was easy to install without issue. I found that my Debian distro had a pepperflash installer in it's repo; however, installing Google Chrome will work just as well.
sudo aptitude install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install

Then I was able to install Fresh Player Plugin as per documentation:
sudo apt-get install cmake gcc g++ pkg-config ragel libasound2-dev libssl-dev libglib2.0-dev libpango1.0-dev libgl1-mesa-dev libevent-dev libgtk2.0-dev libxrandr-dev libxrender-dev libxcursor-dev libv4l-dev libgles2-mesa-dev libavcodec-dev libva-dev libvdpau-dev libdrm-dev libicu-dev

#optional:
sudo apt-get install libpulse-dev libjack-jackd2-dev libsoxr-dev

cd ~/Downloads #(or your preferred folder)
git clone https://github.com/i-rinat/freshplayerplugin.git
cd freshplayerplugin
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
make

cp libfreshwrapper-flashplayer.so ~/.mozilla/plugins/

Restart your firefox and take it for a test-run.

My FireFox reported the following using the Adobe About version check.  


To make it easier to update, I've scripted the make/install process which can be run manually on occasion, or as cronjob. If the build ever fails, i've found it best to delete the folder freshplayerplugin and re-clone it.
#!/bin/bash
cd ~/Downloads/freshplayerplugin/
git pull
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

make && cp libfreshwrapper-flashplayer.so ~/.mozilla/plugins/ && firefox "https://www.adobe.com/software/flash/about/"&


As always, Good luck!
---



Please consider crypto tipping: