Merge pull request #13 from sickcodes/v13

Update KVM-OpenCore to v13 for Monterey

Working on Monterey, Big-Sur & Catalina.

Both boot menu, and nopicker.
This commit is contained in:
sickcodes 2021-09-09 15:27:05 +00:00 committed by GitHub
commit 7a56669ec4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 374 additions and 147 deletions

285
README.md
View file

@ -2,24 +2,29 @@
![Running mac osx in a docker container](/running-mac-inside-docker-qemu.png?raw=true "OSX KVM DOCKER")
Generate macOS valid serials, uuids, and board serials for good-faith security research.
Generate macOS valid serials, uuids, and board serials for good-faith Security Research & Apple Bug Bounty Research.
This project provides two tools for generating serial numbers for Hackintosh, [OpenCore](https://github.com/acidanthera/OpenCorePkg), [Docker-OSX](https://github.com/sickcodes/Docker-OSX) and [OSX-KVM](https://github.com/kholia/OSX-KVM).
Author: Sick.Codes https://sick.codes/ & https://twitter.com/sickcodes
Author: Sick.Codes https://github.com/sickcodes | https://sick.codes | https://twitter.com/sickcodes
### Follow @sickcodes on Twitter for updates! [https://twitter.com/sickcodes](https://twitter.com/sickcodes)
Terms & Conditions: Serial numbers are an important part of conducting iMessage security research and finding vulnerabilities in software prior to Bad Actors, therefore, you must agree to [Apple's Security Bounty program](https://developer.apple.com/security-bounty/requirements/).
Terms & Conditions: Manipulation of serial numbers are an important aspect of conducting Cyber Security Research into the iMessage & Facetime frameworks. Finding and reporting vulnerabilities in Apple software before Threat Actors do is important. To use this project to find & discover vulnerabilities in said protocols, you should agree to [Apple's Security Bounty program](https://developer.apple.com/security-bounty/requirements/).
### Upstream Thanks
This project is a wrapper for the OpenCore bootloader's fantastic tool [macserial](https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macserial).
This project was created for use with [Docker-OSX](https://github.com/sickcodes/Docker-OSX) and uses `config.plist` files from [@Kholia](https://github.com/kholia)'s project https://github.com/kholia/OSX-KVM.
Many thanks to the OpenCore Project for providing `macserial`.
The `config.plist` files are also curated and maintained upstream by [@thenickdude](https://github.com/thenickdude) and we thank both of them for their excellent work. Upstream KVM changes are made at: [https://github.com/thenickdude/KVM-Opencore](https://github.com/thenickdude/KVM-Opencore)
This project is a wrapper for the [OpenCore project](https://dortania.github.io/getting-started/) bootloader's fantastic tool called [macserial](https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macserial).
Many thanks to the [OpenCore Project](https://dortania.github.io/getting-started/) for providing `macserial`.
See the project which drives Hackintosh: [https://github.com/acidanthera/OpenCorePkg](https://github.com/acidanthera/OpenCorePkg)
As seen on Vice: [Open-Source App Lets Anyone Create a Virtual Army of Hackintoshes](https://www.vice.com/en/article/akdmb8/open-source-app-lets-anyone-create-a-virtual-army-of-hackintoshes)
### PR & Contributor Credits
@ -29,21 +34,23 @@ https://github.com/sickcodes/osx-serial-generator/blob/master/CREDITS.md
- [Docker-OSX](https://github.com/sickcodes/Docker-OSX)
- [OSX-KVM](https://github.com/kholia/OSX-KVM)
- [KVM-Opencore](https://github.com/thenickdude/KVM-Opencore)
- [OpenCore](https://github.com/acidanthera/OpenCorePkg)
- [Hackintosh](https://www.reddit.com/r/hackintosh/)
# Purpose
These script were written by [@sickcodes](https://github.com/sickcodes) [https://twitter.com/sickcodes](https://twitter.com/sickcodes) for automating generating unique values at runtime in [Docker-OSX](https://github.com/sickcodes/Docker-OSX).
These shell scripts were written by [@sickcodes](https://github.com/sickcodes) [https://twitter.com/sickcodes](https://twitter.com/sickcodes) and were created for automating the generation of unique & valid values at runtime in [Docker-OSX](https://github.com/sickcodes/Docker-OSX).
This is for generating sets of serial numbers that simply work.
If this is your first time, just run the first command below, without any options, and you will be given 1 complete set.
If this is your first time, just `bash ./generate-unique-machine-values.sh` and you will be given 1 complete serial number set.
With your new serial numbers, you can:
- put them in your existing `config.plist` and reboot
- tell the script to make a new `OpenCore.qcow2`
- output as TSV and CSV, and more!
- use `--help` to see all available goodies
Used at runtime in [Docker-OSX](https://github.com/sickcodes/Docker-OSX).
@ -51,6 +58,8 @@ Used at runtime in [Docker-OSX](https://github.com/sickcodes/Docker-OSX).
- [https://github.com/sickcodes/Docker-OSX](https://github.com/sickcodes/Docker-OSX): "Run Mac in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X!"
- [https://github.com/thenickdude/KVM-Opencore](https://github.com/thenickdude/KVM-Opencore): "OpenCore disk image for Proxmox/QEMU"
# Requirements
```bash
@ -276,3 +285,265 @@ In the case example of why these scripts were written is:
--height "${HEIGHT:-1080}" \
--output-bootdisk "${BOOTDISK:=/home/arch/OSX-KVM/OpenCore-Catalina/OpenCore.qcow2}"
```
# Special Update Notes
2021-06-15 - On June 15th 2021 we updated the config.plist from v12 to v13 via [@thenickdude](https://github.com/thenickdude)'s upstream `config.plist` files from [KVM-Opencore](https://github.com/thenickdude/KVM-Opencore).
```bash
wget https://github.com/thenickdude/KVM-Opencore/compare/v12...v13.patch
patch -F 10 -p1 --verbose config-nopicker-custom.plist v12...v13.patch
patch -F 10 -p1 --verbose config-custom.plist v12...v13.patch
```
Rejected patch lines:
```patch
--- EFI/OC/config.plist
+++ EFI/OC/config.plist
@@ -644,43 +644,6 @@
</array>
<key>Patch</key>
<array>
- <dict>
- <key>Arch</key>
- <string>Any</string>
- <key>Base</key>
- <string>_cpu_topology_sort</string>
- <key>Comment</key>
- <string>algrey - cpu_topology_sort -disable _x86_validate_topology</string>
- <key>Count</key>
- <integer>1</integer>
- <key>Enabled</key>
- <true/>
- <key>Find</key>
- <data>
- 6AAA//8=
- </data>
- <key>Identifier</key>
- <string>kernel</string>
- <key>Limit</key>
- <integer>0</integer>
- <key>Mask</key>
- <data>
- /wAA//8=
- </data>
- <key>MaxKernel</key>
- <string>20.99.99</string>
- <key>MinKernel</key>
- <string>17.0.0</string>
- <key>Replace</key>
- <data>
- Dx9EAAA=
- </data>
- <key>ReplaceMask</key>
- <data>
- </data>
- <key>Skip</key>
- <integer>0</integer>
- </dict>
<dict>
<key>Arch</key>
<string>Any</string>
@@ -922,17 +891,19 @@
<key>Arguments</key>
<string></string>
<key>Auxiliary</key>
- <false/>
+ <true/>
<key>Comment</key>
<string>Memory testing utility</string>
<key>Enabled</key>
<false/>
+ <key>Flavour</key>
+ <string>MemTest</string>
<key>Name</key>
- <string>memcheck</string>
+ <string>memtest86</string>
<key>Path</key>
- <string>memcheck/memcheck.efi</string>
+ <string>memtest86/BOOTX64.efi</string>
<key>RealPath</key>
- <false/>
+ <true/>
<key>TextMode</key>
<false/>
</dict>
@@ -981,11 +954,13 @@
<key>boot-args</key>
<string>keepsyms=1</string>
<key>csr-active-config</key>
- <data>AAAAAA==</data>
+ <data>Jg8=</data>
<key>prev-lang:kbd</key>
<data>ZW4tVVM6MA==</data>
<key>run-efi-updater</key>
<string>No</string>
+ <key>ForceDisplayRotationInEFI</key>
+ <integer>0</integer>
</dict>
</dict>
<key>Delete</key>
--- Makefile
+++ Makefile
@@ -63,7 +63,7 @@ OpenCore-$(RELEASE_VERSION).iso : OpenCore-$(RELEASE_VERSION).dmg
OpenCoreEFIFolder-$(RELEASE_VERSION).zip : Makefile $(EFI_FILES)
rm -f $@
- zip -r $@ EFI
+ zip -X -r $@ EFI
%.gz : %
gzip -f --keep $<
--- src/AppleALC
+++ src/AppleALC
@@ -1 +1 @@
-Subproject commit 3c2f6315e6aed0cc3c45a9f01f84ef42fb497044
+Subproject commit 93be275a4495a1bdb7ff2c3238053f66b9c5195d
--- src/Lilu
+++ src/Lilu
@@ -1 +1 @@
-Subproject commit 5aeba9f98106a5a8a3057712b74e1608faf5e276
+Subproject commit 614712caa9d84b6e90305839bd74f3872a44a522
--- src/MacKernelSDK
+++ src/MacKernelSDK
@@ -1 +1 @@
-Subproject commit 2b584e8e2081ed22fc619151518921c8636d4639
+Subproject commit e73a6fcd42c94b6a908ad9fe197034c8f4bf442a
--- src/OcBinaryData
+++ src/OcBinaryData
@@ -1 +1 @@
-Subproject commit ccf3d0c36784100293ccfb2865e10cd37f7a78ee
+Subproject commit 6dd2d92383edee522052ebbe2c634c92894b37e6
--- src/OpenCorePkg
+++ src/OpenCorePkg
@@ -1 +1 @@
-Subproject commit 5668fb62b50e8141d93ae6fce3e3fe238822f6ef
+Subproject commit ae515dd0b1efe79940ce94bfd235399ba873a3f0
--- src/VirtualSMC
+++ src/VirtualSMC
@@ -1 +1 @@
-Subproject commit 2a7455daf65c356c867a1d65b8f2520ae575ee3e
+Subproject commit 30a3fa2bd920a15e41ef1439585bcc19885b89e3
--- src/WhateverGreen
+++ src/WhateverGreen
@@ -1 +1 @@
-Subproject commit 1daa2563b5e6e40f195aba5dc006e14c1d55dfd6
+Subproject commit 79efd986ac5f4f17e09b880f25ea45be64863b2f
```
Delete lines 641 - 675 in both `config-custom.plist` and `config-nopicker-custom.plist` which is `_cpu_topology_sort`.
Add
```diff
+ <key>ForceDisplayRotationInEFI</key>
+ <integer>0</integer>
```
-----------------
2021-05-04 - On May 4th 2021 we updated from v11 to v12 via [@thenickdude](https://github.com/thenickdude)'s upstream `config.plist` files from [KVM-Opencore](https://github.com/thenickdude/KVM-Opencore).
As seen in a PR to OSX-KVM upstream: [https://github.com/kholia/OSX-KVM/pull/173](https://github.com/kholia/OSX-KVM/pull/173)
```bash
wget https://github.com/thenickdude/KVM-Opencore/compare/v11...v12.patch
patch -F 10 -p1 --verbose config-nopicker-custom.plist v11...v12.patch
patch -F 10 -p1 --verbose config-custom.plist v11...v12.patch
```
Rejected patch lines:
```patch
--- EFI/OC/config.plist
+++ EFI/OC/config.plist
@@ -224,17 +344,17 @@
</dict>
<dict>
<key>Base</key>
- <string></string>
+ <string>\_SB.PCI0.LPCB.HPET</string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
- <string>_Q12 to XQ12</string>
+ <string>HPET _CRS to XCRS</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<false/>
<key>Find</key>
- <data>X1ExMg==</data>
+ <data>X0NSUw==</data>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
@@ -1056,9 +1302,9 @@
<key>AppleEvent</key>
<string>Builtin</string>
<key>CustomDelays</key>
- <string>Auto</string>
+ <false/>
<key>KeyInitialDelay</key>
- <integer>0</integer>
+ <integer>50</integer>
<key>KeySubsequentDelay</key>
<integer>5</integer>
<key>PointerSpeedDiv</key>
--- src/OpenCorePkg
+++ src/OpenCorePkg
@@ -1 +1 @@
-Subproject commit 5cd223f03dd555c2ad0c6f45181808a5105bb605
+Subproject commit 5668fb62b50e8141d93ae6fce3e3fe238822f6ef
```
Replaced
```xml
<key>Comment</key>
<string>_Q12 to XQ12</string>
```
with
```xml
<key>Base</key>
<string>\_SB.PCI0.LPCB.HPET</string>
<key>BaseSkip</key>
<integer>0</integer>
<key>Comment</key>
<string>HPET _CRS to XCRS</string>
```
and
```diff
- <data>X1ExMg==</data>
+ <data>X0NSUw==</data>
```
Ignored:
```diff
@@ -1056,9 +1302,9 @@
<key>AppleEvent</key>
<string>Builtin</string>
<key>CustomDelays</key>
- <string>Auto</string>
+ <false/>
<key>KeyInitialDelay</key>
- <integer>0</integer>
+ <integer>50</integer>
<key>KeySubsequentDelay</key>
<integer>5</integer>
<key>PointerSpeedDiv</key>
```
-----------------

View file

@ -444,38 +444,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>AGPMInjector.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>USBPorts.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@ -584,6 +552,38 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>USBPorts.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>AGPMInjector.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array>
@ -638,41 +638,6 @@
</array>
<key>Patch</key>
<array>
<dict>
<key>Base</key>
<string>_cpu_topology_sort</string>
<key>Comment</key>
<string>algrey - cpu_topology_sort -disable _x86_validate_topology</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>
6AAA//8=
</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data>
/wAA//8=
</data>
<key>MaxKernel</key>
<string>20.99.99</string>
<key>MinKernel</key>
<string>17.0.0</string>
<key>Replace</key>
<data>
Dx9EAAA=
</data>
<key>ReplaceMask</key>
<data>
</data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Base</key>
<string></string>
@ -732,7 +697,7 @@
////////AAAAAP//
</data>
<key>MaxKernel</key>
<string>20.99.99</string>
<string>21.99.99</string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
@ -790,6 +755,8 @@
<key>KernelCache</key>
<string>Auto</string>
</dict>
<key>ProvideCurrentCpuInfo</key>
<true/>
</dict>
<key>Misc</key>
<dict>
@ -867,6 +834,8 @@
<integer>0</integer>
<key>SecureBootModel</key>
<string>Disabled</string>
<key>AllowToggleSip</key>
<false/>
<key>Vault</key>
<string>Optional</string>
</dict>
@ -881,6 +850,8 @@
<string>Not signed for security reasons</string>
<key>Enabled</key>
<true/>
<key>Flavour</key>
<string>OpenShell:UEFIShell:Shell</string>
<key>Name</key>
<string>UEFI Shell</string>
<key>Path</key>
@ -895,6 +866,8 @@
<string>Perform shutdown</string>
<key>Enabled</key>
<true/>
<key>Flavour</key>
<string>Auto</string>
<key>Name</key>
<string>Shutdown</string>
<key>Path</key>
@ -926,6 +899,8 @@
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
<key>run-efi-updater</key>
<string>No</string>
<key>ForceDisplayRotationInEFI</key>
<integer>0</integer>
<key>csr-active-config</key>
<data>ZwAAAA==</data>
<key>prev-lang:kbd</key>
@ -946,6 +921,7 @@
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
<string>boot-args</string>
<string>ForceDisplayRotationInEFI</string>
</array>
</dict>
<key>LegacyEnable</key>
@ -987,7 +963,7 @@
<true/>
<key>Generic</key>
<dict>
<key>AdviseWindows</key>
<key>AdviseFeatures</key>
<false/>
<key>MLB</key>
<string>{{BOARD_SERIAL}}</string>
@ -1121,7 +1097,7 @@
<key>AppleEvent</key>
<false/>
<key>AppleFramebufferInfo</key>
<false/>
<string>Disabled</string>
<key>AppleImageConversion</key>
<false/>
<key>AppleImg4Verification</key>
@ -1147,6 +1123,8 @@
<key>OSInfo</key>
<false/>
<key>UnicodeCollation</key>
<key>AppleEg2Info</key>
<false/>
<false/>
</dict>
<key>Quirks</key>

View file

@ -444,38 +444,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>AGPMInjector.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>USBPorts.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@ -584,6 +552,38 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>USBPorts.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>BundlePath</key>
<string>AGPMInjector.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
</array>
<key>Block</key>
<array>
@ -638,41 +638,6 @@
</array>
<key>Patch</key>
<array>
<dict>
<key>Base</key>
<string>_cpu_topology_sort</string>
<key>Comment</key>
<string>algrey - cpu_topology_sort -disable _x86_validate_topology</string>
<key>Count</key>
<integer>1</integer>
<key>Enabled</key>
<true/>
<key>Find</key>
<data>
6AAA//8=
</data>
<key>Identifier</key>
<string>kernel</string>
<key>Limit</key>
<integer>0</integer>
<key>Mask</key>
<data>
/wAA//8=
</data>
<key>MaxKernel</key>
<string>20.99.99</string>
<key>MinKernel</key>
<string>17.0.0</string>
<key>Replace</key>
<data>
Dx9EAAA=
</data>
<key>ReplaceMask</key>
<data>
</data>
<key>Skip</key>
<integer>0</integer>
</dict>
<dict>
<key>Base</key>
<string></string>
@ -732,7 +697,7 @@
////////AAAAAP//
</data>
<key>MaxKernel</key>
<string>20.99.99</string>
<string>21.99.99</string>
<key>MinKernel</key>
<string>20.4.0</string>
<key>Replace</key>
@ -790,6 +755,8 @@
<key>KernelCache</key>
<string>Auto</string>
</dict>
<key>ProvideCurrentCpuInfo</key>
<true/>
</dict>
<key>Misc</key>
<dict>
@ -867,6 +834,8 @@
<integer>0</integer>
<key>SecureBootModel</key>
<string>Disabled</string>
<key>AllowToggleSip</key>
<false/>
<key>Vault</key>
<string>Optional</string>
</dict>
@ -881,6 +850,8 @@
<string>Not signed for security reasons</string>
<key>Enabled</key>
<true/>
<key>Flavour</key>
<string>OpenShell:UEFIShell:Shell</string>
<key>Name</key>
<string>UEFI Shell</string>
<key>Path</key>
@ -895,6 +866,8 @@
<string>Perform shutdown</string>
<key>Enabled</key>
<true/>
<key>Flavour</key>
<string>Auto</string>
<key>Name</key>
<string>Shutdown</string>
<key>Path</key>
@ -926,6 +899,8 @@
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
<key>run-efi-updater</key>
<string>No</string>
<key>ForceDisplayRotationInEFI</key>
<integer>0</integer>
<key>csr-active-config</key>
<data>ZwAAAA==</data>
<key>prev-lang:kbd</key>
@ -946,6 +921,7 @@
<key>7C436110-AB2A-4BBB-A880-FE41995C9F82</key>
<array>
<string>boot-args</string>
<string>ForceDisplayRotationInEFI</string>
</array>
</dict>
<key>LegacyEnable</key>
@ -987,7 +963,7 @@
<true/>
<key>Generic</key>
<dict>
<key>AdviseWindows</key>
<key>AdviseFeatures</key>
<false/>
<key>MLB</key>
<string>{{BOARD_SERIAL}}</string>
@ -1121,7 +1097,7 @@
<key>AppleEvent</key>
<false/>
<key>AppleFramebufferInfo</key>
<false/>
<string>Disabled</string>
<key>AppleImageConversion</key>
<false/>
<key>AppleImg4Verification</key>
@ -1147,6 +1123,8 @@
<key>OSInfo</key>
<false/>
<key>UnicodeCollation</key>
<key>AppleEg2Info</key>
<false/>
<false/>
</dict>
<key>Quirks</key>