Crash when sending http/https request on iOS root process (jailbroken device)

282 Views Asked by At

I'm trying to access some url (any URL) and it failed from iOS root process (running on Jailbroken device)

  1. I Creating an application which running SockPuppet Exploit (iOS 12.0)
  2. After exploitation, the app responsible to running another process on root privileges
  3. The new process responsible to access url
  4. On any URL I tried to, I'm getting a crash.

Here is my code:

NSURL *url = [NSURL URLWithString:@"https://jsonplaceholder.typicode.com/todos/1"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[url       standardizedURL]];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
NSURLSessionDataTask *sessionPostDataTask = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
    if (data == nil)
    {
        return;
    }

NSLog(@"data: %@", data);
}]; 
[sessionPostDataTask resume];

Crash Info:

OS Version:          iPhone OS 12.0 (16A366)
Baseband Version:    3.00.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  1

Application Specific Information:
abort() called

Last Exception Backtrace:
0   CoreFoundation                 0x220e4bef8 __exceptionPreprocess + 228
1   libobjc.A.dylib                0x220019a40 objc_exception_throw + 55
2   CoreFoundation                 0x220dc185c _CFThrowFormattedException + 111
3   CoreFoundation                 0x220d30e20 -[__NSArrayM insertObject:atIndex:] + 1211
4   Foundation                     0x2217c6480 -[NSUserDefaults+ 25728 (NSUserDefaults) init] + 255
5   Foundation                     0x2217c6338 +[NSUserDefaults+ 25400 (NSUserDefaults) standardUserDefaults] + 83
6   UIFoundation                   0x22b45f8a0 attributeDictionaryHash + 367
7   Foundation                     0x2218a7324 hashProbe + 71
8   Foundation                     0x2217c4e34 -[NSConcreteHashTable getItem:] + 39
9   UIFoundation                   0x22b40a868 +[NSAttributeDictionary newWithDictionary:] + 135
10  UIFoundation                   0x22b45f678 +[NSAttributeDictionary initialize] + 899
11  libobjc.A.dylib                0x220015024 CALLING_SOME_+initialize_METHOD + 23
12  libobjc.A.dylib                0x22001af84 _class_initialize + 295
13  libobjc.A.dylib                0x2200248f8 lookUpImpOrForward + 279
14  libobjc.A.dylib                0x220031098 _objc_msgSend_uncached + 55
15  Foundation                     0x2217eff0c -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 419
16  Foundation                     0x22180caf8 -[NSConcreteMutableAttributedString initWithString:] + 267
17  liblog_network.dylib           0x24abb6bb8 NWOLCopyFormattedStringIPv4Address + 379
18  liblog_network.dylib           0x24abb6a20 OSLogCopyFormattedString + 195
19  libsystem_trace.dylib          0x220a7fac4 _os_log_fmt_compose_annotated + 703
20  libsystem_trace.dylib          0x220a7f250 os_log_fmt_compose + 883
21  libsystem_trace.dylib          0x220a84c0c _os_log_impl_flatten_and_send + 3163
22  libsystem_trace.dylib          0x220a868ec os_log_pack_compose + 83
23  libnetwork.dylib               0x221ff3b88 -[NWConcrete_nw_address_endpoint createDescription:] + 315
24  libnetwork.dylib               0x221ff5130 -[NWConcrete_nw_endpoint getDescription] + 83
25  libnetwork.dylib               0x221f809c8 nw_endpoint_resolver_update + 5511
26  libnetwork.dylib               0x221e8c020 __nw_resolver_update_client_block_invoke + 103
27  libdispatch.dylib              0x2208836c8 _dispatch_call_block_and_release + 23
28  libdispatch.dylib              0x220884484 _dispatch_client_callout + 15
29  libdispatch.dylib              0x22082db9c _dispatch_workloop_invoke$VARIANT$mp + 2311
30  libdispatch.dylib              0x220834f00 _dispatch_workloop_worker_thread + 599
31  libsystem_pthread.dylib        0x220a660f0 _pthread_wqthread + 311
32  libsystem_pthread.dylib        0x220a68d00 start_wqthread + 3


Thread 1 name:  Dispatch queue: com.apple.network.connections
Thread 1 Crashed:
0   libsystem_kernel.dylib         0x00000002209e1104 __pthread_kill + 8
1   libsystem_pthread.dylib        0x0000000220a5c0e0 pthread_kill$VARIANT$mp + 380
2   libsystem_c.dylib              0x0000000220938d78 abort + 140
3   libc++abi.dylib                0x0000000220000f78 __cxa_bad_cast + 0
4   libc++abi.dylib                0x0000000220001120 default_unexpected_handler+ 8480 () + 0
5   libobjc.A.dylib                0x0000000220019e48 _objc_terminate+ 28232 () + 124
6   libc++abi.dylib                0x000000022000d0fc std::__terminate(void (*)+ 57596 ()) + 16
7   libc++abi.dylib                0x000000022000d188 std::terminate+ 57736 () + 84
8   libsystem_trace.dylib          0x0000000220a7fc54 _os_log_fmt_compose_annotated + 1104
9   libsystem_trace.dylib          0x0000000220a7f250 os_log_fmt_compose + 884
10  libsystem_trace.dylib          0x0000000220a84c0c _os_log_impl_flatten_and_send + 3164
11  libsystem_trace.dylib          0x0000000220a868ec os_log_pack_compose + 84
12  libnetwork.dylib               0x0000000221ff3b88 -[NWConcrete_nw_address_endpoint createDescription:] + 316
13  libnetwork.dylib               0x0000000221ff5130 -[NWConcrete_nw_endpoint getDescription] + 84
14  libnetwork.dylib               0x0000000221f809c8 nw_endpoint_resolver_update + 5512
15  libnetwork.dylib               0x0000000221e8c020 __nw_resolver_update_client_block_invoke + 104
16  libdispatch.dylib              0x00000002208836c8 _dispatch_call_block_and_release + 24
17  libdispatch.dylib              0x0000000220884484 _dispatch_client_callout + 16
18  libdispatch.dylib              0x000000022082db9c _dispatch_workloop_invoke$VARIANT$mp + 2312
19  libdispatch.dylib              0x0000000220834f00 _dispatch_workloop_worker_thread + 600
20  libsystem_pthread.dylib        0x0000000220a660f0 _pthread_wqthread + 312
21  libsystem_pthread.dylib        0x0000000220a68d00 start_wqthread + 4

0

There are 0 best solutions below