
Bluewall ist ein Firewall-Framework, das für offensive und defensive Cyber-Profis entwickelt wurde.

Bluewall ist ein Firewall-Framework, das für offensive und defensive Cybersicherheitsexperten entwickelt wurde. Dieses Framework ermöglicht es Cybersicherheitsexperten, ihre Umgebung schnell einzurichten, während sie innerhalb ihres Umfangs bleiben.
Inspiriert von Andrew Bensons hostfw iptable-Generierungsskript.
* Firewall konfigurieren
* Hostname konfigurieren
* Schnittstelle(n) konfigurieren
* Redhat/CentOS
* Windows-Konfiguration kann generiert, aber nicht ausgeführt werden.
* bluewall -c config/example.ini
** Siehe Beispielkonfiguration
* Enumerate – Identifizieren Sie live Hosts in Ihrem Netzwerk (bald verfügbar)
* Target Host – Ausgehende Kommunikation
* Trusted Host – Bidirektionale Kommunikation
* No Strike – Geräte, mit denen Ihr Computer nicht kommunizieren soll
# FÜR PYTHON 2.x GEB AUT
sudo python setup.py install
sudo bluewall -h (für Hilfe)
# Einrichten der Umgebung mit Konfiguration
sudo bluewall -c config/hostconfig.ini
# Optionale Windows-Konfiguration exportieren
sudo bluewall -c config/hostconfig.ini -w autoconfig.ps1
# Weitere eingehende Hosts oder Bereiche hinzufügen
sudo bluewall -ih 192.168.0.3,192.168.1.0/24
# Host von Kommunikation ausschließen
sudo bluewall -eh 192.168.1.1
# Super einfacher Assistentenmodus
sudo bluewall --wizard
usage: bluewall [-h] [-V] [-v] [-r] [-p] [-i] [-d] [-w WINDOWS_CONFIG]
[-ot TCP_PORTS_OUT] [-ou UDP_PORTS_OUT] [-it TCP_PORTS_IN]
[-iu UDP_PORTS_IN] [-oh OUTBOUND_HOSTS] [-ih INBOUND_HOSTS]
[-eh EXCLUDE_HOSTS] [-l] [-s] [-q] [-D] [-A] [-F] [-S] [-c CONFIG]
[--info]
/////////////////////////////////////////////////////
| _____ __ _____ _____ _ _ _ _____ __ __ |
| | __ | | | | | __| | | | - | | | | |
| | __-| |__| | | __| | | | | |__| |__ |
| |_____|_____|_____|_____|_____|__|__|_____|_____| |
| |
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ein Python-Framework zur Automatisierung der Firewall-Einrichtung.
Standardeinstellungen:
Ausgehende Verbindungen sind auf allen Ports zu allen Hosts erlaubt.
Eingehende Verbindungen werden auf zugehörigen ausgehenden Datenverkehr beschränkt.
DHCP ist aktiviert.
Ping-Antworten sind aktiviert.
Unaufgeforderte eingehende Verbindungen werden verworfen.
optionale Argumente:
-h, --help Diese Hilfemeldung anzeigen und beenden
-V, --version Version anzeigen
-v, --verbose Ausführlicher Modus
-r, --reset TCP RST senden anstatt Paket zu verwerfen.
-p, --disallow_ping Eingehenden PING verbieten
-i, --allow_outbound_icmp
ICMP-Typen nicht einschränken
-d, --disallow_dhcp DHCP verbieten
-w WINDOWS_CONFIG, --windows_config WINDOWS_CONFIG
Windows-Konfiguration generieren. Verwendung: bluewall -w
config.ps1
-ot TCP_PORTS_OUT, --tcp_ports_out TCP_PORTS_OUT
Kommagetrennte Liste erlaubter TCP-Ports ausgehend
-ou UDP_PORTS_OUT, --udp_ports_out UDP_PORTS_OUT
Kommagetrennte Liste erlaubter UDP-Ports ausgehend
-it TCP_PORTS_IN, --tcp_ports_in TCP_PORTS_IN
Kommagetrennte Liste erlaubter TCP-Ports eingehend
-iu UDP_PORTS_IN, --udp_ports_in UDP_PORTS_IN
Kommagetrennte Liste erlaubter UDP-Ports eingehend
-oh OUTBOUND_HOSTS, --outbound_hosts OUTBOUND_HOSTS
Ausgehend auf angegebene Hosts beschränken. -oh
192.168.3.0/24,192.168.4.0/24
-ih INBOUND_HOSTS, --inbound_hosts INBOUND_HOSTS
Eingehend auf angegebene Hosts beschränken. -ih
192.168.3.0/24,192.168.4.0/24
-eh EXCLUDE_HOSTS, --exclude_hosts EXCLUDE_HOSTS
Hosts ausschließen -eh 192.168.3.0/24
-l, --log_exceptions Ausnahmen protokollieren
-s, --simulate Nur simulieren.
-q, --quiet Leise (keine Statusmeldungen anzeigen)
-D, --deny_all Absolut alles verweigern
-A, --allow_all Absolut alles erlauben
-F, --flush IPTables leeren
-S, --show_rules Regeln nach dem Setzen anzeigen
--wizard Adressierungs- und Firewall-Assistentenmodus
-c CONFIG, --config CONFIG
Konfiguration für die Firewall
--info Über Bluewall
example.ini
[local_config]
iface=em1
rh_host=RHEL-Example
rh_ipaddr=192.168.1.42
netmask=255.255.255.0
gateway_addr=172.16.63.1
dns=8.8.8.8
#win_ipaddr=192.168.1.42 - Optionale Windows-IP-Adresse
#
# Optionaler Windows-Host (Bluewall generiert eine Konfigurationsdatei für Windows)
win_host=WINExample
# MAC-Adressen müssen GROSSGESCHRIEBEN sein. Gültig: AA:93:AB:EF:00:01
# rh_mac=* generiert eine zufällige MAC-Adresse
rh_mac=*
[firewall_config]
# Target Range sind Netzwerke, zu denen Sie ausgehende Kommunikation erlauben möchten.
target_range=172.16.63.0/24
target_range=192.168.2.0/24
#
# Nostrike-Adressen sind Geräte, mit denen Ihr Computer NICHT kommunizieren soll
nostrike=192.168.2.1
#
# Trusted Range sind Netzwerke, mit denen Sie bidirektionale Kommunikation wünschen
trusted_range=172.16.63.0/24
trusted_host=42.42.42.42
[ataylor@localhost bluewall]$ sudo bluewall -c configs/exampleconfig.ini
[OK] 192.168.1.101 is a valid setting for dns
[OK] 192.168.1.1 is a valid setting for gateway_addr
[OK] 24 is a valid setting for cidr_prefix
[OK] 192.168.1.254 is a valid setting for nostrike
[OK] * is a valid setting for rh_mac
[OK] WINtaylor is a valid setting for win_host
[OK] 192.168.2.0/24 is a valid setting for target_range
[OK] 192.168.3.0/24 is a valid setting for target_range
[OK] 192.168.1.30 is a valid setting for rh_ipaddr
[OK] RHEL-taylor is a valid setting for rh_host
[OK] 42.42.42.42 is a valid setting for trusted_host
[OK] 192.168.1.0/24 is a valid setting for trusted_range
[OK] 192.168.1.50 is a valid setting for win_ipaddr
==============================
[VALID CONFIG] No Errors Detected.
CONFIGURING
writing eth config to /etc/sysconfig/network-scripts/ifcfg-ens33
[CONFIGURATION]
TYPE="Ethernet"
BOOTPROTO=none
NAME=ens33
DEVICE="ens33"
ONBOOT=no
DEFROUTE="yes"
IPV4_FAILURE_FATAL=no
DNS1=192.168.1.101
IPADDR=192.168.1.30
PREFIX=24
GATEWAY=192.168.1.1
MACADDR=00:16:3E:52:7F:8D
[+] Interface ens33 shutdown.
[+] Restarting Network Service
[+] Interface ens33 brought up.
[+] Rules Flushed!
[+] Allowing outbound ICMP/traceroute to 192.168.2.0/24...
[+] Allowing outbound ICMP/traceroute to 192.168.3.0/24...
[+] Allowing outbound ICMP/traceroute to 192.168.1.0/24...
[+] Limiting outbound TCP connections to 192.168.2.0/24.
[+] Limiting outbound TCP connections to 192.168.3.0/24.
[+] Limiting outbound TCP connections to 192.168.1.0/24.
[+] Limiting outbound UDP connections to 192.168.2.0/24.
[+] Limiting outbound UDP connections to 192.168.3.0/24.
[+] Limiting outbound UDP connections to 192.168.1.0/24.
[+] Limiting inbound UDP connections to 192.168.1.0/24.
[+] Limiting inbound TCP connections to 192.168.1.0/24.
[+] Allowing traffic for localhost.
[+] 192.168.1.254 applied to NOSTRIKE
$ iptables -nvL
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 192.168.1.254 0.0.0.0/0
0 0 ACCEPT all -- * * 127.0.0.0/8 127.0.0.0/8
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.0/24
0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.0/24
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 192.168.1.254
0 0 ACCEPT all -- * * 127.0.0.0/8 127.0.0.0/8
0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.0/24
0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.3.0/24
0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.2.0/24
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.0/24
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.3.0/24
0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.2.0/24
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.1.0/24 icmptype 0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.1.0/24 icmptype 8
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.3.0/24 icmptype 0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.3.0/24 icmptype 8
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.2.0/24 icmptype 0
0 0 ACCEPT icmp -- * * 0.0.0.0/0 192.168.2.0/24 icmptype 8
[+] Setup Complete.