Exploit databaseDownload repository ZIP
GH-42bcc4d4f0cdef1d8365a489d0185918
1nteger-c/cve-2019-8605
Sources for CVE-2019-8605
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files32
1nteger-c/cve-2019-8605Revision c3f9a153347b
- ↑..Parent directory
- Assets.xcassets/
- Base.lproj/
- AppDelegate.h
- AppDelegate.m
- IOKitLib.h
- Info.plist
- OSSerializeBinary.h
- ViewController.h
- ViewController.m
- exploit.c
- exploit.h
- get_fd_ofiles.c
- get_fd_ofiles.h
- get_port.c
- get_port.h
- iosurface.c
- iosurface.h
- kernel_alloc.c
- kernel_alloc.h
- log.c
- log.h
- main.m
- parameters.c
- parameters.h
- platform.c
- platform.h
- platform_match.c
- platform_match.h
- read.c
- read.h
- spray.c
- spray.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
1_day_iOS/platform.c
C · 1,741 bytes/*
* platform.c
* Brandon Azad
*/
#define PLATFORM_EXTERN
#include "platform.h"
#include <assert.h>
#include <mach/mach.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include "log.h"
// ---- Initialization ----------------------------------------------------------------------------
void
platform_init() {
// Only initialize once.
static bool initialized = false;
if (initialized) {
return;
}
initialized = true;
// Set the page size.
platform.page_size = vm_kernel_page_size;
page_size = platform.page_size;
// Get the machine name (e.g. iPhone11,8).
struct utsname u = {};
int error = uname(&u);
assert(error == 0);
strncpy((char *)platform.machine, u.machine, sizeof(platform.machine));
// Get the build (e.g. 16C50).
size_t osversion_size = sizeof(platform.osversion);
error = sysctlbyname("kern.osversion",
(void *)platform.osversion, &osversion_size, NULL, 0);
assert(error == 0);
// Get basic host info.
mach_port_t host = mach_host_self();
assert(MACH_PORT_VALID(host));
host_basic_info_data_t basic_info;
mach_msg_type_number_t count = HOST_BASIC_INFO_COUNT;
kern_return_t kr = host_info(host, HOST_BASIC_INFO, (host_info_t) &basic_info, &count);
assert(kr == KERN_SUCCESS);
platform.cpu_type = basic_info.cpu_type;
platform.cpu_subtype = basic_info.cpu_subtype;
platform.physical_cpu = basic_info.physical_cpu;
platform.logical_cpu = basic_info.logical_cpu;
platform.memory_size = basic_info.max_mem;
mach_port_deallocate(mach_task_self(), host);
// Log basic platform info.
DEBUG_TRACE(1, "platform: %s %s", platform.machine, platform.osversion);
}