Practice library / Penetration testing, first steps
Lab · Hard · 2.5 hoursFree account
Command & Control with Sliver
Run a full Sliver C2 operation: listeners, implants, beacons, in-memory execution and pivoting.
On this page 13 sections
- ·What you need first
- ·Lab setup
- 1Install Sliver and start the console
- 2Start a listener
- Locked: Generate a Windows implant
- Locked: Deliver the implant and catch a session
- Locked: Interact with the session
- Locked: Run a tool in memory
- Locked: Build and run a beacon
- Locked: Pivot to a second lab host
- Locked: Check
- Locked: Clean up
- Locked: Next lab
Before you start
Command-and-control is the quiet half of a breach. Initial access is loud, but an operator then spends days inside a session, moving laterally, running tools in memory, and keeping traffic blended with the noise of the network. Sliver is the open-source C2 that red teams and malware authors both reach for. The engineer stands up a server, deploys an implant and a beacon, runs assemblies without touching disk, and pivots to a second host.
What You'll Learn
- Install Sliver and start a listener
- Generate a Windows implant and a beacon
- Catch a session and run commands on the lab host
- Run a tool in memory with execute-assembly
- Pivot through a session to reach a second lab host
- Explain how a defender detects Sliver traffic and implants
What you need first
This lab starts after initial access, not before it. Complete these items first:
- Red Team Operations. You must know the stages of an engagement and where a C2 framework fits in one.
- Reverse Shells. You must know how to get a first shell on a target. Sliver replaces that first shell with a managed implant; it does not deliver the first shell for you.
Read these two items for background, not as a requirement:
- Active Directory Basics for the domain terms this lab uses (domain, domain controller, LDAP).
- Windows Command Line & PowerShell for the
netandwhoamicommands you run inside a session.
Lab setup
KaliRange hosts no targets, no virtual machines and no lab files. Build this lab on your own machine, in an isolated Active Directory domain that you build yourself. The names and 10.0.0.x / 192.168.50.x addresses below are the example addresses of this lab; replace them with the addresses of your own domain. Do not run any command in this lab against a real network.
| Machine | Role | Address |
|---|---|---|
| Kali machine | Runs the Sliver server and console | 10.0.0.5 |
DC01 | Domain controller for the lab domain CORP.LOCAL | 10.0.0.10 |
WIN10-01 | Domain-joined workstation. You already have a local administrator shell on it, from an earlier lab. | 10.0.0.21 on the lab network, 192.168.50.21 on a second NIC |
WIN10-02 | Domain-joined workstation, reachable only from WIN10-01 | 192.168.50.22 |
WIN10-02 sits on a second network that the Kali machine cannot reach directly. WIN10-01 has a NIC on both networks. Step 8 uses this layout to pivot.
Build such a domain from free, legal parts: an evaluation copy of Windows Server from the Microsoft Evaluation Center (180 days), in virtual machines on your own computer. Give WIN10-01 a second virtual NIC on its own isolated segment for Step 8's pivot, and a local administrator shell on it before you start. Take a snapshot of each virtual machine before Step 1, so you can go back.
Authorized lab only. Run every command in this lab against machines you own, inside your own isolated lab domain. Do not point a listener, an implant or a pivot at a real network, a shared lab or any system you do not own. A C2 implant is live code that runs on a target; treat it with the same care as any other attack tool.
Step 1: Install Sliver and start the console
Install the server and open the console
Install Sliver on the Kali machine. Start the server. The same command opens a console on top of it.
# On the Kali machine
sudo apt update
sudo apt install -y sliver
# If your Kali release does not package Sliver, use the official installer
curl https://sliver.sh/install | sudo bash
# Start the server and its console together
sudo sliver-serverSliver Command and Control
Server vX.Y.Z
Use 'help' to list commands. Use '<command> --help' for the options of one command.
sliver >Your exact version and banner text differ by release. The sliver > prompt is the line to check: it confirms the server and the console both started.
Why this matters. A C2 server is the one place that holds every listener, every implant build and every active session. Losing it mid-engagement loses your access to every target. In a real engagement you run it on hardened, access-controlled infrastructure, not on your laptop.
Step 2: Start a listener
Start an mTLS listener
Start a listener on the Kali machine. Implants call back to this address and port. Check that the job is running.
sliver > mtls -L 10.0.0.5 -l 8888
sliver > jobs[*] Starting mTLS listener ...
[*] Successfully started job #1
ID Name Protocol Port
── ──── ──────── ────
1 mtls tcp 8888What a defender would see. mTLS uses a certificate the Sliver server generates for itself. The certificate is self-signed and the port is not a standard TLS port. A network defender watches for self-signed certificates and for outbound connections from a workstation to an unfamiliar port, not for the protocol name alone.
Sign in to continue
9 more sections are for signed-in members. It is free: sign in with Google.