Skip to content

Perimeter Exploitation to SUID Privilege Retention & Tunneling

Density:

Simulates an unauthenticated perimeter ingress attack emulating Citrix zero-day exploitation, dropping a canary SUID binary and establishing local proxy telemetry.

  • Initial Access
  • Execution
  • Persistence
  • Privilege Escalation
  • Command and Control

  1. 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.
  2. 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.
  3. 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.
  4. 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.

  • 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).