HTB Reaper Format-string leak + stack BOF → VirtualAlloc ROP...#1354
Merged
carlospolop merged 2 commits intomasterfrom Aug 28, 2025
Conversation
…lAlloc RO... - Remove searchindex.js (auto-generated file)
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://0xdf.gitlab.io/2025/08/26/htb-reaper.html Content Categories: Based on the analysis, this content was categorized under "Generic Hacking / Binary Exploitation (Windows x64) — Format string ASLR leak + Stack BOF → VirtualAlloc ROP; and Windows Privilege Escalation — Token stealing via arbitrary kernel R/W". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
Collaborator
Author
|
merge |
255d22c to
e5a2608
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 28, 2025
…at-string_leak___stack_BOF___Virtu_20250827_170453 HTB Reaper Format-string leak + stack BOF → VirtualAlloc ROP...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Reaper (Windows HTB) — Technical Summary
Target and recon
Windows HTB machine “Reaper” (released/retired 26 Aug 2025).
dev_keys.txt(sample license keys) anddev_keysvc...- Windows x64 format-string leak to defeat ASLR
- Where: src/binary-exploitation/format-strings/README.md
- What:
- Added a new section “Windows x64: Format-string leak to bypass ASLR (no varargs)” explaining how _snprintf/printf with an attacker-controlled format string and no varargs can cause %p to read R9 under the Microsoft x64 calling convention, leaking a stable in-module pointer.
- Showed how to compute the image base as leak - known_offset and how to use it to defeat ASLR for ROP.
- Added a short Python snippet illustrating leak and base calculation.
- Added a References section (at the end) including the blog and the x64 ...
- MD files processed: 874
- MD files fixed: 1
- searchindex.js removed: This auto-generated file has been removed to prevent conflicts
🔧 Technical Details
Format-string ASLR bypass on Win64: When user input becomes the printf-format (e.g.,
_snprintf(dst,len,user)), inject%pto read the first vararg. On x64,R9is interpreted as that argument; leaking a stable in-module pointer lets you subtract a constant offset to recover the image base and defeat ASLR.Stack BOF → ROP → RWX stack: If a service base64-decodes attacker input into a fixed-size stack buffer, find RIP offset with a cyclic...
🤖 Agent Actions
I explored HackTricks to find the right places to integrate the techniques from the blog and updated/created content accordingly.
What I added/updated
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.
📚 Repository Maintenance
All .md files have been checked for proper formatting (headers, includes, etc.).
🗑️ File Cleanup
The searchindex.js file is automatically generated and should not be included in manual commits.