Skip to content

Commit a87ff2c

Browse files
authored
Merge pull request #1041 from HackTricks-wiki/update_CVE-2024-44236__Remote_Code_Execution_in_Apple_mac_20250708_181937
Add content: CVE-2024-44236 Remote Code Execution in Apple macOS sips Uti...
2 parents d4ebce5 + a38a02d commit a87ff2c

File tree

21 files changed

+83
-11
lines changed

21 files changed

+83
-11
lines changed

src/AI/AI-llm-architecture/1.-tokenizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ print(token_ids[:50])
9999
- [https://www.manning.com/books/build-a-large-language-model-from-scratch](https://www.manning.com/books/build-a-large-language-model-from-scratch)
100100

101101

102-
{{#include /banners/hacktricks-training.md}}
102+
{{#include /banners/hacktricks-training.md}}

src/AI/AI-llm-architecture/2.-data-sampling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,4 @@ tensor([[ 367, 2885, 1464, 1807],
241241
- [https://www.manning.com/books/build-a-large-language-model-from-scratch](https://www.manning.com/books/build-a-large-language-model-from-scratch)
242242

243243

244-
{{#include /banners/hacktricks-training.md}}
244+
{{#include /banners/hacktricks-training.md}}

src/AI/AI-llm-architecture/3.-token-embeddings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ print(input_embeddings.shape) # torch.Size([8, 4, 256])
219219
- [https://www.manning.com/books/build-a-large-language-model-from-scratch](https://www.manning.com/books/build-a-large-language-model-from-scratch)
220220

221221

222-
{{#include /banners/hacktricks-training.md}}
222+
{{#include /banners/hacktricks-training.md}}

src/AI/AI-llm-architecture/5.-llm-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,4 +702,4 @@ print("Output length:", len(out[0]))
702702
- [https://www.manning.com/books/build-a-large-language-model-from-scratch](https://www.manning.com/books/build-a-large-language-model-from-scratch)
703703

704704

705-
{{#include /banners/hacktricks-training.md}}
705+
{{#include /banners/hacktricks-training.md}}

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -795,6 +795,7 @@
795795
- [BF Forked & Threaded Stack Canaries](binary-exploitation/common-binary-protections-and-bypasses/stack-canaries/bf-forked-stack-canaries.md)
796796
- [Print Stack Canary](binary-exploitation/common-binary-protections-and-bypasses/stack-canaries/print-stack-canary.md)
797797
- [Write What Where 2 Exec](binary-exploitation/arbitrary-write-2-exec/README.md)
798+
- [Aw2exec Sips Icc Profile](binary-exploitation/arbitrary-write-2-exec/aw2exec-sips-icc-profile.md)
798799
- [WWW2Exec - atexit()](binary-exploitation/arbitrary-write-2-exec/www2exec-atexit.md)
799800
- [WWW2Exec - .dtors & .fini_array](binary-exploitation/arbitrary-write-2-exec/www2exec-.dtors-and-.fini_array.md)
800801
- [WWW2Exec - GOT/PLT](binary-exploitation/arbitrary-write-2-exec/aw2exec-got-plt.md)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# WWW2Exec - sips ICC Profile Out-of-Bounds Write (CVE-2024-44236)
2+
3+
{{#include ../../banners/hacktricks-training.md}}
4+
5+
## Overview
6+
7+
An out-of-bounds write vulnerability in Apple macOS Scriptable Image Processing System (`sips`) ICC profile parser (macOS 15.0.1, sips-307) due to improper validation of the `offsetToCLUT` field in `lutAToBType` (`mAB `) and `lutBToAType` (`mBA `) tags. A crafted ICC file can trigger zero-writes up to 16 bytes past the heap buffer, corrupting heap metadata or function pointers and enabling arbitrary code execution (CVE-2024-44236).
8+
9+
## Vulnerable Code
10+
11+
The vulnerable function reads and zeroes 16 bytes starting from an attacker-controlled offset without ensuring it lies within the allocated buffer:
12+
13+
```c
14+
// Pseudocode from sub_1000194D0 in sips-307 (macOS 15.0.1)
15+
for (i = offsetToCLUT; i < offsetToCLUT + 16; i++) {
16+
if (i > numberOfInputChannels && buffer[i] != 0)
17+
buffer[i] = 0;
18+
}
19+
```
20+
21+
Only a check `offsetToCLUT <= totalDataLength` is performed. By setting `offsetToCLUT == tagDataSize`, the loop indexes up to 16 bytes past the end of `buffer`, corrupting adjacent heap metadata.
22+
23+
## Exploitation Steps
24+
25+
1. **Craft malicious `.icc` profile:**
26+
- Build the ICC header (128 bytes) with signature `acsp` and a single `lutAToBType` or `lutBToAType` tag entry.
27+
- In the tag table, set `offsetToCLUT` equal to the tag's `size` (`tagDataSize`).
28+
- Place attacker-controlled data immediately after the tag data block to overwrite heap metadata.
29+
2. **Trigger parsing:**
30+
31+
```bash
32+
sips --verifyColor malicious.icc
33+
```
34+
35+
3. **Heap metadata corruption:** The OOB zero-writes overwrite allocator metadata or adjacent pointers, allowing the attacker to hijack control flow and achieve arbitrary code execution in the context of the `sips` process.
36+
37+
## Impact
38+
39+
Successful exploitation results in remote arbitrary code execution at user privilege on macOS systems running the vulnerable `sips` utility.
40+
41+
## Detection
42+
43+
- Monitor file transfers on common protocols (FTP, HTTP/S, IMAP, SMB, NFS, SMTP).
44+
- Inspect transferred files with signature `acsp`.
45+
- For each `mAB ` or `mBA ` tag, verify if the `Offset to CLUT` field equals the `Tag data size`.
46+
- Flag as suspicious if this condition is met.
47+
48+
## References
49+
50+
- ZDI blog: CVE-2024-44236: Remote Code Execution Vulnerability in Apple macOS sips Utility
51+
https://www.thezdi.com/blog/2025/5/7/cve-2024-44236-remote-code-execution-vulnerability-in-apple-macos
52+
- Apple October 2024 Security Update (patch shipping CVE-2024-44236)
53+
https://support.apple.com/en-us/121564
54+
55+
{{#include /banners/hacktricks-training.md}}

src/binary-exploitation/array-indexing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ However he you can find some nice **examples**:
1919

2020

2121

22+
23+
{{#include /banners/hacktricks-training.md}}

src/binary-exploitation/common-binary-protections-and-bypasses/stack-canaries/bf-forked-stack-canaries.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,5 @@ Check also the presentation of [https://www.slideshare.net/codeblue_jp/master-ca
122122

123123

124124

125+
126+
{{#include /banners/hacktricks-training.md}}

src/binary-exploitation/ios-exploiting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,4 @@ void iosurface_kwrite64(uint64_t addr, uint64_t value) {
213213
With these primitives, the exploit provides controlled **32-bit reads** and **64-bit writes** to kernel memory. Further jailbreak steps could involve more stable read/write primitives, which may require bypassing additional protections (e.g., PPL on newer arm64e devices).
214214

215215

216-
{{#include /banners/hacktricks-training.md}}
216+
{{#include /banners/hacktricks-training.md}}

src/binary-exploitation/libc-heap/use-after-free/first-fit.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ d = malloc(20); // a
6565

6666

6767

68+
69+
{{#include /banners/hacktricks-training.md}}

0 commit comments

Comments
 (0)