Thanks to visit codestin.com
Credit goes to github.com

Skip to content

bad-antics/nullsec-netseer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 NullSec NetSeer

Haskell Security Type Safety License

Secure Passive Network Traffic Analyzer

Pure functional design with strong type safety and immutable data structures

Features β€’ Installation β€’ Usage β€’ Security


🎯 Overview

NullSec NetSeer is a Secure passive network traffic analyzer written in Haskell. It leverages the power of pure functional programming to provide mathematically provable security guarantees through strong typing and immutability.

✨ Features

  • πŸ“Š Traffic Analysis - Deep packet inspection and flow analysis
  • πŸ” Protocol Detection - Identify protocols in network streams
  • πŸ“ˆ Statistics - Real-time traffic statistics and metrics
  • πŸ›‘οΈ Type-Safe - Strong typing prevents entire classes of bugs
  • ♻️ Immutable - No side effects in core analysis logic
  • πŸ“ Reports - Comprehensive traffic reports

πŸ›‘οΈ Security Features

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        NullSec NetSeer v2.0.0              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  βœ“ Pure Functional Design                  β”‚
β”‚  βœ“ Strong Type Safety (Newtypes)           β”‚
β”‚  βœ“ Smart Constructors for Validation       β”‚
β”‚  βœ“ Bounded Data Structures                 β”‚
β”‚  βœ“ Immutable Data Throughout               β”‚
β”‚  βœ“ Explicit Error Handling (No Exceptions) β”‚
β”‚  βœ“ Memory Exhaustion Prevention            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Installation

From Source

# Clone the repository
git clone https://github.com/bad-antics/nullsec-netseer.git
cd nullsec-netseer

# Build with Cabal
cabal update
cabal build

# Or with Stack
stack build

# Install
cabal install

Requirements

  • GHC 9.4 or later
  • Cabal 3.8+ or Stack 2.9+
  • libpcap development libraries

Dependencies

- base >= 4.16
- bytestring >= 0.11
- containers >= 0.6
- time >= 1.12
- directory >= 1.3

πŸš€ Usage

# Analyze pcap file
./nullsec-netseer --input capture.pcap

# Live capture (requires root)
sudo ./nullsec-netseer --interface eth0

# Generate statistics report
./nullsec-netseer --input capture.pcap --stats

# Filter by protocol
./nullsec-netseer --input capture.pcap --protocol tcp

# Export analysis
./nullsec-netseer --input capture.pcap --output analysis.json

Command Line Options

Flag Description
--input <file> Input pcap file to analyze
--interface <if> Live capture interface
--stats Show traffic statistics
--protocol <proto> Filter by protocol
--top <n> Show top N flows
--output <file> Output file for reports
--verbose Enable verbose output
--version Show version information

πŸ“Š Output Example

β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— 
β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—     β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•     β–ˆβ–ˆβ•‘   β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘
β•šβ•β•  β•šβ•β•β•β•β•šβ•β•β•β•β•β•β•   β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•
             bad-antics β€’ Network Traffic Analyzer

[*] Analyzing: capture.pcap
[+] Packets processed: 142,857
[+] Flows identified: 3,421

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Traffic Statistics             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Total Bytes:     2.4 GB                 β”‚
β”‚  Total Packets:   142,857                β”‚
β”‚  Unique IPs:      1,234                  β”‚
β”‚  Duration:        3h 24m 15s             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Protocol Breakdown:                     β”‚
β”‚    TCP:    78.4%  (111,999 pkts)        β”‚
β”‚    UDP:    19.2%  (27,428 pkts)         β”‚
β”‚    ICMP:    2.4%  (3,430 pkts)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ” Type Safety Architecture

-- Smart constructors ensure validation at creation
mkValidIP :: Word32 -> Either String ValidIP
mkValidPort :: Word16 -> Either String ValidPort
mkValidPath :: FilePath -> Either String ValidPath

-- Newtypes prevent mixing different data types
newtype ValidIP = ValidIP { getIP :: Word32 }
newtype ValidPort = ValidPort { getPort :: Word16 }

-- Pure functions with no side effects
analyzePacket :: ValidPacket -> Either AnalysisError PacketInfo

πŸ“œ License

NullSec Proprietary License - See LICENSE file for details.

πŸ‘€ Author

bad-antics


Part of the NullSec Security Framework

"Mathematically provable security through pure functional programming"

About

Pure Functional Network Traffic Analyzer in Haskell - Maximum type safety and immutability

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors