A
Archie邱
just for test suidperl ....
it can not work .....
Is the script setuid to root? It would have to be. ... but it not
work .....
$ more reboot.pl
#!/usr/bin/suidperl -T
$ENV{BASH_ENV} = '/sbin';
$ENV{'PATH'} = '/sbin:/usr/bin';
`/bin/sync;/bin/sync;/sbin/reboot`
$
$
$ ls -l /usr/bin/suidperl
-rws--x--x 2 root root 257938 10??15 2003
/usr/bin/suidperl
$ /usr/bin/suidperl -v
$
This is perl, v5.8.1 built for i386-linux-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source
kit.
Complete documentation for Perl, including FAQ lists, should be found
on
this system using `man perl' or `perldoc perl'. If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.
$
$
ls -l reboot.pl
-rwsr-xr-x 1 root root 118 3?? 9 19:05 reboot.pl
$
$ ./reboot.pl
reboot: must be superuser.
$
it can not work .....
Is the script setuid to root? It would have to be. ... but it not
work .....
$ more reboot.pl
#!/usr/bin/suidperl -T
$ENV{BASH_ENV} = '/sbin';
$ENV{'PATH'} = '/sbin:/usr/bin';
`/bin/sync;/bin/sync;/sbin/reboot`
$
$
$ ls -l /usr/bin/suidperl
-rws--x--x 2 root root 257938 10??15 2003
/usr/bin/suidperl
$ /usr/bin/suidperl -v
$
This is perl, v5.8.1 built for i386-linux-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source
kit.
Complete documentation for Perl, including FAQ lists, should be found
on
this system using `man perl' or `perldoc perl'. If you have access to
the
Internet, point your browser at http://www.perl.com/, the Perl Home
Page.
$
$
ls -l reboot.pl
-rwsr-xr-x 1 root root 118 3?? 9 19:05 reboot.pl
$
$ ./reboot.pl
reboot: must be superuser.
$