Some time last week I replied to telepati and mentioned that some of the device properties were broken in his setup.
The Problem
Sometimes you want (property name) Data <“desired text”> instead of (property name) Data <646573697265642074657874>. This is possible. If you know how to do it. I do as can be seen on the following screenshots:
Anyway. I happen to have a little script for it that I like to share with you today. Here it is:
!/bin/bash # # Script (str2base64.sh) to convert a string to base64 data in a way that it can be # used for properties as text instead of hex data. # # # Version 1.1 - Copyright (c) 2013-2016 by Pike R. Alpha # # # Get input from user. # read -p "Enter string to convert: " string # # Convert to postscript format. # data=$(echo -n "${string}"|xxd -ps|tr -d '\n') # # Add "00" to the data and convert it to base64 data. # echo -n "${data}00"|xxd -r -p|base64
You can get this script, which I called str2base64.sh, from my Github repository. Run it. Fix your property string data like a pro. This way you won’t have to scratch your head when you see those funny hex characters 😉
Edit: You can also use my script for the following device-properties:
booter-name
booter-version
booter-build-time
Or you could google for a Hex to Text calculator and use Xcode? Cool script. Think it would be useful as an ios App? Is there one I wonder?
The problem is that Xcode doesn’t know when you need the trailing 00.
I don’t know why you would want have an iOS App for, it but an App for OS X/MacOS X is probably simple and I am sure that someone will develop one, one day soon.
Oh… ok.. I guess thats specific to gfx injection. Didn’t need that for Nvme. Would make a cool app though for either ios or osx.
Yup. And don’t forget hda-gfx Data <“onboard-1”> for IGPU, HDEF et all.
Edit: Device HDEF also includes hda-idle-support Data <“1”>.
Thank you Pike. But I am really stupid about this code thing.
Which string I must to enter? on the model on the device_type? or I understand everything wrong again?
[img]http://i.imgur.com/1bIzB8b.png[/img]
I am doing this from my iPad and looking at the hex data, device_type = “display” and model = “Intel HD Graphics 530”.
Hey Pike I made it but it does not effect anything. My model still looks bunch of numbers. I attached my Terminal output and ioreg Before and After files. Could you please look at it when you have time.
https://app.box.com/s/ky0cbgle8ndzll9pcamsu4x61lt4wvbf
No wonder. You entered hex data instead of “Intel HD Graphics 530” for the model property. There is no need to set device_type so skip it.
This is the last time to asking for you. I don’t know but It still doesn’t work for me. I entered “Intel HD Graphics 530” for string click to enter and check on the ioreg its still show model as hex data. Here is the terminal output;
Running the script is not enough. All the script does is convert your input into a base64 data string. One that you need to use for the property that you want changed.
Your screenshot shows (R) and (TM), but I’m not sure that is correct, as the IOJones dump I sent you from that MacbookPro13,1 has the model without (R) and (TM).
No. Apple does not use it, but the screenshots are only examples. To show people that it can be done. By using the proper format.
Okay, just wanted to be sure 🙂
Also if I understand the script, it first convert to hex, then remove trailing newline, then add a null terminator to the string and then convert the hex version to base64, is that correct?
Correct.
Hello piker, not sure if this is the best place to share this, but I don’t see another way. I just learned about a interesting tool, you may know it already but just wanted to share it with you just in case… Facebook’s new open source wonder app, osquery https://osquery.io.. Allows you to list anything in your OS, even acpi tables and tons of other cool stuff with an SQL syntax..
Thanks for sharing this with me. Looks interesting.
Hi Piker! I couldn’t help but notice that you have the Iris Pro 580 working in Mac OS Sierra. What did you do to make it work? Mine worked fine in El Capitan, but when I upgraded to Sierra, I get “graphics driver failed to load could not register with framebuffer driver” when booting in verbose mode. System profiler says “Intel Iris Pro Graphics 580 6 MB” and “Kernel Extension Info: No Kext Loaded”. This make the screen flicker with artefacts…
It’s an Intel NUC Skull Canyon (NUC6i7KYK).
I have done everything according to Rehabman’s guide for the NUC over at tonymacx86, and it worked great until Sierra came along. I have used your ssdtPRGen.sh to make my SSDT.aml file. My ig-platform-id is set to 0x193b0000 and Intel inject is set to YES. SMBIOS is set to iMac 17,1.
I am clueless as what to do next… and then I saw the screenshot above. I was hoping that you may have a tip as what to try next?
Thank you for the great work you are doing for the hacker community!
No. Sorry. I have not. I only changed the name property to let people see that it can be done (properly).
I create a test named test.plist by xcode for testing. I convert a string via your script, for example: display->ZGlzcGxheQA=,then add new item in test.plist which type is data and value ZGlzcGxheQA=,
New item
ZGlzcGxheQA=
at last, reopen it with xcode, the item is show . not ,what wrong with me??
You clearly don’t understand the meaning of the script, and what you can/should do with the generated output. I mean what you have there (ZGlzcGxheQA=) is “display” with a trailing NULL character. Or is the name property showing an incorrect value?