All Projects β†’ nsacyber β†’ Netfil

nsacyber / Netfil

Licence: other
A kernel network manager with monitoring and limiting capabilities for macOS. #nsacyber

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Netfil

Grassmarlin
Provides situational awareness of Industrial Control Systems (ICS) and Supervisory Control and Data Acquisition (SCADA) networks in support of network security assessments. #nsacyber
Stars: ✭ 621 (+540.21%)
Mutual labels:  network, networking, monitoring, monitor
Fire
πŸ”₯A delightful HTTP/HTTPS networking framework for iOS/macOS/watchOS/tvOS platforms written in Swift.
Stars: ✭ 243 (+150.52%)
Mutual labels:  network, networking, macosx
Bmon
bandwidth monitor and rate estimator
Stars: ✭ 787 (+711.34%)
Mutual labels:  network, networking, monitoring
Pnet
High level Java network library
Stars: ✭ 49 (-49.48%)
Mutual labels:  network, networking
Llama Archive
Loss & LAtency MAtrix
Stars: ✭ 44 (-54.64%)
Mutual labels:  network, monitoring
Llama
Library for testing and measuring network loss and latency between distributed endpoints.
Stars: ✭ 47 (-51.55%)
Mutual labels:  network, monitoring
Dratini
Dratini is a neat network abstraction layer.
Stars: ✭ 38 (-60.82%)
Mutual labels:  network, networking
Unifi exporter
Multiarch images for scraping Prometheus metrics from a Unifi Controller. Kubernetes / prometheus-operator compatible.
Stars: ✭ 54 (-44.33%)
Mutual labels:  networking, monitoring
React Native Netinfo
React Native Network Info API for Android & iOS
Stars: ✭ 1,049 (+981.44%)
Mutual labels:  network, networking
Macfinder
An iOS Library that helps you find the MAC Address of a specific IP
Stars: ✭ 57 (-41.24%)
Mutual labels:  network, networking
Laravel Api Health
Monitor first and third-party services and get notified when something goes wrong!
Stars: ✭ 65 (-32.99%)
Mutual labels:  monitoring, monitor
Cilium
eBPF-based Networking, Security, and Observability
Stars: ✭ 10,256 (+10473.2%)
Mutual labels:  networking, monitoring
Dknetworking
基于 AFNetworking + YYCache ηš„δΊŒζ¬‘ε°θ£…οΌŒζ”―ζŒηΌ“ε­˜η­–η•₯ηš„η½‘η»œθ―·ζ±‚ζ‘†ζžΆ
Stars: ✭ 41 (-57.73%)
Mutual labels:  network, networking
Kubenurse
Kubernetes network monitoring
Stars: ✭ 94 (-3.09%)
Mutual labels:  network, monitoring
Ineter
Fast Java library for working with IP addresses, ranges, and subnets
Stars: ✭ 39 (-59.79%)
Mutual labels:  network, networking
Overseer
A golang-based remote protocol tester for testing sites & service availability
Stars: ✭ 51 (-47.42%)
Mutual labels:  networking, monitoring
Mthawkeye
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Stars: ✭ 1,119 (+1053.61%)
Mutual labels:  network, monitor
Pynms
A vendor-agnostic NMS for carrier-grade network simulation and automation
Stars: ✭ 73 (-24.74%)
Mutual labels:  network, networking
Stnettaskqueue
STNetTaskQueue is a networking queue library for iOS and OS X. It's abstract and can be implemented in different protocols.
Stars: ✭ 90 (-7.22%)
Mutual labels:  network, networking
Xdp
Package xdp allows one to use XDP sockets from the Go programming language.
Stars: ✭ 36 (-62.89%)
Mutual labels:  network, networking

netfil

This is a experimental beginner Network Kernel Extention (NKE) with a menu bar application. It can filter by process identifier, IP, or network interfaces using a i/o byte limit.

This project is NOT meant to be run on a production machine - use at your own risk! Tested on macOS 10.12.1

This is a kernel level alternative to netman.

The following NKE filters are used:

Example use cases

  • Create a socket filter to ensure an application only uploads X bytes
  • Create an interface filter to ensure you don't go over your data limit when tethering
  • Create an IP filter to manage your bandwidth usage to an external host

KEXT

You can load the KEXT with the ./reload.sh iffilter.kext com.company.netfil command. Note: Loading unsigned kernel extensions requires System Integrity Protection (SIP) to be turn off.

System Controls

This NKE uses sysctl to cross boundaries between kernel code and appliactions.

You can communicate directly with them using the sysctl command. To view most system controls run sysctl -a net.netfil

Interface Filter

  • net.netfil.interface.list <struct CCArray>: size is the number of interfaces; names contains a list of null-terminated network interface names.
  • net.netfil.interface.ibyte <int>
  • net.netfil.interface.obyte <int>
  • net.netfil.interface.iobyte <int>
  • net.netfil.interface.status <int>: 0 is "off", 1 is "on"

Socket Filter

  • net.netfil.socket.pid <int>
  • net.netfil.socket.ibyte <int>
  • net.netfil.socket.obyte <int>
  • net.netfil.socket.iobyte <int>
  • net.netfil.socket.status <int>: 0 is "off", 1 is "on"

IP Filter

  • net.netfil.ip.addr <struct in_addr> or <struct in6_addr>
  • net.netfil.ip.ibyte <int>
  • net.netfil.ip.obyte <int>
  • net.netfil.ip.iobyte <int>
  • net.netfil.ip.status <int>: 0 is "off", 1 is "on"

Note: You cannot set the net.netfil.ip.addr or the net.netfil.interface.list via commandline.

To run a fitler, first set its' options then change its' status to 1. It is always smart to validate your options before you start.

For iobyte, ibyte, and obyte, a zero value represents unmetered/unlimited (no filtering).

Menu Bar / GUI Application

You can use the menu bar application to control the KEXT. A green icon with a dot means the filter is "on", a red icon with a line means the filter is "off", a gray icon with a radar-like symobl means the KEXT is probably not loaded or there is an error. Icon are from Oxygen Team.

Limitations

KEXT

  • Right now you can only run one socket, interface, or IP filter at a time.
  • Does not add new interfaces to filter (mac policy might be able to help with this?)
  • Anyone can change the variables as root permission is not required. This is very dangerous!
  • Not signed so have to jump thru some hoops to get this loaded on your machine.

GUI

  • Application will only filter IPv4 addresses for the IP filter.
  • Application will not be alerted instantly on KEXT changes.

Useful Resources

License

See LICENSE.

Disclaimer

See DISCLAIMER.

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].