Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add offsets for High Sierra, Mojave and Catalina #12

Merged
merged 5 commits into from
Jan 9, 2024

Conversation

jetfir3
Copy link
Contributor

@jetfir3 jetfir3 commented Dec 29, 2023

  • 10.13.6

  • 10.14.6

  • 10.15.1

  • 10.15.2

  • 10.15.3

  • 10.15.4

  • 10.15.5

  • 10.15.6/7

  • x86_64 only as these macOS versions do not support arm64

  • macOS 10.14 and earlier lack the "IDSProtoKeyTransparencyTrustedServiceReadFrom" symbol so another reference symbol was used for 10.14.6

I was able to successfully register Beeper Mini on both macOS 10.14.6 and 10.15.3.
Each binary version was disassembled and offsets manually found... so the other 10.15.x offsets should good.

Update: I have also added a PR to the beeper/imessage repo to resolve the Beeper Mini crash another way, beeper/imessage#11

Update 2: High Sierra 10.13.6 offsets added

- 10.14.6
- 10.15.1
- 10.15.2
- 10.15.3
- 10.15.4
- 10.15.5
- 10.15.6/7

- x86_64 only has these macOS versions do not support arm64
- macOS 10.14 and earlier lack the "IDSProtoKeyTransparencyTrustedServiceReadFrom" symbol so another reference symbol was used for 10.14.6
- each binary version was disassembled and offsets manually found
nac/offsets.go Outdated
@@ -168,4 +239,4 @@ func hexToByte32(val string) [32]byte {
panic(fmt.Errorf("expected 32 bytes, got %d", len(out)))
}
return *(*[32]byte)(out)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems the newline at the end of the file got removed in this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing that up, looks good :)

@0xdevalias
Copy link
Contributor

@jetfir3 I just saw your PR to add a bunch of other offsets (#12), and was wondering if you'd be able to upload the identityservicesd binaries for those versions somewhere as per this comment so I can test/refine my auto-offset-finding code.

Originally posted by @0xdevalias in #9 (comment)

@jetfir3 jetfir3 mentioned this pull request Jan 1, 2024
@jetfir3 jetfir3 changed the title Add offsets for Mojave and Catalina Add offsets for High Sierra, Mojave and Catalina Jan 1, 2024
@@ -6,7 +6,7 @@ registration code and use it in Beeper Mini.
## Supported MacOS versions
The tool is currently quite hacky, so it only works on specific versions of macOS.

* Intel: 11.5 - 11.7, 13.3.1, 13.5 - 13.6, 14.0 - 14.3
* Intel: 10.14.6, 10.15.1 - 10.15.7, 11.5 - 11.7, 13.3.1, 13.5 - 13.6, 14.0 - 14.3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the High Sierra offsets were added in e018389 (#12), this should be updated:

Suggested change
* Intel: 10.14.6, 10.15.1 - 10.15.7, 11.5 - 11.7, 13.3.1, 13.5 - 13.6, 14.0 - 14.3
* Intel: 10.13.6, 10.14.6, 10.15.1 - 10.15.7, 11.5 - 11.7, 13.3.1, 13.5 - 13.6, 14.0 - 14.3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not confirmed if Go binaries built by a macOS 11 runner will run on macOS 10.13.6.

The macOS 13 runner is currently used by default and macOS 10.14.x is unable to run the Go binary so my other PR lowers the runner to macOS 11 which does allow macOS 10.14.x to run the built binary... but someone on macOS 10.13.6 would need to test if the Go binary built on macOS 11 also runs on macOS 10.13.6.

For this reason, I was unsure if listing macOS 10.13.6 prior to confirmation was ideal. Yes, the project would run on macOS 10.13.6 if built locally on a machine running said version but official "Releases" in the repo may or may not.

I have no issues adding macOS 10.13.6 to README via this current PR if others think it should be added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, that makes sense. My thought was mostly because you added the offsets for 10.13.6, so the tool would work on a binary from that version of macOS (eg. if running on another machine)

As for the specifics you mention above, I'll delegate to letting someone 'official' answer that; this was just my personal /2c.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should also note, I can also post offsets for 10.12, 10.11 etc.. but I stopped at 10.13.6 (last High Sierra update) due to the macOS11 runner generated binaries likely not working below 10.13.6 (possibly not even 10.13.6).

If members officially tied to the project wouldn't mind us adding offsets the auto-builds can't support, requiring users to build themselves, I will add the additional offsets. The other PRs I've made to add support for 10.15 and below should with 10.12, 10.11, 10.10, 10.9, 10.8, 10.7... and possibly lower. Though we then might run into issues with the OS not supporting Go or the current Go code properly.

So... how low can we go? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, how do you have access to the older binaries? Extracting them from Time Machine backups/similar, or?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Downloading macOS and extracting the binary for each version.

https://github.com/corpnewt/gibMacOS
https://support.apple.com/kb/DL2052
etc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh cool! Didn't know about that :)

Copy link
Contributor

@0xdevalias 0xdevalias Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should also note, I can also post offsets for 10.12, 10.11 etc.. but I stopped at 10.13.6 (last High Sierra update) due to the macOS11 runner generated binaries likely not working below 10.13.6 (possibly not even 10.13.6)

@jetfir3 It's sort of OOS of this PR, but I noticed that there are currently hashes for 12.6.3 / 13.2.1, but seemingly no offsets for them. Are those versions you're able to access with your method above? (Ref):

// macOS 12.6.3
hexToByte32("6e8caf477c2b4d3a56a91835a2b6455f36fb0feb13006def7516ac09578c67d0"): {},
// macOS 13.2.1
hexToByte32("4d96de9438fdea5b0b7121e485541ecf0a74489eeb330c151a7d44d289dd3a85"): {},

Also, a few other issues that seem to be seeking different versions, if you were interested:

@smizles
Copy link

smizles commented Jan 2, 2024

Praying this PR gets merged soon because the only iMac I have access to for use with Beeper is old and can't be upgraded past High Sierra 10.13.6...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants