I have been trying forever to crack this so I hope someone here can help me. I have a plist file which from my understandig is written in base64 encode binary plist. How can I covert this so it is actually readable. Here is a snippet of some of the data in the file:
<key>classKeyIdx</key>
<integer>11</integer>
<key>data</key>
<dict>
<key>ciphertext</key>
<data>
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0
b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRy
b290gAGmCwwVFhcYVSRudWxs1A0ODxAREhMUViRjbGFzc18QFlNG
SW5pdGlhbGl6YXRpb25WZWN0b3JcU0ZDaXBoZXJ0ZXh0XxAUU0ZB
dXRoZW50aWNhdGlvbkNvZGWABYAEgAKAA08RAUBAvCvsM96NqKlU
9ia5p3bzbxtssls26FA6Vf5LQryDagfVaoSyDdDuHGdMQmMtKwls
+AoVjEqhmnT9G7km7c5fScPBHysrCazJCT71Z/5TZBwYMhjcVS3U
weH7/u588wYigSjWf2odJnvY+fv5M19OJP9ldgz43W19yyXJrmqt
uzMWbDnj1OXpEa1AdC7D3ld30mt5tO2Ie9uQGs9ggwJMbvomVTnX
Q2bLI5NT7esS/0w3AqCm3h0pDEjZ8uOcb37DDm4eB8ppZhyi7YBR
hnlii/10mYYnqbxgXsGpwVOOEbhwJboYcOxGQYEBNgHXSFLgGF6f
BID53iPU/Iic1AuJNyepkLke3+ohp8MxxB8583ws422FcU7OMZia
kQWsvi2keGZ3qFbh5TA9nNqfRIoZ0xk36X6wcnrmODLy+4mRCk8Q
EDbi8aFoWsYO6vlAUAU/j1VPECBn5T3qX+uYursdxPEZFW5wbtOg
s2InhowRPlIA3Z4FCdIZGhscWiRjbGFzc25hbWVYJGNsYXNzZXNf
EBpfU0ZBdXRoZW50aWNhdGVkQ2lwaGVydGV4dKMdHh9fEBpfU0ZB
dXRoZW50aWNhdGVkQ2lwaGVydGV4dF1fU0ZDaXBoZXJ0ZXh0WE5T
T2JqZWN0AAgAEQAaACQAKQAyADcASQBMAFEAUwBaAGAAaQBwAIkA
lgCtAK8AsQCzALUB+QIMAi8CNAI/AkgCZQJpAoYClAAAAAAAAAIB
AAAAAAAAACAAAAAAAAAAAAAAAAAAAAKd
</data>
<key>tamperCheck</key>
<string>38FBD9A8-6BFE-41A3-A228-EACBA03663E1</string>
<key>unwrappedKey</key>
<data>
gvpDnO1bm662KrtkzGa4xoL9jqWIm1kJBWYlnAQKZuU=
</data>
As shown in the picture I am trying to get hold of the data in the marked area.
[What I I'm trying to find](https://i.stack.imgur.com/6RVN4.png)
Thanks for any responses!
(This is for a school project and this is data from a test phone)
I have tried tools like plutil on mac. I have also tried a base64 convertion online but the text did not make any sens.
There is no langage stated, so I'd go with Swift solutions:
It's the steps explained by @vadian's comment.
You can use
PropertyListDecoderto decode the main plist, if you know its structure.Let's imagine you have just:
Then, the corresponding class could be:
Decoding:
You should be able to retrieve
ciphertextvalue then.If you don't know the format, you can use
PropertyListSerializationthat will gives you a Dictionary back:Now, you should be able to access the Base64 data.
I have this two external extensions that I find nice when I don't know what encoding I'm dealing with:
So if you just want the
bplist00Ô...part, it should be enough then:I never remember which string encoding is valid for this kind of data, so I use the loop, that's why.
Now, if you want more infos on it:
There are two ways:
or
Tested on a sample bplist you can have on your Mac at
/Users/[YOURUSERNAME]/Library/Keyboard/textReplacements.cacheIt should you give something like that:
It's much more readable than the String conversions.
Important parts being
"$archiver" = NSKeyedArchiver, there was aNSKeyedArchiver, so unless you have the initial classes (main class, subclasses, etc.), it's some extra work to reverse engineer it the initial data.In my sample case, it's quite "simple", to read what are the data, but extract them back by code might need some more work.