English | 简体中文
WARNING/CRITICAL: Configuration of NW will easily lock you out of Linux system
NightsWatch is a Linux System monitoring daemon process which will record everything of the system accessed
It is in the core of Defense in Depth of Umbrella design, it used to control the DMZ security overall
with modification NW can to all different types of security control on modern Linux system
Defense in Depth is an idea of design network/system security based on layered/Point view
The basic idea is security risk always existed, on different systems there will be different security risks existed, this attribute can be used for security enhancement itself
Main access to a security enhanced network is through network itself, network security is layered controlled, no matter
it equipped with Zero Trust Principle of based on tradditional external/internal network split it all based on layered design
with different defense in depth layer, it control different part of access, e.g public external provided service, internal network cross
host access, from internal to external access, ... these are all layered controlled by defense in depth with different manner.
internal network can be categorized based on it access behavior, it will provide a security baseline for all the connected devices
for the host which is doing the security control/audit work, it needs extra security controlled whch is based on Linux system monitoring
- it is not a virus scanning software
- it based on all applications running on the system are suspect and it based on the configuration and also application's behavior analysis to decide what is a risk
- it runtime monitoring the system behavior to secure itself
it reuquired centralized realtime analysis of the overall system behavior of all the security controlling points
This used for DMZ device to monitor itself's connectivities
and all the activities on the DMZ host
not like telescope and firewall is based on control connected devices network behavior
The inner layer of defense in depth, after root system still have roadblock
e.g.
/etc/shadow
...
DMZ works as server host, it initiates out traffic only for proxy and DNS bridge
tcpdump works well why not
- non promiscuous mode capture packet (direct device driver, NIC card level mode will receive many not dested packet to the host)
- better configurable filter to only hook out interesting packets
- it is not about performance, it is about to not impact on existing working mode but only hookout required stuffs for analysis
- XDP layer firewall control the opened ports
- TC classifier firewall control the packet egress
- Control socket layer only can be accessed from configured application with configured target protocol and IP addresses
- DNS Resolver threads detect many IP not works as DNS server
use executable file short name as the filter
-
config application firefox under control access list
curl -X POST -d "cmd=update_config" -d "map=app_ipv4_strict_access_list" -d "key=firefox" -d "key_convert=str2taskinfo" -d "value=ipv4_allow_list" -d "value_convert=str2mapfd" http://127.0.0.1:8277/lsm/basic_lsm -
add allowed access ip
curl -X POST -d "cmd=update_config" -d "map=ipv4_allow_list" -d "key=192.168.10.1" -d "key_convert=str2ip" -d "value=1" -d "value_convert=str2int" http://127.0.0.1:8277/lsm/basic_lsm -
add new eBPF curl -X POST -d "cmd=add_ebpf_lsm" -d "lsm=file_lsm" -d "config=./conf/file_lsm.conf" http://127.0.0.1:8277/lsm
-
replace eBPF curl -X POST -d "cmd=reload_ebpf_lsm" -d "config=./config/file_lsm.conf" http://127.0.0.1:8277/lsm/file_lsm
- no need to know what dependency lib can be trusted or not
- only check the application runtime behavior no matter what types of lib it is used
- reject all its not should initiated behaviors based on analysis
NW (NightsWatch) (restful API endpoints) <---|
| |
-------------- Events Monitor ---| |
| | |
-------------- Analyst <-------| |
| | |
| ---------------------------|
|-------------- LSM
1. record well known so functionalities and its function
2. track the possible breach of the share lib be hooked out
- Basic nw_cli
- um_prb refactory
- support cgroups and namespace nsproxy
- containerd listening at empheral port without bind quite weird behavior
- quarantine_app nw_cli (quarantine level is configurable)
Author: Zhao Zhe(Alex)