searchpartykeys

package module
v0.0.0-...-456d796 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2024 License: MIT Imports: 11 Imported by: 0

README

searchparty-keys

This is a small package that can be used to derive Apple FindMy keys.

Prerequisites

  • OwnedBeacons folder (from macOS / iOS)
  • Beacon Store key (from macOS Keychain / iOS Keychain)

Requirements

  • Go

Installation

go install github.com/denysvitali/searchparty-keys/cmd/searchparty-keys@latest

Usage

See all the usage information by running searchparty-keys -h

read -s -r DECRYPTION_KEY
# Type the decryption key (BeaconStore) and press ENTER
searchparty-keys generate-keys -a 5 ./OwnedBeacons/B24F0C9F-42D6-4D38-B092-EFA8736A01B1.record
Result
INFO[0000] Beacon: World Tag (a:/B24F0C9F-42D6-4D38-B092-EFA8736A01B1~#ABCDEF123456A800, 1.7.30) - Paired on 2024-06-27T17:28:25Z 
INFO[0000] Start time: 2024-06-28T20:36:06+02:00        
WARN[0000] Setting key offset to 102                    
Private key: [MASKED]
Advertisement key: bWWRtXpzYuukEJ2MBNACY3GrPJ7+4oErVBp0Dg==
Hashed adv key: /Z5xHE5LcnSnypZ1x7BYDItDwp9ON2fnarSY/6AAE+c=
BT Addr: ED:65:91:B5:7A:73


Private key: [MASKED]
Advertisement key: VebtsUnqKA/UtIbLhnWKgKvBhrBg/J/2CucD3A==
Hashed adv key: ngdFMZSE5oZQN8aMeftRZ4iFlLXHu/eX0O2iBZegl3E=
BT Addr: D5:E6:ED:B1:49:EA


Private key: [MASKED]
Advertisement key: Q/pmNxvYe1T52pie4y9iwpYd4sr6RDRnQwBtyg==
Hashed adv key: ML0bv/1eTh6Oc+VmIusm7TWb9OrZxyRIc4ka4libtqE=
BT Addr: C3:FA:66:37:1B:D8

# ...

References

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BtAddrFromAdvKey

func BtAddrFromAdvKey(key []byte) []byte

func Decrypt

func Decrypt(f io.ReadSeeker, key []byte) ([]byte, error)

func X963KDF

func X963KDF(secret, sharedInfo []byte, keyLength int) ([]byte, error)

Types

type Beacon

type Beacon struct {
	ProductId             int       `plist:"productId"`
	CloudkitMetadata      []byte    `plist:"cloudKitMetadata"`
	StableIdentifier      []string  `plist:"stableIdentifier"`
	PairingDate           time.Time `plist:"pairingDate"`
	BatteryLevel          int       `plist:"batteryLevel"`
	IsZeus                bool      `plist:"isZeus"`
	PrivateKey            Key       `plist:"privateKey"`
	Identifier            string    `plist:"identifier"`
	SystemVersion         string    `plist:"systemVersion"`
	SharedSecret          Key       `plist:"sharedSecret"`
	SecondarySharedSecret Key       `plist:"secondarySharedSecret"`
	Model                 string    `plist:"model"`
	VendorId              int       `plist:"vendorId"`
	PublicKey             Key       `plist:"publicKey"`
}

func Decode

func Decode(f io.ReadSeeker) (*Beacon, error)

func (*Beacon) PrimaryRotations

func (b *Beacon) PrimaryRotations(startTime time.Time) int

func (*Beacon) SecondaryRotations

func (b *Beacon) SecondaryRotations(startTime time.Time) int

type DeviceLocations

type DeviceLocations struct {
	LocationPayload []P    `json:"locationPayload"`
	ConfigVersion   int    `json:"configVersion"`
	StatusCode      string `json:"statusCode"`
}

type Info

type Info struct {
	LocationTs int64  `json:"locationTs"`
	Location   string `json:"location"`
	Fmt        int    `json:"fmt"`
}

type Key

type Key struct {
	Key KeyData `plist:"key"`
}

type KeyData

type KeyData struct {
	Data []byte `plist:"data"`
}

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

func CalculateAdvertisementKeys

func CalculateAdvertisementKeys(d0, SK0 []byte, iterations int, offset int) (keys []KeyPair, err error)

func NewKeyPair

func NewKeyPair(key []byte) KeyPair

func (*KeyPair) AdvKeyBytes

func (k *KeyPair) AdvKeyBytes() []byte

func (*KeyPair) HashedAdvKey

func (k *KeyPair) HashedAdvKey() []byte

func (*KeyPair) PrivateKey

func (k *KeyPair) PrivateKey() []byte

type Locations

type Locations struct {
	LocationPayload []Payload `json:"locationPayload"`
	ConfigVersion   int       `json:"configVersion"`
	StatusCode      string    `json:"statusCode"`
}

type P

type P struct {
	LocationInfo []Info `json:"locationInfo"`
	Id           string `json:"id"`
}

type Payload

type Payload struct {
	LocationInfo []string `json:"locationInfo"`
	Id           string   `json:"id"`
}

type Report

type Report struct {
	Time       time.Time
	Confidence byte
	Lat        float32
	Lng        float32
	Accuracy   int8
	Status     int8
}

func ParseLocationReport

func ParseLocationReport(key *KeyPair, content []byte) (*Report, error)

func (Report) String

func (r Report) String() string

type SearchResponse

type SearchResponse struct {
	ConfigVersion        int             `json:"configVersion"`
	AcsnLocations        Locations       `json:"acsnLocations"`
	OwnedDeviceLocations DeviceLocations `json:"ownedDeviceLocations"`
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL