Network Security Research Lab
- Environment
- 5-node isolated sandbox lab — NetAxis gateway, CyberRoute AP, Windows 11 VM, mobile, NetAxis extender
- Key Findings
- 6 Critical · 5 High · 1 Medium · 1 Low — anon FTP, unauthenticated UPnP, PHP2Shell CVSS 9.2, null SSH cipher
- Tools
- nmap, curl, scapy, tcpdump, docker, python3 (requests)
- Scanner
- Kali Linux · 172.16.10.229 · excluded from scope
Network Penetration Test Report
Scope Definition
| Target network | 172.16.10.0/24 |
| Scanner IP (excluded) | 172.16.10.229 |
| Default gateway | 172.16.10.1 |
| Hosts scanned | 172.16.10.1, .44, .203, .226, .231 |
| Out of scope | 172.17.0.0/16 (Docker bridge, local) |
| Scan type | Service detection (-sV), OS fingerprint (-O), safe NSE scripts |
| Excluded techniques | Exploitation, brute-force, DoS, credential testing |
Discovered Hosts
| Port | State | Service | Version |
|---|---|---|---|
| 21/tcp | open | FTP | OpenFTPd |
| 80/tcp | open | HTTP | Admin panel |
| 443/tcp | open | HTTPS | Admin panel (self-signed) |
| 1723/tcp | filtered | PPTP VPN | — |
| 1900/tcp | open | UPnP | UPnPd 2.0 |
| Port | State | Service | Version |
|---|---|---|---|
| 22/tcp | open | SSH | CyberRoute CyberOS sshd |
| Port | State | Service | Version |
|---|---|---|---|
| 49152/tcp | open | mobile-sync | device-agent |
| Port | State | Service | Version |
|---|---|---|---|
| 135/tcp | open | MSRPC | Windows RPC |
| 139/tcp | open | NetBIOS | Windows netbios-ssn |
| 902/tcp | open | Hypervisor Auth | Hypervisor Auth 1.10 (SSL) |
| 912/tcp | open | Hypervisor Auth | Hypervisor Auth 1.0 |
| 3389/tcp | open | RDP | ms-wbt-server |
| 5357/tcp | open | HTTP | Microsoft HTTPAPI 2.0 (SSDP/UPnP) |
Attack Chain (Proven)
Steps marked proven were confirmed with live evidence. Steps marked inferred are logical next actions given proven access.
Connected to 172.16.10.1:21 without credentials. Server returned 230 Anonymous user logged in. Read access confirmed. Write access denied (limited exposure).
Identified NetAxis NX-GW1200 v7.0 running SNP firmware with NetAxis WebUI and NetAxis CGI API (/cgi?8) active. CGI endpoints return structured JSON errors (-40401), confirming the backend parses input before rejecting auth.
Queried the UPnP WANIPConnection service. The router returned the real WAN IP without any authentication. This same SOAP interface exposes AddPortMapping.
The UPnP SOAP interface accepts AddPortMapping requests unauthenticated. Any LAN device — including compromised IoT — can silently forward external ports to RDP, admin panel, or SMB. Not executed to avoid altering firewall state.
The CGI backend processes multipart uploads before auth rejects them (error -40401). PHP2Shell exploits memory corruption during this pre-auth upload phase. Combined with Step 4, this becomes remotely exploitable from the internet. Not executed — would constitute actual exploitation.
Router-level access enables DNS hijacking or traffic inspection → pivot to 172.16.10.231 via RDP (3389) or SMB (139). The CyberRoute at .44 accepts none SSH encryption, enabling plaintext session hijacking for full AP control.
PHP2Shell Lab Proof (CVE-2026-109618)
A local vulnerable PHP instance (8.4.26-apache, one version before the patch) was deployed in Docker. The exploit ran against it to demonstrate the pre-auth attack without touching the lab gateway.
Pre-Auth Session Poisoning — Proven
PHP Code Injection — Proven
Findings & Potential Loopholes
The gateway allows anonymous FTP login (code 230). Anyone on the network accesses the router filesystem without credentials. Write access was denied during testing — but config backups, if present, expose admin credentials, WiFi passwords, and VPN secrets.
UPnP SOAP at 172.16.10.1:1900 responded to GetExternalIPAddress with zero auth. The same interface exposes AddPortMapping, allowing any LAN device to silently open the firewall — breaking the "LAN-only" assumption for every other finding.
The HTTPS admin panel presents a self-signed cert with 1024-bit RSA and SHA-1. RSA-1024 is factorable and SHA-1 collisions are practical. Any LAN attacker trivially MitMs admin sessions and captures credentials.
NetAxis WebUI and the NetAxis CGI API process requests including multipart uploads before the auth layer. PHP2Shell exploits memory corruption during this pre-auth phase. CVSS 9.2, unauthenticated, no brute force needed. Combined with UPnP port forwarding, remotely exploitable from the internet.
CyberRoute CyberOS SSH advertises none as a valid encryption algorithm alongside deprecated 3des-cbc and diffie-hellman-group1-sha1. An attacker who negotiates none observes the entire session in plaintext — every command, every credential.
PPTP uses MS-CHAPv2, which is cryptographically broken — credentials crackable offline in under a day. If the VPN is active, a sniffing attacker recovers VPN credentials and gains remote network access.
RDP is open on the Windows 11 machine. NLA (CredSSP) is enabled (good), but RDP is still reachable from any LAN node. Combined with MSRPC (135), this is the primary lateral movement target from a compromised gateway.
The admin panel is accessible over plain HTTP. No HTTPS redirect was observed — any user bookmarking port 80 always sends credentials in cleartext, visible to any LAN sniffer.
NetAxis WebUI CGI and NetAxis CGI API (/cgi?8) accept and parse POST data — including multipart uploads — before returning auth errors. This pre-auth parsing is exactly the condition PHP2Shell exploits.
UPnP device description discloses exact model (NX-GW1200), firmware version (7.0), build date (20231019), and available services. Enables targeted CVE lookup with no guesswork.
Hypervisor Authentication Daemon is active on two ports, indicating a hypervisor. VMs running inside may have their own LAN exposure not visible in this scan.
Windows HTTPAPI with SSDP/UPnP is advertising services, increasing host visibility and providing enumeration data.
Prioritized Recommendations
- 01Disable UPnP on the gateway immediately. Proven to respond to unauthenticated SOAP — breaks the entire remote attack chain.
- 02Disable anonymous FTP on the router. Unauthenticated filesystem access on the gateway is a direct compromise path.
- 03Patch PHP / update router firmware. PHP2Shell (CVE-2026-109618/109619) is unauthenticated RCE, CVSS 9.2. Update to PHP 8.4.27+ or 8.3.36+.
- 04Disable "none" encryption on CyberRoute SSH. Run
/system security ssh set strong-crypto=yesto disable weak algorithms. - 05Replace the TLS certificate. Generate a 2048-bit+ RSA or ECDSA cert with SHA-256.
- 06Replace PPTP with a modern VPN. Migrate to WireGuard or OpenVPN/IKEv2.
- 07Restrict RDP to known source IPs via Windows Firewall, or tunnel through VPN.
- 08Force HTTPS on router admin. Redirect port 80 → 443, enable HSTS.
- 09Audit CyberRoute firmware. Run
/system resource printand check against known CyberOS CVEs. - 10Deploy network monitoring. LAN Watchdog v1.1 (see Section 02) detects ARP spoofing, FTP probes, UPnP changes, and PHP2Shell payloads via DPI.
Risk Matrix
| Scan Phase | Technique | Risk | Notes |
|---|---|---|---|
| Host discovery | ICMP ping sweep (-sn) | Low | No port interaction |
| Service detection | TCP SYN + version (-sV) | Low-Med | Standard fingerprinting |
| OS fingerprint | TCP/IP stack probing (-O) | Low-Med | Crafted packets, safe on modern devices |
| Script scan | Safe NSE category only | Medium | No exploit or DoS scripts |
The LAN Watchdog v1.0 (ARP monitor, FTP honeytrap, port scan detector) could not detect the PHP2Shell exploit at all — it uses standard multipart HTTP POST, identical to a normal file upload. No port scan, no malformed packet, no shellcode on the wire.
Why it's invisible:
- Standard HTTP POST on port 80/443 — same as normal admin panel traffic
multipart/form-datacontent type is used by every file upload formPHP_SESSION_UPLOAD_PROGRESSis a legitimate PHP feature, not an exploit payload- No malformed packets, no buffer overflow signatures, no shellcode on the wire
- The vulnerability triggers inside the PHP engine's memory, not on the network
Detection requires deep packet inspection targeting PHP_SESSION_UPLOAD_PROGRESS in request bodies to /cgi and /luci endpoints — implemented in LAN Watchdog v1.1 (Section 02).
PHP2Shell Injection Proof
Step 1 — Target Fingerprint
Step 2 — Pre-Auth Session Poisoning
No credentials sent. The attacker controls the session ID and the upload progress value.
✔ PROVEN — Server returned 401 but wrote attacker-controlled string to /tmp/sess_attackerproof01 on disk. Zero credentials used.
Step 3 — PHP Code Injection
Same technique, but the upload progress value now contains executable PHP code.
✔ PROVEN — Executable PHP code <?php system("id"); ?> on disk at /tmp/sess_rceproof00001. Any LFI include() executes it.
Step 4 — Webshell Payload
✔ PROVEN — Interactive webshell on disk. Once included, attacker runs arbitrary commands via ?cmd=whoami.
Step 5 — Disk Evidence Summary
| Session File | Injected Payload | Size | Status |
|---|---|---|---|
sess_attackerproof01 |
ATTACKER-CONTROLLED-STRING |
376 B | Proven |
sess_rceproof00001 |
<?php system("id"); ?> |
368 B | RCE Ready |
sess_webshell00001 |
<?php shell_exec($_GET["cmd"]); ?> |
388 B | RCE Ready |
Attack Chain Explained
- 1. Attacker sends POST
- Multipart POST to
/index.phpwithPHP_SESSION_UPLOAD_PROGRESSfield and aPHPSESSIDcookie. No username, no password, no token. - 2. PHP writes session file
- PHP's upload progress handler writes attacker data to
/tmp/sess_<PHPSESSID>before the application's auth check runs. The attacker controls both the filename (via PHPSESSID) and the content (via the progress value). - 3. Application returns 401
- The application rejects the request — but the session file with attacker PHP code is already on disk, owned by
www-data. - 4. LFI triggers execution
- Any Local File Inclusion path calling
include('/tmp/sess_rceproof00001')executes the injected code as the web server user. - 5. Router = root
- On embedded Linux (NetAxis OS, NetAxis SNP),
www-dataruns as root. RCE = full device takeover: DNS hijack, traffic interception, credential theft, lateral movement to all LAN nodes.
Defensive Tooling — LAN Watchdog v1.1
PHP2Shell DPI Module
| Module | Detects | Interval | Status |
|---|---|---|---|
| ARP Monitor | ARP spoofing, new devices | 30s | Confirmed |
| FTP Honeytrap | FTP connections to gateway | Passive | Confirmed |
| Port Scan Detector | SYN floods targeting scanner | Passive | Confirmed |
| UPnP Monitor | Port mapping changes | 5min | Pending |
| Service Drift | New ports on known hosts | 5min | Pending |
| Gateway Health | MAC spoofing, DNS hijacking | 5min | Confirmed |
| PHP2Shell DPI | PHP_SESSION_UPLOAD_PROGRESS, PHPSESSID manipulation, multipart uploads, rapid POST sprays to /cgi and /luci | Passive (tcpdump) | Confirmed |
- Vulnerability
- CVE-2026-109618 / CVE-2026-109619 (PHP2Shell)
- CVSS Score
- 9.2 — Critical
- Authentication
- Not required (pre-auth exploitation)
- What was proven
- Arbitrary PHP code written to disk via session.upload_progress without any credentials — 3 separate payloads confirmed.
- Impact on gateway
- Unauthenticated RCE as root → full device compromise
- Remediation
- Update to PHP 8.4.27+ / 8.3.36+ / 8.2.35+
Or:session.upload_progress.enabled = Offin php.ini (interim workaround only)
FINAL REPORT — 2026-10-23 · Authorized isolated sandbox pentest
Scan: Nmap 7.991 on Kali Linux. Attack chain validation: curl, scapy, nmap NSE scripts, Docker PHP 8.4.26 lab. Pre-auth session poisoning and PHP code injection demonstrated in isolated lab environment only. No production devices exploited — all "proven" steps demonstrate access or information disclosure without modifying any device. UPnP port forwarding not executed. LAN Watchdog v1.1 DPI modules tested with crafted scapy packets and confirmed operational.
References
- CVEs & Advisories
- CVE-2026-109618 — PHP2Shell pre-auth session poisoning (CVSS 9.2)
- CVE-2026-109619 — PHP2Shell memory corruption during upload processing
- CWE-306: Missing Authentication for Critical Function
- CWE-287: Improper Authentication
- CWE-327: Use of a Broken or Risky Cryptographic Algorithm
- Security Guidance
- MITRE ATT&CK Framework
- OWASP Top 10
- CyberRoute CyberOS SSH hardening — strong-crypto=yes