Breaking the BeeStation Inside Our Pwn2Own 2025 Exploit Jour... #1615
+36
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This article documents end-to-end exploitation of a pre-authenticated stack-based buffer overflow in Synology BeeStation Plus (BST170-8T), assigned
CVE-2025-12686, used as a winning entry at Pwn2Own Ireland 2025. The target device runs BSM OS, with firmware distributed as encrypted archives (SPK,PAT, etc.) that must be decrypted using Synacktiv’s open-source toolsynodecryptbefore anal...🔧 Technical Details
1. Exploiting fixed-size stack buffers via attacker-controlled Base64 output length
The core trick is to exploit a Base64 decode helper that takes an input buffer, a decoded output buffer, and a pointer to the output length. In
ParseAuthInfo, the code incorrectly sets the decoded size (decoded_len) to the attacker-controlled length of the Base64 string (auth_info->len) even though the destination buffer is a fixed 4096-byte stack array. Any situation where*decoded_lenis not bounded to the actual buffer size can be abused: send a Base64 string long enough that the decoder overflows the stack, overwriting the canary, saved registers, and return address. Always look for APIs where a length parameter is reused across encoded/decoded representations without validation.2. Combining Base64 + JSON parsing with embedded null bytes for structured overflows
Because the input is Bas...
🤖 Agent Actions
Summary:
src/binary-exploitation/stack-overflow/README.mdwith a new real-world example detailing Synacktiv’s BeeStation exploit, focusing on the Base64/JSON-structured overflow, fork-based crash-oracle bruteforcing of canaries/pointers, the ensuing ROP/write-what-where primitive, and the mitigation lessons.Tests: Not run (documentation-only change).
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.