• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An explanation on unredacting iOS's <private> os_log privacy mechanism

Unredacting <private> os_log() messages on iOS.

tldr: Save com.apple.system.logging.plist inside of /Library/Preferences/Logging/ and execute killall logd.

rootless path: /private/var/preferences/Logging/com.apple.system.logging.plist

Discovery

The motivation for finding this came while working on a project that deals with resigning applications and installing them to a device. When trying to install an application that holds invalid entitlements, installd would produce the following log message: entitlement <private> has value not permitted by provisioning profile <private>. Seeing the real contents of this message would greatly reduce the amount of time I spent debugging entitlements.

logd seems like the obvious first place to start looking. Pull the binary off of a jailbroken iOS device and throw it in a disassembler. The goal is to remove <private>; searching for string references of private shows promising results, specifically Enable-Private-Data.

private search results

It has only 1 cross-reference, a function located at 0x100009648. This function is a part of the initialization of the system's default logger. The usage of the string hints at it being a preference key.

private usage

Enable-Private-Data is loaded into register x1 from address 0x10001e775, to be used as the second argument in a branch to function xpc_dictionary_get_bool(). The result is used later on in the continued creation of the default logger. We need to set this key to TRUE to enable logging of <private> items.

Looking into the documentation for xpc_dictionary_get_bool(), the first argument is the dictionary containing the target key: bool xpc_dictionary_get_bool(xpc_object_t xdict, const char *key);

Directly before the branch to this function, register x0 is populated from x19, which we can assume contains the xpc_object_t representation of the dictionary that we need to modify. How does this get created?

plist creation

It's easier to read what this is doing backwards, from the bottom to the top. x19 is populated via a branch to _os_trace_read_plist_at(), using the return value of the snprintf_chk() branch performed at 0x1000096e8. At 0x1000096cc we can see the format string to be used, %s/%s.plist. Just above that are the values to be used to populate it: the return value of _os_trace_prefsdir_path() and the string com.apple.system.logging. _os_trace_prefsdir_path() is implemented in libSystem.dylib and returns string /Library/Preferences/Logging/.

With this, this full plist path can be constructed: /Library/Preferences/Logging/com.apple.system.logging.plist. It seems all we need to do is create a plist file at this path, containing a bool key Enable-Private-Data with value of TRUE. Could it be that simple?

unredacted

Yep.

Some problems can only be solved by reverse engineering, but that doesn't mean they aren't simple.

More Repositories

1

Apollo-CustomApiCredentials

Tweak to use your own reddit API credentials in Apollo
Objective-C
746
star
2

carplay-cast

iOS tweak that allows any app to be used with CarPlay
Objective-C++
320
star
3

TweakInspect

Automated analysis of iOS jailbreak tweaks
Python
38
star
4

Mirmir

Multitasking tweak by Ethan Arbuckle, Liam Thynne, and Cortex Dev Team
Objective-C
35
star
5

cymbal

A runtime symbolicator for objective-c symbols
Objective-C
35
star
6

RespringProgress

Adds a progress bar under the Apple logo during resprings that tracks SpringBoards launch progress
Logos
31
star
7

Stratos

A popular tweak for jailbroken devices
C
25
star
8

usbfluxd-usage

Using usbfluxd to establish connections to remote usbmuxd instances
24
star
9

PrettyRespring

Make resprings prettier! This tweak replaces the normal apple logo you see during a respring with whatever was last being shown on screen. If you respring while on the HomeScreen, you'll continue to see a static image of the HomeScreen until SpringBoard is fully launched. If SpringBoard crashes while you are browsing Safari, you'll get a still snapshot of Safari while SpringBoard boots back up. This tweak works best when iOS's built in respring method is used, but also works with crashes, and killalls (SIGTERM, SIGKILL, etc). Compatible with iPhones and iPads running iOS 9
Logos
23
star
10

ForceTouch

ForceTouch implementation using IOKit events
Logos
21
star
11

vncforios

VNC server for iOS and tvOS
C
19
star
12

EASplashScreen

Add an awesome sliding splash screen to your app with 3 lines of code
Objective-C
17
star
13

BayBrowser-2

BayBrowser is a feature filled PirateBay browser and torrent downloader for iPhones and iPads.
C
15
star
14

Hopper-Disassembler-API

This project injects into Hopper Disassembler and exposes core functionality via a local server. It can be used to create automations/tooling that make use of Hopper's binary analysis (including pseudocode generation)
Python
14
star
15

dopamine-jb-detection

Objective-C
14
star
16

ForceTouchActivator

Trigger an activator event by firmly pressing down anywhere on your device's screen.
Logos
13
star
17

dlopen_handle_info

helper functions for getting information about a dlopen() handle, such as install path and mach_header
Objective-C
12
star
18

tss_fuzzer

fuzzing input to the ios firmware signing server
Objective-C
8
star
19

notificationpop

force touch anywhere on screen while a notification banner is showing will act as a tap on the notification
Logos
7
star
20

SwipeToRespring

Swipe up on the homescreen icon to respring : iOS 7 jailbreak tweak
Logos
6
star
21

its-my-birthday

when self.age++ isnt enough
C
5
star
22

pasta

Logos
4
star
23

GTA5-IP-resolver

retrieve IP address of users in GTA 5 online
Objective-C
3
star
24

EAMp3SkullAPI

Objective-C API wrapper for mp3skull.com
Objective-C
3
star
25

coolbooter-legacy

first POC of Coolbooter (iOS dual booting) that was never finished. shoutout notjon for the idea, research, and delivering an actual working solution
C
2
star
26

iohiddevice-notification-listener-thing

C
2
star
27

pandora-blowfish

implementation of Pandora's network payload encryption and decryption functions
C
2
star
28

cycript-tvos-15-patch

Objective-C
2
star
29

FullKarma

jailbreak tweak to make AlienBlue show full karma numbers
Logos
2
star
30

AlienBlueTags

Jailbreak tweak that adds RES like user tagging to AlienBlue and AlienBlueHD
Logos
1
star
31

gridswitcher

Objective-C
1
star
32

nfsserver-tvos

tvos nfs server
C
1
star
33

EARedditAPI

Drop in reddit API for iPhones.
Objective-C
1
star
34

AudioCoffee

Half-built music app for iPhones.
Objective-C
1
star
35

AlienAlert

Gives me a notification when there is a new post on /r/AlienBlue. Could easily be changed to monitor any sub
Objective-C
1
star