Home

Awesome

en zh-cn de ja fr es

OpenNHP Logo

OpenNHP: Zero Trust Network-infrastructure Hiding Protocol

Build Status Version License


Challenge: AI transforms the Internet as a "Dark Forest"

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.

Vulnerability Risks

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.

Vision: Making the Internet Trustworthy

The openness of TCP/IP protocols has driven the explosive growth of internet applications but also exposed vulnerabilities, allowing malicious actors to gain unauthorized access and exploit any exposed IP address. Although the OSI network model defines the 5th layer (Session Layer) for managing connections, few effective solutions have been implemented to address this.

NHP, or the "Network-infrastructure Hiding Protocol", is a Zero Trust communication protocol designed to function at the OSI Session Layer, which is optimal for managing network visibility and connections. NHP's key objective is to conceal protected resources from unauthorized entities, granting access only to verified, authorized users through continuous verification, contributing to a more trustworthy Internet.

Trustworthy Internet

Solution: OpenNHP Fixes the Network Visibility Control

OpenNHP is the open-source implementation of the NHP protocol. It is cryptography-driven and designed with security-first principles, implementing a true zero-trust architecture at the OSI Session Layer.

OpenNHP as the OSI 5th layer

OpenNHP 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 Protocol1st Generation2nd Generation3rd Generation
Core TechnologyPort KnockingSingle Packet Authorization (SPA)Network-infrastructure Hiding Protocol (NHP)
AuthenticationPort sequencesShared SecretsModern Crypto Framework
ArchitectureNo Control PlaneNo Control PlaneScalable Control Plane
CapabilityHide PortsHide PortsHide Ports, IPs and Domains
Access ControlIP LevelPort LevelApplication Level
Open Source Projectsknock (C)fwknop (C++)OpenNHP (Go)

It is crucial to choose a memory-safe language like Go for OpenNHP development, as emphasized in the US Government technical report. For a detailed comparison between SPA and NHP, refer to the section below.

Security Benefits

Since OpenNHP implements Zero Trust principles at the OSI Session Layer, it offers significant benefits:

Architecture

The OpenNHP architecture is inspired by the NIST Zero Trust Architecture standard. It follows a modular design with the 3 core components: NHP-Server, NHP-AC and NHP-Agent, as illustrated in the below diagram.

OpenNHP architecture

Please refer to the OpenNHP Documentation for detailed information about architecture and workflow.

Cryptographic Algorithms

Cryptography is at the heart of OpenNHP, providing robust security, excellent performance, and scalability by utilizing cutting-edge cryptographic algorithms. Below are the key cryptographic algorithms and frameworks employed by OpenNHP:

Compared to RSA, ECC offers superior efficiency with stronger encryption at shorter key lengths, improving both network transmission and computational performance. The table below highlights the differences in security strength, key lengths, and the key length ratio between RSA and ECC, along with their respective validity periods.

Security Strength (bits)DSA/RSA Key Length (bits)ECC Key Length (bits)Ratio: ECC vs. DSA/RSAValidity
801024160-2231:6Until 2010
1122048224-2551:9Until 2030
1283072256-3831:12After 2031
1927680384-5111:20
25615360512+1:30

The Noise Protocol is built around the Diffie-Hellman key agreement and provides modern cryptographic solutions like mutual and optional authentication, identity hiding, forward secrecy, and zero round-trip encryption. Proven for its security and performance, it is already used by popular applications like WhatsApp, Slack and WireGuard.

Efficient key distribution is essential for implementing Zero Trust. OpenNHP supports both PKI and IBC. While PKI has been widely used for decades, it depends on centralized Certificate Authorities (CA) for identity verification and key management, which can be time-consuming and costly. In contrast, IBC allows for a decentralized and self-governing approach to identity verification and key management, making it more cost-effective for OpenNHP's Zero Trust environment, where billions of devices or servers may need protection and onboarding in real-time.

CL-PKC is a scheme that enhances security by avoiding key escrow and addressing the limitations of Identity-Based Cryptography (IBC). In most IBC systems, a user's private key is generated by a Key Generation Center (KGC), which introduces significant risks. A compromised KGC can lead to the exposure of all users' private keys, requiring full trust in the KGC. CL-PKC mitigates this issue by splitting the key generation process, so the KGC only has knowledge of a partial private key. As a result, CL-PKC combines the strengths of both PKI and IBC, offering stronger security without the drawbacks of centralized key management.

Key Features

<details> <summary>Click to expand feature details</summary> </details>

Quick Demo

This section provides a brief demonstration of how OpenNHP functions. The server protected by OpenNHP is https://acdemo.opennhp.org. Normally, port 443 would be open for HTTPS services, but with the NHP-AC component installed, all ports are closed by default, enforcing a Zero Trust "deny-all" policy.

1) The Protected Server is "Invisible" to Unauthenticated Users

By default, any attempt to connect to the protected server will result in a TIME OUT error, as all ports are closed, making the server appear offline and effectively "invisible."

OpenNHP Demo

Port scanning the server will also return a TIME OUT error.

OpenNHP Demo

2) After Authentication, the Protected Server Becomes Accessible

OpenNHP supports a variety of authentication methods, such as OAuth, SAML, QR codes, and more. For simplicity, this demo uses a basic username/password authentication service at https://demologin.opennhp.org to demonstrate the process.

OpenNHP Demo

Once you click the "Login" button, authentication is completed successfully, and you are redirected to the protected server. At this point, the server becomes "visible" and accessible on your device.

OpenNHP Demo

Deployment

OpenNHP supports multiple deployment models to suit different use cases:

Please refer to the OpenNHP Documentation for detailed deployment instructions.

Comparison between SPA and NHP

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.

-SPANHPNHP Advantages
ArchitectureThe 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.<ul><li> Performance: the resource-consuming component NHP-server is separated from the protected server. </li><li>Scalability: NHP-server can be deployed in distributed or clustered mode.</li><li>Security: the IP address of the protected server is not visible to the client unless the authentication succeeded. </li></ul>
CommunicationSingle directionBi-directionBetter reliability with the status notification of access control
Cryptographic frameworkShared SecretesPKI or IBC, Noise Framework<ul><li>Security: proven secure key exchange mechanism to mitigate the MITM threats</li><li>Low cost: efficient key distribution for zero trust model</li><li>Performance: high performance encryption/decryption</li></ul>
Capability of Hiding network infrastructureOnly server portsDomain, IP, and portsMore powerful against various attacks(e.g., vulnerabilities, DNS hijack, and DDoS attacks)
ExtensibilityNone, only for SDPAll-purposeSupport any scenario that needs service darkening
InteroperabilityNot availableCustomizableNHP can seamlessly integrate with existing protocols (e.g., DNS, FIDO, etc.)

Contributing

We welcome contributions to OpenNHP! Please see our Contributing Guidelines for more information on how to get involved.

License

OpenNHP is released under the Apache 2.0 License.

Contact

For more detailed documentation, please visit our Official Documentation.

References


🌟 Thank you for your interest in OpenNHP! We look forward to your contributions and feedback.