Login  Register

Re: [FIRMWARE] Itus Networks Shield Firmware Upgrade *WIP*

Posted by Gnomad on Sep 08, 2019; 6:23am
URL: https://itus.accessinnov.com/FIRMWARE-Itus-Networks-Shield-Firmware-Upgrade-WIP-tp1726p1878.html

All good once I `chmod`ed it to execute via `./updateblacklist.sh` as you did - not sure why it made a difference, but hey.

On Sun, 8 Sep 2019 at 14:16, Grommish [via Itus Networks Owners Forum] <[hidden email]> wrote:
Hmm.

This is my output, and I'll repost the script.  What is line 45 on you end?  Mine is a for loop.

root@OpenWrt:/etc/snort# ./updateblacklist.sh
Downloading 'https://v.firebog.net/hosts/lists.php?type=tick'
Connecting to 2606:4700:30::681b:9d83:443
Writing to 'badhosts.list'

Download completed (2396 bytes)
Downloading 'https://hosts-file.net/grm.txt'
Connecting to 107.22.171.143:443
Writing to 'badurls'
badurls              100% |*******************************| 15987   0:00:00 ETA
Download completed (15987 bytes)
Downloading 'https://reddestdream.github.io/Projects/MinimalHosts/etc/MinimalHostsBlocker/minimalhosts'
Connecting to 185.199.109.153:443
Writing to 'badurls'
badurls              100% |*******************************| 14484   0:00:00 ETA
Download completed (14484 bytes)
Downloading 'https://raw.githubusercontent.com/StevenBlack/hosts/master/data/KADhosts/hosts'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************| 95517   0:00:00 ETA
Download completed (95517 bytes)
Downloading 'https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Spam/hosts'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************|  2087   0:00:00 ETA
Download completed (2087 bytes)
Downloading 'https://v.firebog.net/hosts/static/w3kbl.txt'
Connecting to 2606:4700:30::681b:9c83:443
Writing to 'badurls'

Download completed (15674 bytes)
Downloading 'https://adaway.org/hosts.txt'
Connecting to 2606:4700:30::6818:6959:443
Writing to 'badurls'

Download completed (13722 bytes)
Downloading 'https://v.firebog.net/hosts/AdguardDNS.txt'
Connecting to 2606:4700:30::681b:9d83:443
Writing to 'badurls'

Download completed (470937 bytes)
Downloading 'https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************|  1126k  0:00:00 ETA
Download completed (1153948 bytes)
Downloading 'https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt'
Connecting to 52.216.21.125:443
Writing to 'badurls'
badurls              100% |*******************************| 43642   0:00:00 ETA
Download completed (43642 bytes)
Downloading 'https://hosts-file.net/ad_servers.txt'
Connecting to 107.22.171.143:443
Writing to 'badurls'
badurls              100% |*******************************|  1730k  0:00:00 ETA
Download completed (1772405 bytes)
Downloading 'https://v.firebog.net/hosts/Easylist.txt'
Connecting to 2606:4700:30::681b:9c83:443
Writing to 'badurls'

Download completed (29295 bytes)
Downloading 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts;showintro=0'
Connecting to 213.230.210.230:443
Writing to 'badurls'

Download completed (80999 bytes)
Downloading 'https://raw.githubusercontent.com/StevenBlack/hosts/master/data/UncheckyAds/hosts'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************|   310   0:00:00 ETA
Download completed (310 bytes)
Downloading 'https://www.squidblacklist.org/downloads/dg-ads.acl'
Connecting to 2606:4700:30::6818:6e29:443
Writing to 'badurls'
badurls              100% |*******************************| 68648   0:00:00 ETA
Download completed (68648 bytes)
Downloading 'https://v.firebog.net/hosts/Easyprivacy.txt'
Connecting to 2606:4700:30::681b:9d83:443
Writing to 'badurls'

Download completed (55357 bytes)
Downloading 'https://v.firebog.net/hosts/Prigent-Ads.txt'
Connecting to 2606:4700:30::681b:9c83:443
Writing to 'badurls'

Download completed (58749 bytes)
Downloading 'https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt'
Connecting to 35.231.145.151:443
Writing to 'badurls'
badurls              100% |*******************************|   363k  0:00:00 ETA
Download completed (372286 bytes)
Downloading 'https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.2o7Net/hosts'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************| 41949   0:00:00 ETA
Download completed (41949 bytes)
Downloading 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt'
Connecting to 151.101.184.133:443
Writing to 'badurls'
badurls              100% |*******************************| 12932   0:00:00 ETA
Download completed (12932 bytes)
Downloading 'https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt'
Connecting to 52.216.239.189:443
Writing to 'badurls'
badurls              100% |*******************************| 44181   0:00:00 ETA
Download completed (44181 bytes)
Downloading 'https://mirror1.malwaredomains.com/files/justdomains'
Connecting to 216.245.214.30:443
Writing to 'badurls'
badurls              100% |*******************************|   581k  0:00:00 ETA
Download completed (595746 bytes)
Downloading 'https://hosts-file.net/exp.txt'
Connecting to 107.22.171.143:443
Writing to 'badurls'
badurls              100% |*******************************| 44640   0:00:00 ETA
Download completed (44640 bytes)
Downloading 'https://hosts-file.net/emd.txt'
Connecting to 107.22.171.143:443
Writing to 'badurls'
badurls              100% |*******************************|  9333k  0:00:00 ETA
Download completed (9557291 bytes)
Downloading 'https://hosts-file.net/psh.txt'
Connecting to 107.22.171.143:443
Writing to 'badurls'
badurls              100% |*******************************|  6080k  0:00:00 ETA
Download completed (6226756 bytes)
Downloading 'https://mirror.cedia.org.ec/malwaredomains/immortal_domains.txt'
Connecting to 2800:68:0:bebe::3:443
Writing to 'badurls'
badurls              100% |*******************************| 50674   0:00:00 ETA
Download completed (50674 bytes)
Downloading 'https://www.malwaredomainlist.com/hostslist/hosts.txt'
Connecting to 143.215.130.61:443
Writing to 'badurls'
badurls              100% |*******************************| 35619   0:00:00 ETA
Download completed (35619 bytes)
Downloading 'https://bitbucket.org/ethanr/dns-blacklists/raw/8575c9f96e5b4a1308f2f12394abd86d0927a4a0/bad_lists/Mandiant_APT1_Repor'
Connecting to 2406:da00:ff00::6b17:d1f5:443
Writing to 'badurls'
badurls              100% |*******************************| 43844   0:00:00 ETA
Download completed (43844 bytes)
Downloading 'https://v.firebog.net/hosts/Prigent-Malware.txt'
Connecting to 2606:4700:30::681b:9d83:443
Writing to 'badurls'

Download completed (155691 bytes)
Downloading 'https://v.firebog.net/hosts/Prigent-Phishing.txt'
Connecting to 2606:4700:30::681b:9c83:443
Writing to 'badurls'

Download completed (155691 bytes)
Downloading 'https://phishing.army/download/phishing_army_blocklist_extended.txt'
Connecting to 2606:4700:30::6818:73fc:443
Writing to 'badurls'
badurls              100% |*******************************| 86056   0:00:00 ETA
Download completed (86056 bytes)
Downloading 'https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt'
Connecting to 35.231.145.151:443
Writing to 'badurls'
badurls              100% |*******************************|  4776   0:00:00 ETA
Download completed (4776 bytes)
Downloading 'https://ransomwaretracker.abuse.ch/downloads/RW_DOMBL.txt'
Connecting to 151.101.202.49:443
Writing to 'badurls'
badurls              100% |*******************************| 51699   0:00:00 ETA
Download completed (51699 bytes)
Downloading 'https://ransomwaretracker.abuse.ch/downloads/CW_C2_DOMBL.txt'
Connecting to 151.101.202.49:443
Writing to 'badurls'
badurls              100% |*******************************|  4467   0:00:00 ETA
Download completed (4467 bytes)
Downloading 'https://ransomwaretracker.abuse.ch/downloads/LY_C2_DOMBL.txt'
Connecting to 151.101.202.49:443
Writing to 'badurls'
badurls              100% |*******************************|  3957   0:00:00 ETA
Download completed (3957 bytes)
Downloading 'https://ransomwaretracker.abuse.ch/downloads/TC_C2_DOMBL.txt'
Connecting to 151.101.202.49:443
Writing to 'badurls'
badurls              100% |*******************************|  3103   0:00:00 ETA
Download completed (3103 bytes)
Downloading 'https://ransomwaretracker.abuse.ch/downloads/TL_C2_DOMBL.txt'
Connecting to 151.101.202.49:443
Writing to 'badurls'
badurls              100% |*******************************|   969   0:00:00 ETA
Download completed (969 bytes)
Downloading 'https://v.firebog.net/hosts/Shalla-mal.txt'
Connecting to 2606:4700:30::681b:9d83:443
Writing to 'badurls'

Download completed (337629 bytes)
Downloading 'https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Risk/hosts'
Connecting to 151.101.200.133:443
Writing to 'badurls'
badurls              100% |*******************************| 68892   0:00:00 ETA
Download completed (68892 bytes)
Downloading 'https://www.squidblacklist.org/downloads/dg-malicious.acl'
Connecting to 2606:4700:30::6818:6f29:443
Writing to 'badurls'
badurls              100% |*******************************|  3085k  0:00:00 ETA
Download completed (3159641 bytes)
Downloading 'https://zerodot1.gitlab.io/CoinBlockerLists/hosts'
Connecting to 35.185.44.232:443
Writing to 'badurls'
badurls              100% |*******************************|   728k  0:00:00 ETA
Download completed (745794 bytes)
Copying new host list
[784984.398142] br-lan: port 2(eth2) entered disabled state
[784984.411213] device eth1 left promiscuous mode
[784984.415787] br-lan: port 1(eth1) entered disabled state
[784984.437206] device eth0 left promiscuous mode
[784984.442008] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[784984.448039] device eth2 left promiscuous mode
[784984.452631] br-lan: port 2(eth2) entered disabled state
[784984.483802] eth2: Link down
[784984.493904] device br-lan left promiscuous mode
[784984.498917] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
[784984.612660] eth0: Link down
root@OpenWrt:/etc/snort# [784986.188041] br-lan: port 1(eth1) entered blocking state
[784986.193414] br-lan: port 1(eth1) entered disabled state
[784986.198943] device eth1 entered promiscuous mode
[784986.211981] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[784986.224593] br-lan: port 2(eth2) entered blocking state
[784986.229948] br-lan: port 2(eth2) entered disabled state
[784986.235506] device eth2 entered promiscuous mode
[784986.240331] br-lan: port 2(eth2) entered blocking state
[784986.245672] br-lan: port 2(eth2) entered forwarding state
[784986.251316] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[784986.274534] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[784987.243339] br-lan: port 2(eth2) entered disabled state
[784989.299837] eth2: 100 Mbps Full duplex, port 2, queue 2
[784989.305343] br-lan: port 2(eth2) entered blocking state
[784989.310677] br-lan: port 2(eth2) entered forwarding state
[784990.388801] eth0: 1000 Mbps Full duplex, port 0, queue 0
[784990.394270] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

root@OpenWrt:/etc/snort#

/etc/snort/updateblacklist.sh

#!/bin/bash
#
# Script designed to automate the updating of blocklists for DNS

# Create the temp directory
TEMP_DIR="/var/blacklist"

if [ ! -d /var/${TEMP_DIR} ]
then
   mkdir -p ${TEMP_DIR}
fi

cd ${TEMP_DIR}

# Create a new host file
cat << EOF > hosts
# This host file is automatically generated
# Please see /etc/snort/updateblacklist.sh for more information
127.0.0.1 localhost

::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

# YouTube ads
# TODO: Make sure these actually do anything - Untested at the moment
127.0.0.1 r1---sn-vgqsen7z.googlevideo.com
127.0.0.1 r1.sn-vgqsen7z.googlevideo.com
127.0.0.1 r17---sn-vgqsenes.googlevideo.com
127.0.0.1 r2---sn-vgqs7n7k.googlevideo.com
127.0.0.1 r20---sn-vgqs7ne7.googlevideo.com
127.0.0.1 r20.sn-vgqs7ne7.googlevideo.com
127.0.0.1 r4---sn-vgqs7nez.googlevideo.com
127.0.0.1 r4.sn-vgqs7nez.googlevideo.com
127.0.0.1 www.youtube-nocookie.com
EOF

########
# Grab the lists into one place

wget -O badhosts.list https://v.firebog.net/hosts/lists.php?type=tick
IFS=$'\n' read -d '' -r badhosts < badhosts.list
NUM_LINES=$(wc -l badhosts.list)
DL_LINES=${badhosts[@]}
for url in ${badhosts[@]}; do
   wget -O badurls $url
   cat badurls >> hosts
done

# Copy the new hosts files over
echo "Copying new host list"
mv ${TEMP_DIR}/hosts /etc/hosts
/etc/init.d/network restart
Running Itus Shield v2 Firmware



If you reply to this email, your message will be added to the discussion below:
http://itus.accessinnov.com/FIRMWARE-Itus-Networks-Shield-Firmware-Upgrade-WIP-tp1726p1877.html
To unsubscribe from [FIRMWARE] Itus Networks Shield Firmware Upgrade *WIP*, click here.
NAML
OpenWrt SNAPSHOT, r10391-3d8d528939