The rapid advancement of AI technologies, particularly large language models (LLMs), is significantly reshaping the cybersecurity landscape. The rise of Autonomous Vulnerability Exploitation (AVE) represents a major leap in the AI era, streamlining the exploitation of vulnerabilities, as highlighted in this research paper. This development dramatically increases the risk for any exposed network services, echoing the Dark Forest Hypothesis of the Internet. AI-powered tools are continuously scanning the digital environment, swiftly identifying and exploiting weaknesses. Consequently, the Internet is evolving into a "Dark Forest," where visibility equates to vulnerability.
Gartner research predicts a rapid increase in AI-driven cyberattacks. This shifting paradigm calls for a reevaluation of traditional cybersecurity strategies, with a focus on proactive defenses, rapid response mechanisms, and the adoption of network hiding technologies to safeguard critical infrastructure.
NHP, or the "Network-infrastructure Hiding Protocol", is a Zero Trust communication protocol that functions at the Session layer of the OSI network model, which is ideal for managing network visibility and connections. Its main objective is to conceal protected resources from unauthorized entities while granting access solely to verified, authorized users through continuous verification.
NHP builds upon earlier research in network hiding technology, utilizing modern cryptographic framework and architecture to ensure security and high performance, thereby overcoming the limitations of previous technologies.
Network Hiding Protocol | 1st Gen | 2nd Gen | 3rd Gen |
---|---|---|---|
Core Technology | Port Knocking | Single Packet Authorization (SPA) | Network-infrastructure Hiding Protocol (NHP) |
Authentication | Port sequences | Shared Credential | Modern Crypto Framework |
Architecture | No Control Plane | No Control Plane | Scalable Control Plane |
Capability | Hide Ports | Hide Ports | Hide Ports, IPs and Domains |
Access Control | IP Level | Port Level | Application Level |
The detailed comparison between SPA and NHP can be found in below section.
OpenNHP is the open-source implementation of the NHP protocol, developed in Golang. It is designed with security-first principles, implementing a true zero-trust architecture at the session layer (the 5th layer) protocol in the OSI network model.
Since the session layer is responsible for connection establishment and dialogue control, implementing zero trust at the session layer offers significant benefits:
- Mitigate vulnerability risk: The openness of TCP/IP protocols leads to a "trust by default" connection model, allowing anyone to establish a connection to a server port that provides services. Attackers exploit this openness to target server vulnerabilities. The NHP protocol implements the zero trust principle "never trust, always verify" by enforcing "deny-all" rules by default on the server side, only allowing authorized hosts to establish connections. This effectively mitigates vulnerability exploitation, particularly zero-day exploits.
- Mitigate phishing attacks: DNS hijacking is a serious threat to internet security and is used for malicious purposes such as phishing, stealing sensitive information, or spreading malware. The NHP protocol can function as an encrypted DNS resolution service to mitigate this problem. When the NHP-Agent on the client side sends a knock request to the controller component NHP-Server with the identifier (e.g., the domain name) of the protected resource, the NHP-Server will return the IP address and port number of the protected resource if the NHP-Agent is successfully authenticated. Since NHP communication is encrypted and mutually verified, the risk of DNS hijacking is effectively mitigated.
- Mitigate DDoS attacks: As mentioned above, a client cannot obtain the IP address and port number of protected resources without authentication. If the protected resources are distributed across multiple locations, the NHP server may return different IP addresses to different clients, making DDoS attacks significantly more difficult and expensive to execute.
- Attack attribution: The connection model of TCP/IP protocols is IP-based. With NHP, the connection model becomes identity (ID)-based. The connection initiator's identity must be authenticated before establishing the connection, making attacks much more identifiable and traceable.
- Reduces attack surface by hiding infrastructure
- Prevents unauthorized network reconnaissance
- Mitigates vulnerability exploitation
- Stops phishing via encrypted DNS
- Protects against DDoS attacks
- Enables fine-grained access control
- Provides identity-based connection tracking
- Mitigates vulnerability exploitation by enforcing "deny-all" rules by default
- Prevents phishing attacks through encrypted DNS resolution
- Protects against DDoS attacks by hiding infrastructure
- Enables attack attribution through identity-based connections
- Default-deny access control for all protected resources
- Identity and device-based authentication before network access
- Encrypted DNS resolution to prevent DNS hijacking
- Distributed infrastructure to mitigate DDoS attacks
- Scalable architecture with decoupled components
- Integration with existing identity and access management systems
- Support for various deployment models (client-to-gateway, client-to-server, etc)
- Cryptographically secure using modern algorithms (ECC, Noise Protocol, IBC)
Click to expand feature details
- Default-deny access control: All resources are hidden by default, only becoming accessible after authentication and authorization.
- Identity and device-based authentication: Ensures that only known users on approved devices can gain access.
- Encrypted DNS resolution: Prevents DNS hijacking and associated phishing attacks.
- DDoS mitigation: Distributed infrastructure design helps protect against Distributed Denial of Service attacks.
- Scalable architecture: Decoupled components allow for flexible deployment and scaling.
- IAM integration: Works with your existing Identity and Access Management systems.
- Flexible deployment: Supports various models including client-to-gateway, client-to-server, and more.
- Strong cryptography: Utilizes modern algorithms like ECC, Noise Protocol, and IBC for robust security.
The OpenNHP architecture is inspired by the NIST Zero Trust Architecture standard. It follows a modular design with the following core components:
The NHP-Agent is a client-side component that initiates communication and requests access to protected resources. It can be implemented as:
- A standalone client application
- An SDK integrated into existing applications
- A browser plugin
- A mobile app
The agent is responsible for:
- Generating and sending knock requests to the NHP-Server
- Maintaining secure communication channels
- Handling authentication flows
The NHP-Server is the central controller that:
- Processes and validates knock requests from agents
- Interacts with the Authorization Service Provider for policy decisions
- Manages NHP-AC components to allow/deny access
- Handles key management and cryptographic operations
It can be deployed in a distributed or clustered configuration for high availability and scalability.
NHP-AC (Access Control) components enforce access policies on protected resources. Key functions:
- Implement default deny-all rules
- Open/close access based on NHP-Server instructions
- Ensure network invisibility of protected resources
- Log access attempts
- Protected Resources: The resource provider is responsible for protecting these resources, such as API interfaces, application servers, gateways, routers, network devices, etc. In the SDP scenario, the Protected Resources are the SDP Gateway and Controller.
- Authorization Service Provider (ASP): This provider validates access policies and provides the actual access addresses of Protected Resources. In the SDP Scenario, the ASP may be the SDP Controller.
NHP-Agent
sends knock request toNHP-Server
NHP-Server
validates request and retrieves agent infoNHP-Server
queries Authorization Service Provider- If authorized,
NHP-Server
instructsNHP-AC
to allow access NHP-AC
opens connection and notifiesNHP-Server
NHP-Server
provides resource access details toNHP-Agent
NHP-Agent
can now access the protected resource- Access is logged for auditing purposes
Get OpenNHP up and running in minutes:
git clone https://github.com/opennhp/opennhp.git
cd opennhp
make
./nhp-server run
Detailed installation instructions:
- Clone the repository:
git clone https://github.com/opennhp/nhp.git
- Navigate to the project directory:
cd nhp
- Build the project:
make
- Install (optional):
sudo make install
⚠️ Note: Runningsudo make install
requires root privileges. Make sure you trust the source before running this command.
OpenNHP supports multiple deployment models to suit different use cases:
- Client-to-Gateway: Secures access to multiple servers behind a gateway
- Client-to-Server: Directly secures individual servers/applications
- Server-to-Server: Secures communication between backend services
- Gateway-to-Gateway: Secures site-to-site connections
OpenNHP leverages state-of-the-art cryptographic algorithms:
- Elliptic Curve Cryptography (ECC): For efficient public key operations
- Noise Protocol Framework: For secure key exchange and identity verification
- Identity-Based Cryptography (IBC): For simplified key management at scale
The Single Packet Authorization (SPA) protocol is included in the Software Defined Perimeter (SDP) specification released by the Cloud Security Alliance (CSA). NHP improves security, reliability, scalability, and extensibility through a modern cryptographic framework and architecture, as demonstrated in the AHAC research paper.
- | SPA | NHP | NHP Advantages |
---|---|---|---|
Open Source Implementation | fwknop written in C++ | OpenNHP written in Go |
|
Architecture | The SPA packet decryption and user/device authentication component is coupled with the network access control component in the SPA server. | NHP-Server (the packet decryption and user/device authentication component) and NHP-AC( the access control component) are decoupled. NHP-Server can be deployed in separate hosts and supports horizontal scaling. |
|
Communication | Single direction | Bi-direction | Better reliability with the status notification of access control |
Cryptographic framework | PKI | IBC + Noise Framework |
|
Capability of Hiding network infrastructure | Only server ports | Domain, IP, and ports | More powerful against various attacks(e.g., vulnerabilities, DNS hijack, and DDoS attacks) |
Extensibility | None, only for SDP | All-purpose | Support any scenario that needs service darkening |
Interoperability | Not available | Customizable | NHP can seamlessly integrate with existing protocols (e.g., DNS, FIDO, etc.) |
We welcome contributions to OpenNHP! Please see our Contributing Guidelines for more information on how to get involved.
OpenNHP is released under the Apache 2.0 License.
- Project Website: https://github.com/OpenNHP/opennhp
- Slack Channel: Join our Slack
For more detailed documentation, please visit our Official Documentation.
- Software-Defined Perimeter (SDP) Specification v2.0. Jason Garbis, Juanita Koilpillai, Junaid lslam, Bob Flores, Daniel Bailey, Benfeng Chen, Eitan Bremler, Michael Roza, Ahmed Refaey Hussein. Cloud Security Alliance(CSA). Mar 2022.
- AHAC: Advanced Network-Hiding Access Control Framework. Mudi Xu, Benfeng Chen, Zhizhong Tan, Shan Chen, Lei Wang, Yan Liu, Tai Io San, Sou Wang Fong, Wenyong Wang, and Jing Feng. Applied Sciences Journal. June 2024.
- Noise Protocol Framework. https://noiseprotocol.org/
- Vulnerability Management Framework project. https://phoenix.security/web-vuln-management/
🌟 Thank you for your interest in OpenNHP! We look forward to your contributions and feedback.