All Projects → CoolerVoid → Hiddenwall

CoolerVoid / Hiddenwall

Licence: bsd-3-clause
Tool to generate a Linux kernel module for custom rules with Netfilter hooking. (block ports, Hidden mode, functions to protect etc)

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Hiddenwall

Divert
WinDivert: Windows Packet Divert
Stars: ✭ 1,318 (+604.81%)
Mutual labels:  network-programming, firewall
Dnxfirewall
dnxfirewall (dad's next-gen firewall), a pure Python next generation firewall built on top of Linux kernel/netfilter.
Stars: ✭ 174 (-6.95%)
Mutual labels:  firewall
Lotos
tiny but high-performance HTTP Server
Stars: ✭ 140 (-25.13%)
Mutual labels:  network-programming
Msquic
Cross-platform, C implementation of the IETF QUIC protocol.
Stars: ✭ 2,501 (+1237.43%)
Mutual labels:  network-programming
Simplewall
Simple tool to configure Windows Filtering Platform (WFP) which can configure network activity on your computer.
Stars: ✭ 2,505 (+1239.57%)
Mutual labels:  firewall
Dnsguide
A guide to writing a DNS Server from scratch in Rust
Stars: ✭ 2,226 (+1090.37%)
Mutual labels:  network-programming
Whatwaf
Detect and bypass web application firewalls and protection systems
Stars: ✭ 1,881 (+905.88%)
Mutual labels:  firewall
Securetea Project
The OWASP SecureTea Project provides a one-stop security solution for various devices (personal computers / servers / IoT devices)
Stars: ✭ 181 (-3.21%)
Mutual labels:  firewall
Config
Various program configuration files and scripts
Stars: ✭ 173 (-7.49%)
Mutual labels:  firewall
Npf
NPF: packet filter with stateful inspection, NAT, IP sets, etc.
Stars: ✭ 160 (-14.44%)
Mutual labels:  firewall
Malware
Rootkits | Backdoors | Sniffers | Virus | Ransomware | Steganography | Cryptography | Shellcodes | Webshells | Keylogger | Botnets | Worms | Other Network Tools
Stars: ✭ 156 (-16.58%)
Mutual labels:  rootkit
Qubes Mirage Firewall
A Mirage firewall VM for QubesOS
Stars: ✭ 149 (-20.32%)
Mutual labels:  firewall
Windows
💎 tweaks & fixes for windows 10 - mostly powershell
Stars: ✭ 169 (-9.63%)
Mutual labels:  firewall
Piadvanced
This started as a custom install for my pihole!
Stars: ✭ 144 (-22.99%)
Mutual labels:  firewall
Shadow Box For X86
Shadow-Box: Lightweight and Practical Kernel Protector for x86 (Presented at BlackHat Asia 2017/2018, beVX 2018 and HITBSecConf 2017)
Stars: ✭ 178 (-4.81%)
Mutual labels:  rootkit
Hidguardian
Windows kernel-mode driver for controlling access to various input devices.
Stars: ✭ 138 (-26.2%)
Mutual labels:  firewall
Afwall
AFWall+ (Android Firewall +) - iptables based firewall for Android
Stars: ✭ 2,024 (+982.35%)
Mutual labels:  firewall
Android Rootkit
A rootkit for Android. Based on "Android platform based linux kernel rootkit" from Phrack Issue 68
Stars: ✭ 167 (-10.7%)
Mutual labels:  rootkit
Docker Waf
An NGINX and ModSecurity based Web Application Firewall for Docker
Stars: ✭ 181 (-3.21%)
Mutual labels:  firewall
Arp Spoofer
A pure-Python ARP Cache Poisoning (a.k.a "ARP Spoofing") tool
Stars: ✭ 180 (-3.74%)
Mutual labels:  network-programming

HiddenWall

HiddenWall is a Linux kernel module generator for custom rules with netfilter. (block ports, Hidden mode, rootkit functions, etc.). The motivation: in a bad situation, an attacker can put your iptables/ufw to fall. But if you have HiddenWall, the attacker will not find the hidden kernel module that blocks external access because it has a hook to netfilter on kernel land(think like a second layer for Firewall).

My beginning purpose at this project is to protect my server, and now it is to protect my friends' machines. When I talk to friends, I say peoples that don't know how to write low-level code. Using the HiddenWall, you can generate your custom kernel module for your firewall configuration.

The low-level programmer can write new templates for modules etc.

The first step, understand before the run

Verify if the kernel version is 3.x, 4.x, or 5.x:

uname -r

Clone the repository

git clone https://github.com/CoolerVoid/HiddenWall

Enter the folder

cd HiddenWall/module_generator

Edit your firewall rules in directory rules/server.YAML, the python scripts, use that file to generate a new firewall module.

$ cat rules/server.yaml
module_name: SandWall
public_ports: 80,443,53
unhide_key: AbraKadabra
hide_key: Shazam
fake_device_name: usb14
liberate_in_2_out: True
whitelist: 
- machine: 
   ip: 192.168.100.181
   open_ports: 22,21
- machine:
   ip: 192.168.100.22
   open_ports: 22

If you want to study the static code to generate, look at the content at directory "templates".

The second step, generate your module

If you want to generate a kernel module following your YAML file of rules, follow that command:

$ python3 WallGen.py --template template/hidden wall.c -r rules/server.YAML

This action can generate a generic module with the rules of the server.YAML, if you want to use another template, you can use "wall.c", so the template module "hidden wall" has the option to run on hidden mode(is not visible to "# lsmod" for example).

The third step, install your module.

To test module:

# cd output; make clean; make
# insmod SandWall.ko

YAML's rule to generate module is simple, drop all out to in packets, accept ports 80,443, and 53. The machine 192*.181 can connect at ports 22 and 21.

If you use Nmap at localhost/127.0.0.1, you can view the ports open because rule liberate_in_2_out is true.

The password to turn Firewall visible is "AbraKadabra".

The password to turn the Firewall invisible is "Shazam".

You need to send the password for your fake device, "usb14".

To exit the module, you need to turn visible at the "lsmod" command ...

# echo "AbraKadabra" > /dev/usb14
# lsmod | grep SandWall
# rmmod SandWall

Random notes

Tested on ubuntu 16 and fedora 29 at kernels "3.x","4.x" and "5.x".

TODO

Support to IPV6. Macro selects the interface(to use multiple modes for each interface). Option to remove last logs when turn hides mode. Option to search and remove other toolkits. Code generator to BFP...

References

Wikipedia Netfilter https://en.wikipedia.org/wiki/Netfilter

Linux Device Drivers http://lwn.net/Kernel/LDD3/

M0nad's Diamorphine https://github.com/m0nad/Diamorphine/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].