Perimeter Exploitation to SUID Privilege Retention & Tunneling
Executive Summary
Section titled โExecutive SummaryโSimulates an unauthenticated perimeter ingress attack emulating Citrix zero-day exploitation, dropping a canary SUID binary and establishing local proxy telemetry.
MITRE ATT&CK Lifecycle Phases
Section titled โMITRE ATT&CK Lifecycle PhasesโInitial AccessExecutionPersistencePrivilege EscalationCommand and Control
Multi-Stage Emulation Sequence
Section titled โMulti-Stage Emulation Sequenceโ-
Stage 1: Benign Perimeter Probe & Header Injection Canary
- Technique:
T1190 - Exploit Public-Facing Application - Safe Command:
Terminal window curl -s -k -H 'User-Agent: HERMES-BAS-CANARY-PROBE' https://gateway.internal.net/nf/auth/doAuthentication.do - Expected Telemetry: Web server access log entry containing User-Agent HERMES-BAS-CANARY-PROBE and status 200/403.
- Success Verification: HTTP response received; edge security appliances record inbound probe signature.
- Technique:
-
Stage 2: Canary File Drop in Web Root Hierarchy
- Technique:
T1505.003 - Web Shell - Safe Command:
Terminal window echo '<?php /* HERMES BAS INERT CANARY */ ?>' > /tmp/hermes_bas_canary.sig - Expected Telemetry: File creation event in /tmp recorded by EDR / auditd with non-executable PHP tag.
- Success Verification: Canary file created with strict 0600 permissions.
- Technique:
-
Stage 3: Canary SUID Binary Privilege Escalation Simulation
- Technique:
T1548.001 - Setuid and Setgid - Safe Command:
Terminal window cp /bin/true /tmp/hermes_suid_test && chmod 4755 /tmp/hermes_suid_test - Expected Telemetry: Auditd / EDR alert for SUID bit modification (chmod 4755) in /tmp directory.
- Success Verification: Binary created with SUID bit; file execution produces benign exit code 0.
- Technique:
-
Stage 4: Simulated Proxy Mutex Lock & Local Port Binding
- Technique:
T1090 - Proxy - Safe Command:
Terminal window touch /tmp/.hermes_uxdlock && python3 -c 'import socket, time; s=socket.socket(); s.bind(("127.0.0.1", 44443)); time.sleep(2)' - Expected Telemetry: Network socket bind event on loopback port 44443 and file touch in /tmp.
- Success Verification: Mutex file created and closed; port bound and safely released after 2 seconds.
- Technique:
Safety Guardrails & Cleanup Verification
Section titled โSafety Guardrails & Cleanup Verificationโ- All commands operate strictly on localhost or dedicated sandbox environments.
- No network traffic is dispatched outside the authorized simulation boundary.
- Payloads use non-executable benign canaries (/bin/true, inert comments).
Cleanup Command:
rm -f /tmp/hermes_bas_canary.sig /tmp/hermes_suid_test /tmp/.hermes_uxdlockVerification Check: test ! -f /tmp/hermes_suid_test && test ! -f /tmp/hermes_bas_canary.sig