As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to
A list of interesting conferences for vulnerability researchers. See also: https://twitter.com/i/lists/1543557448123957249
Name | Dates | Location | Site |
---|---|---|---|
OffensiveCon | 10-11/05/2024 | Berlin, Germany | https://www.offensivecon.org/ |
t2.fi | 18-19/04/2024 | Helsinki, Finland | https://t2.fi/ |
Zer0Con | 04-05/04/2024 | Seoul, South Korea | https://zer0con.org |
Code Blue | 08-09/11/2023 | Tokyo, Japan | https://codeblue.jp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iOS 16 introduced launch constraints, which can be used to constraint the launch of an application. | |
There are three types of constraints: | |
Self Constraints, which the launched application itself must meet | |
Parent Constraints, which the parent process must meet | |
Responsible Constraints, which the "responsible process" must meet (I assume that the responsible process is the process that asked launchd to launch a service) | |
Additionally, the TrustCache format was updated (see below) to support assigning each binary a "Constraint Category", which forces Self and Parent Constraints. | |
Note that Self, Parent and Responsible Constraints can also be set by the process performing the launch and they can be included in the code signature, in the new blob type 0xFADE8181. In both cases, the constraints are DER encoded (just like the DER entitlements). | |
Constraint Categories (from TrustCache, new in version 2): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <pthread/pthread.h> | |
#include <mach/mach.h> | |
struct ool_msg { | |
mach_msg_header_t hdr; | |
mach_msg_body_t body; | |
mach_msg_ool_ports_descriptor_t ool_ports[]; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To compile: clang++ -arch x86_64 -arch arm64 -std=c++20 library_injector.cpp -lbsm -lEndpointSecurity -o library_injector, | |
// then codesign with com.apple.developer.endpoint-security.client and run the | |
// program as root. | |
#include <EndpointSecurity/EndpointSecurity.h> | |
#include <algorithm> | |
#include <array> | |
#include <bsm/libbsm.h> | |
#include <cstddef> | |
#include <cstdint> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IOKit/IOKitLib.h> | |
#include <mach/mach.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
void hexdump(void *ptr, int buflen) { | |
unsigned char *buf = (unsigned char*)ptr; | |
int i, j; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from construct import * | |
LoadCmdType = "LoadCmdType" / Enum(Int32ul, | |
UNIXTHREAD = 0x05, | |
SEGMENT_64 = 0x19, | |
UUID = 0x1b, | |
BUILD_VERSION = 0x32, | |
DYLD_CHAINED_FIXUPS = 0x80000034, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If you like this script and my work on libimobiledevice, please | |
# consider becoming a patron at https://patreon.com/nikias - Thanks <3 | |
REV=1.0.19 | |
if test "`echo -e Test`" != "Test" 2>&1; then | |
echo Please run this with zsh or bash. | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if 0 | |
Reported : 19-Jan-2020 | |
Fixed in iOS 13.4 with CVE-2020-9768 | |
AppleJPEGDriverUserClient : mach port use-after-free/type-confusion via race condition | |
AppleJPEGDriverUserClient external methods can be used synchronously or asynchronously, when used asynchronously, | |
it brings the registered mach port (via registerNotificationPort()) and put it inside jpegRequest data structure, | |
and no reference count was taken for this operation. since registerNotificationPort() is not gated, it is | |
possible to release the port (if the port got substituted) during the processing of jpeg request and end up | |
with dangling pointer passed to _mach_msg_send_from_kernel_proper(). |
NewerOlder