Unconfigured Ad Widget

Collapse

Anúncio

Collapse
No announcement yet.

Compilando o T50 - Alguém pode me ajudar?

Collapse
X
 
  • Filter
  • Tempo
  • Show
Clear All
new posts

  • Font Size
    #1

    Dúvida Compilando o T50 - Alguém pode me ajudar?

    Bom,
    Não tenho experiência com programação, e provavelmente deve ser uma solução bem tosca, mas vamos lá:
    Como o título diz estou tentando compilar o T50 - baixe aqui: Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

    Código:
    [eriklehnsherr@Magnus src]$ make t50
    /usr/bin/gcc -Wall -Wextra -O3 -ffast-math    t50.c   -o t50
    t50.c:21:20: fatal error: common.h: No such file or directory
    compilation terminated.
    make: *** [t50] Error 1
    Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...

    Estrutura do diretório:
    Apenas usuários registrados e ativados podem ver os links., Clique aqui para se cadastrar...
    A pasta include está aí e dentro dela está a include common.h
    Eis o código na include:
    Código:
    /*
     *	T50 - Experimental Packet Injector
     *
     *	Copyright (C) 2010 - 2011 Nelson Brito <nbrito@sekure.org>
     *	Copyright (C) 2011 - Fernando Mercês <fernando@mentebinaria.com.br>
     *
     *	This program is free software: you can redistribute it and/or modify
     *	it under the terms of the GNU General Public License as published by
     *	the Free Software Foundation, either version 2 of the License, or
     *	(at your option) any later version.
     *
     *	This program is distributed in the hope that it will be useful,
     *	but WITHOUT ANY WARRANTY; without even the implied warranty of
     *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *	GNU General Public License for more details.
     *
     *	You should have received a copy of the GNU General Public License
     *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */
    
    #ifndef __COMMON_H
    #define __COMMON_H
    
    #define PACKAGE "T50"
    #define VERSION "5.4.0"
    #define SITE "http://t50.sf.net"
    
    #if !(linux) || !(__linux__)
    #	error "Sorry! The t50 was only tested under Linux!"
    #endif  /* __linux__ */
    
    #include <time.h>
    #include <stdio.h>
    #include <netdb.h>
    #include <errno.h>
    #include <fcntl.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <string.h>
    #include <signal.h>
    #include <getopt.h>
    extern int optind;
    extern char *optarg;
    #include <sys/time.h>
    #include <sys/socket.h>
    #include <sys/resource.h>
    
    /* This code prefers to use Linux headers rather than BSD favored */
    #include <linux/ip.h>
    #include <linux/tcp.h>
    #include <linux/udp.h>
    #include <linux/icmp.h>
    #include <linux/igmp.h>
    #include <linux/dccp.h>
    #include <linux/if_ether.h>
    
    /* Purpose-built config library to be used by T50 modules */
    #include <config.h>
    
    /* Purpose-built protocol libraries to be used by T50 modules */
    #include <protocol/egp.h>
    #include <protocol/gre.h>
    #include <protocol/rip.h>
    #include <protocol/igmp.h>
    #include <protocol/ospf.h>
    #include <protocol/rsvp.h>
    #include <protocol/eigrp.h>
    #include <protocol/tcp_options.h>
    
    /* Global common definitions used by code */
    
    /* Data types */
    #define int8_t char
    #define u_int8_t unsigned char
    #define int16_t short int
    #define int16_t short int
    #define u_int16_t unsigned short
    #define int32_t int
    #define u_int32_t unsigned int
    #define int64_t long int
    #define u_int64_t unsigned long int
    #define in_addr_t u_int32_t
    #define socket_t int32_t
    
    /* Limits */
    #define RAND_MAX 2147483647
    #define CIDR_MINIMUM 8
    #define CIDR_MAXIMUM 30
    #define MAXIMUM_IP_ADDRESSES  16777215
    #define INADDR_ANY ((in_addr_t) 0x00000000)
    #define IPPORT_ANY ((u_int16_t) 0x0000)
    
    /* GLOBAL VARIABLES */
    /* I don't know why gcc warn that we're not using this */
    static int8_t __attribute__((unused)) *mod_acronyms[]   = {
    				"ICMP",
    				"IGMPv1",
    				"IGMPv3",
    				"TCP",
    				"EGP",
    				"UDP",
    				"RIPv1",
    				"RIPv2",
    				"DCCP",
    				"RSVP",
    				"IPSEC",
    				"EIGRP",
    				"OSPF",
    				"T50",
    				NULL
    };
    /* I don't know why gcc warn that we're not using this */
    static int8_t __attribute__((unused)) *mod_names[] = {
    				"Internet Control Message Protocol",
    				"Internet Group Message Protocol v1",
    				"Internet Group Message Protocol v3",
    				"Transmission Control Protocol",
    				"Exterior Gateway Protocol",
    				"User Datagram Protocol",
    				"Routing Information Protocol v1",
    				"Routing Information Protocol v2",
    				"Datagram Congestion Control Protocol",
    				"Resource ReSerVation Protocol",
    				"Internet Protocol Security (AH/ESP)",
    				"Enhanced Interior Gateway Routing Protocol",
    				"Open Shortest Path First",
    				NULL
    };
    
    enum t50_module
    {
    	MODULE_ICMP									=  0,
    #define MODULE_ICMP                   MODULE_ICMP
    	MODULE_IGMPv1,
    #define MODULE_IGMPv1                 MODULE_IGMPv1
    	MODULE_IGMPv3,
    #define MODULE_IGMPv3                 MODULE_IGMPv3
    	MODULE_TCP,
    #define MODULE_TCP                    MODULE_TCP
    	MODULE_EGP,
    #define MODULE_EGP                    MODULE_EGP
    	MODULE_UDP,
    #define MODULE_UDP                    MODULE_UDP
    	MODULE_RIPv1,
    #define MODULE_RIPv1                  MODULE_RIPv1
    	MODULE_RIPv2,
    #define MODULE_RIPv2                  MODULE_RIPv2
    	MODULE_DCCP,
    #define MODULE_DCCP                   MODULE_DCCP
    	MODULE_RSVP,
    #define MODULE_RSVP                   MODULE_RSVP
    	MODULE_IPSEC,
    #define MODULE_IPSEC                  MODULE_IPSEC
    	MODULE_EIGRP,
    #define MODULE_EIGRP                  MODULE_EIGRP
    	MODULE_OSPF,
    #define MODULE_OSPF                   MODULE_OSPF
    
    	MODULE_T50,
    #	define MODULE_T50             MODULE_T50
    #	define T50_THRESHOLD_MIN     MODULE_T50
    };
    
    /* Global common protocol definitions used by code */
    #define AUTH_TYPE_HMACNUL 0x0000
    #define AUTH_TYPE_HMACMD5 0x0002
    #define AUTH_TLEN_HMACMD5 16
    #define AUTH_TLEN_HMACMD5 16
    #define auth_hmac_md5_len(foo) \
    	(foo ? AUTH_TLEN_HMACMD5 : 0)
    #define IPVERSION 4
    #define IP_MF 0x2000
    #define IP_DF 0x4000
    
    /* T50 DEFINITIONS. */
    #define IPPROTO_T50 69
    #define FIELD_MUST_BE_NULL NULL
    #define FIELD_MUST_BE_ZERO 0
    
    /* Common protocol structures used by code */
    /*
     * User Datagram Protocol (RFC 768)
     *
     * Checksum is the 16-bit one's complement of the one's complement sum of a
     * pseudo header of information from the IP header, the UDP header, and the
     * data,  padded  with zero octets  at the end (if  necessary)  to  make  a
     * multiple of two octets.
     *
     * The pseudo  header  conceptually prefixed to the UDP header contains the
     * source  address,  the destination  address,  the protocol,  and the  UDP
     * length.   This information gives protection against misrouted datagrams.
     * This checksum procedure is the same as is used in TCP.
     *
     *                   0      7 8     15 16    23 24    31 
     *                  +--------+--------+--------+--------+
     *                  |          source address           |
     *                  +--------+--------+--------+--------+
     *                  |        destination address        |
     *                  +--------+--------+--------+--------+
     *                  |  zero  |protocol|   UDP length    |
     *                  +--------+--------+--------+--------+
     *
     * If the computed  checksum  is zero,  it is transmitted  as all ones (the
     * equivalent  in one's complement  arithmetic).   An all zero  transmitted
     * checksum  value means that the transmitter  generated  no checksum  (for
     * debugging or for higher level protocols that don't care). 
     */
    struct psdhdr {
     	in_addr_t saddr;                  /* source address              */
    	in_addr_t daddr;                  /* destination address         */
    	u_int8_t  zero;                   /* must be zero                */
    	u_int8_t  protocol;               /* protocol                    */
    	u_int16_t len;                    /* header length               */
    };
    
    /* Common macros used by code */
    #define __32BIT_RND(foo) \
    	(foo == 0x00000000 ? \
    	(1 + (u_int32_t) (4294967295.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int32_t) foo)
    
    #define __24BIT_RND(foo) \
    	(foo == 0x000000 ? \
    	(1 + (u_int32_t) (16777215.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int32_t) foo)
    
    #define __16BIT_RND(foo) \
    	(foo == 0x0000 ? \
    	(1 + (u_int16_t) (65535.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int16_t) foo)
    
    #define __8BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (255.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __8BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (255.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __7BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (127.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __7BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (127.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __6BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (63.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __5BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (31.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __4BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (15.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __3BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (7.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define __2BIT_RND(foo) \
    	(foo == 0 ? \
    	(1 + (u_int8_t) (2.0 * rand() / (RAND_MAX + 1.0))) : \
    	(u_int8_t) foo)
    
    #define INADDR_RND(foo) __32BIT_RND(foo)
    
    #define NETMASK_RND(foo) \
    	htonl(foo == INADDR_ANY ? \
    	~(0xffffffff >> (8 + (u_int32_t) (23.0 * rand() / (RAND_MAX + 1.0)))) : \
    	(u_int32_t) foo)
    
    #define IPPORT_RND(foo) __16BIT_RND(foo)
    
    #ifdef __HAVE_DEBUG__
    #define ERROR(s) \
    	fprintf(stderr, "%s: %s at %s, line %d\n", PACKAGE, s, __FILE__, \
    		__LINE__); fflush(stderr);
    #else
    #define ERROR(s) fprintf(stderr, "%s: %s\n", PACKAGE, s); fflush(stderr);
    #endif
    
    /* Common routines used by code */
    extern struct cidr config_cidr(u_int32_t, in_addr_t);
    /* Command line interface options validation. */
    extern u_int32_t check(const struct config_options);
    /* Checksum calculation. */
    extern u_int16_t cksum(u_int16_t *, int32_t);
    /* Command line interface options configuration. */
    extern struct config_options config (int32_t, int8_t **);
    /* IP address and name resolve. */
    extern in_addr_t resolv(int8_t *);
    /* Socket configuration. */
    extern socket_t sock(void);
    /* Help and usage message. */
    extern void usage(void);
    
    /* Common module routines used by code */
    /* Function Name: ICMP packet header configuration. */
    __inline__ extern const void * icmp   (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: IGMPv1 packet header configuration. */
    __inline__ extern const void * igmpv1 (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: IGMPv3 packet header configuration. */
    __inline__ extern const void * igmpv3 (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: TCP packet header configuration. */
    __inline__ extern const void * tcp    (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: EGP packet header configuration. */
    __inline__ extern const void * egp    (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: UDP packet header configuration. */
    __inline__ extern const void * udp    (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: RIPv1 packet header configuration. */
    __inline__ extern const void * ripv1  (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: RIPv2 packet header configuration. */
    __inline__ extern const void * ripv2  (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: DCCP packet header configuration. */
    __inline__ extern const void * dccp   (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: RSVP packet header configuration. */
    __inline__ extern const void * rsvp   (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: IPSec packet header configuration. */
    __inline__ extern const void * ipsec  (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: EIGRP packet header configuration. */
    __inline__ extern const void * eigrp  (const socket_t, const struct config_options) __attribute__((always_inline));
    /* Function Name: OSPF packet header configuration. */
    __inline__ extern const void * ospf   (const socket_t, const struct config_options) __attribute__((always_inline));
    
    #endif /* __COMMON_H */
    Se alguém puder me ajudar agradeço.
    Eu sei que o BackTrack já possui essa ferramenta, só instalar pelo apt-get install t50. Porém eu removi o código que limita o uso do T50 para redes e quero ver como que é o desempenho dele como ferramenta DDoS para ataques reais e não como simples auditoria da rede.

    Muito Obrigado.


    --> Liberte-se você também <--

  • Font Size
    #2
    sera que agente nao consegue esse programa .deb ou .rpm
    ai fica mais facil, do que ficar compilando os pacotes...

    que eu lembre tem o make configure antes
    depois o make install
    mas isso depende da distro.
    Não Acha Estranha Essa Frase:
    Eu Sou Hacker e Uso Windows XP!

    Use Débian, Aprenda Slackware e Brinque Muito Com Back|Track


    Fã ->Nickguitar.dll


    Quer ajudar nossso fórum e não sabe como?
    Então click na imagem e ajude-nos com os links off

    Comment


    • Font Size
      #3
      Eu consegui compilar. É que não sei usar bem o GCC.
      É só usar make no diretório que ele compila tudo, eu tava compilando pacote por pacote por isso dava erro.
      Vou upar ele numa VPS Linux que tenho e ver se é eficiente em ataques externos.
      Depois upo aqui compilado já e sem o bloqueio.
      Muito Obrigado.


      --> Liberte-se você também <--

      Comment


      • Font Size
        #4
        Se vcs quiserem eu passo descompilado só rodar ele.

        Comment


        • Font Size
          #5
          não entendi muito

          Comment

          X
          Working...
          X