Novice tutorial-Samba penetration remote command injection vulnerability username map script (CVE-2007-2447)

Smaba remote shell command injection (username map script)


1. Vulnerability description

Vulnerability number CVE-2007-2447
Disclosure time 2007-05-14
"username map script" is a remote command injection execution vulnerability of the Samba protocol.
Vulnerability path exploit/multi/samba/usermap_script
affects version samba 3.0.20-3.0.25

2. Vulnerability exploitation process

  1. Scan the target machine Samba service version to determine that its service version is in the affected version of this vulnerability
  2. Using the msf framework, use exploit/multi/samba/usermap_script for vulnerability exploitation
  3. Set its related parameters and finally implement the attack

2. Vulnerability experiment steps

Attack machine: kali linux 192.168.75.129
Target machine: Metasploitable2-linux 192.168.75.128

Scan the target machine Samba service version
Insert picture description here
msfconsole Open msf and
Insert picture description here
search for "username map script" vulnerability module
Insert picture description here
Use this module to
Insert picture description here
view module details
Insert picture description here
Insert picture description here

View configuration
Insert picture description here
Set target target machine
Insert picture description here
Set bind_netcat load
Insert picture description here
Related configuration has been set

Execute the module to infiltrate
Insert picture description here
successfully and gain the target root privilege.

Guess you like

Origin blog.csdn.net/weixin_46329243/article/details/112446020