HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
xoreaxeaxeax
sandsifter
Python2017–2024
xoreaxeaxeax / sandsifter

sandsifter

The x86 processor fuzzer

29Distinct people
36Mentions
0Explicit recommenders
5.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The x86 processor fuzzer

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year36 dated mentions

Observed mentions: 2017-07-28 06:37:04 UTC to 2024-10-25 04:25:21 UTC.

02468102017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 9 mentions; 3 submissions, 6 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 7 mentions; 1 submissions, 6 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC936
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC936
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC716
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC413

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
s a n d s i f t e r : the x86 processor fuzzer Overview The sandsifter audits x86 processors for hidden instructions and hardware bugs, by systematically generating machine code to search through a processor's instruction set, and monitoring execution for anomalies. Sandsifter has uncovered secret processor instructions from every major vendor; ubiquitous software bugs in disassemblers, assemblers, and emulators; flaws in enterprise hypervisors; and both benign and security-critical hardware bugs in x86 chips. With the multitude of x86 processors in existence, the goal of the tool is to enable users to check their own systems for hidden instructions and bugs. To run a basic audit against your processor: sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t The computer is systematically scanned for anomalous instructions. In the upper half, you can view the instructions that the sandsifter is currently testing on the processor. In the bottom half, the sandsifter reports anomalies it finds. The search will take from a few hours to a few days, depending on the speed of and complexity of your processor. When it is complete, summarize the results: ./summarize.py data/log Typically, several million undocumented instructions on your processor will be found, but these generally fall into a small number of different groups. After binning the anomalies, the summarize tool attempts to assign each instruction to an issue category: Software bug (for example, a bug in your hypervisor or disassembler), Hardware bug (a bug in your CPU), or Undocumented instruction (an instruction that exists in the processor, but is not acknowledged by the manufacturer) Press 'Q' to quit and obtain a text based summary of the system scan: The results of a scan can sometimes be difficult for the tools to automatically classify, and may require manual analysis. For help analyzing your results, feel free to send the ./data/log file to xoreaxeaxeax@gmail.com. No personal information, other than the processor make, model, and revision (from /proc/cpuinfo) are included in this log. Results Scanning with the sandsifter has uncovered undocumented processor features across dozens of opcode categories, flaws in enterprise hypervisors, bugs in nearly every major disassembly and emulation tool, and critical hardware bugs opening security vulnerabilities in the processor itself. Details of the results can be found in the project whitepaper. (TODO: detailed results enumeration here) Building Sandsifter requires first installing the Capstone disassembler: http://www.capstone-engine.org/. Capstone can typically be installed with: sudo apt-get install libcapstone3 libcapstone-dev sudo pip install capstone Sandsifter can be built with: make and is then run with sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t Flags Flags are passed to the sifter with --flag, and to the injector with -- -f. Example: sudo ./sifter.py --unk --dis --len --sync --tick -- -P1 -t Sifter flags: --len search for length differences in all instructions (instructions that executed differently than the disassembler expected, or did not exist when the disassembler expected them to --dis search for length differences in valid instructions (instructions that executed differently than the disassembler expected) --unk search for unknown instructions (instructions that the disassembler doesn't know about but successfully execute) --ill the inverse of --unk, search for invalid disassemblies (instructions that do not successfully execute but that the disassembler acknowledges) --tick periodically write the current instruction to disk --save save search progress on exit --resume resume search from last saved state --sync write search results to disk as they are found --low-mem do not store results in memory Injector flags: -b mode: brute force -r mode: randomized fuzzing -t mode: tunneled fuzzing -d mode: externally directed fuzzing -R raw output mode -T text output mode -x write periodic progress to stderr -0 allow null dereference (requires sudo) -D allow duplicate prefixes -N no nx bit support -s seed in random search, seed value -B brute_depth in brute search, maximum search depth -P max_prefix maximum number of prefixes to search -i instruction instruction at which to start search (inclusive) -e instruction instruction at which to end search (exclusive) -c core core on which to perform search -X blacklist blacklist the specified instruction -j jobs number of simultaneous jobs to run -l range_bytes number of base instruction bytes in each sub range Keys m: Mode - change the search mode (brute force, random, or tunnel) for the sifter q: Quit - exit the sifter p: Pause - pause or unpause the search Algorithms The scanning supports four different search algorithms, which can be set at the command line, or cycled via hotkeys. Random searching generates random instructions to test; it generally produces results quickly, but is unable to find complex hidden instructions and bugs. Brute force searching tries instructions incrementally, up to a user-specified length; in almost all situations, it performs worse than random searching. Driven or mutation driven searching is designed to create new, increasingly complex instructions through genetic algorithms; while promising, this approach was never fully realized, and is left as a stub for future research. Tunneling is the approach described in the presentation and white paper, and in almost all cases provides the best trade-off between thoroughness and speed. Tips sudo For best results, the tool should be run as the root user. This is necessary so that the process can map into memory a page at address 0, which requires root permissions. This page prevents many instructions from seg-faulting on memory accesses, which allows a more accurate fault analysis. Prefixes The primary limitation for the depth of an instruction search is the n
Read the full README on GitHub

What Hacker News says

36 sources
This is fine for devices that expose a true JTAG interface. But imagine something like Hitachi's User Debug Interface that exposes only boundary scan. The rest of the protocol is undocumented unless you have specific NDA clearance. In which case a methodology is needed to reverse engineer this protocol, treating the device like a black box. I really liked how a solution to this was found for x86 processors and hidden instructions https://github.com/xoreaxeaxeax/sandsifter
In PiFex: JTAG Hacking with a Raspberry Pi
This is a really clever technique! I was impressed by sandsifter[1] when it originally came out, and this seems an awful lot faster and less prone to false negatives (since it's purely speculative and doesn't require sandsifter's `#PF` hack). At the risk of unwarranted self-promotion: the other side of this equation is fidelity in software instruction set decoders. x86's massive size and layers of historical complexity make it among the most difficult instruction formats to accurately decode; I've spent a good part of the last two years working on a fuzzer that's discovered thousands of bugs in various popular x86 decoders[2][3]. [1]: https://github.com/xoreaxeaxeax/sandsifter [2]: https://github.com/trailofbits/mishegos [3]: https://ww.easychair.org/publications/preprint_download/1LHr
In Speculating the entire x86-64 instruction set in seconds with one weird trick
Idea: If any assembler/disassembler author/team out there wants to produce an assembler/disassembler which is authoritative (difficult to do on x86, because there are so many different possible combinations of instruction encoding, https://github.com/xoreaxeaxeax/sandsifter : "Typically, several million undocumented instructions on your processor will be found, but these generally fall into a small number of different groups.") -- then what they'd do is to create a third program -- which "pits" the output of Assembler A vs. Assembler B, Disassembler A vs. Disassembler B... That is, between any two assemblers (for the same CPU architecture/instruction set), or any two disassemblers (again, for the same instruction set), where are the anomalies? If we think about an assembler as a simple function, y=f(x), that is, I give it a string of asci
Read the rest
i bytes as input (x), and I get a string (1..n) binary bytes as output (y), and a disassembler as the reverse function, then how difficult would it be to write a program which imported the assembly functionality of two (or more) assemblers, and then just started comparing the outputs? Well, there's a slight problem there, which is, that you'd have to create a series of strings representing valid assembler instructions first... But, why not let the disassembler(s) do that! So our future program for "pitting" assembler vs. assembler, disassembler vs. disassembler looks like this: 1) Start with a single byte, 00. 2) Pass that byte to the disassembler. Is it a valid instruction? 3) If so, pass the string passed back to an assembler, and get the result of that. 4) Is the resulting binary byte (or byte string) the same as the one we started with? If so, all OK. If not, log the anomaly to a log! 5) Increment single byte by 1, perform above instructions in a loop until after we hit 255, then start with a 2-byte string, and same thing (like an odometer). Keep doing this until we've expanded to the max allowable for a x86, which I believe is 15 bytes in length (Note: That's one BIG number(!) -- could we perform this loop in one lifetime? I don't know... perhaps if it took too long we could intelligently skip some combinations like Christopher Domas does in Sandsifter)... But anyway, that would be the algorithm for "pitting" Assembler vs. Assembler (or perhaps more specifically Assembler vs. Disassembler (you get the general idea of what's being said here!)) -- and comparing the results! Think of it as a 'diff' tool -- but for the output of assemblers/disassemblers -- as opposed to files... Why? Well, because x86 is complex, to say the least! And well, because it's more likely than not, that any given Assembler/Disassembler -- contains bugs and/or errors, even though they might not be intentional! Anyway, if no one else does it... I'll do it in the future (too busy with other things right now!)... so "Note to future self" <g>. But the entire program would amount to a few loops... Actually, that's another good point... Any assembler/disasembler program worth its salt -- should provide its libraries with Python (or other easily scriptable language) bindings... many do; some don't; just a random related observation...
In Capstone Disassembler Framework
Some interesting links, to be sure! Yes, fpdebug definitely looks like it is the better written code of the two... I will definitely have to grab myself a copy of its source code and play around with it... >It has some minor errors in the Rex decoding though, if I remember correctly.... By Rex, you mean Regex, right? Well, it having issues there wouldn't surprise me one bit... If I used it, fpdebug, I probably wouldn't use it with all of the bells and whistles turned on -- I'd probably pare it down to only the most essential source code... But that being said, I think that having that source code to refer to -- could be highly beneficial... See, there's this problem in Software Engineering, which looks something like this: Let's say I want an open source library (and in Pascal no less!) whose purpose is twofold, on the one hand to transl
Read the rest
ate raw binary x86 machine code sequences into readable text, and on the other, to translate the text of an x86 assembler instruction, into binary. OK, so now, the $64,000 question is: Who (or what) -- is the absolute source of truth for that library?" See, even if that library were written by Intel themselves, I guarantee that there will be mistakes... The mistakes are not due to documentor and/or programmer negligence (Intel or otherwise) -- so much as they are due to instruction set complexity... You see, I'll bet, pound for pound, line of code for line of code, that any assembler/disassembler routines for say a RISC instruction set (RISC-V for example) -- should be much, much shorter (and more elegant to boot!) than Intel's "everything but the kitchen sink, we keep expanding it because it gives us the competitive edge via patent and other legal protections" constantly-expanding-the-instruction-set approach... So the issue, at least in x86-land is, "Who (or what) -- is the absolute source of truth with respect to the x86 instruction set?" Also, remember that Christopher Domas (Google him, you'll find a whole lot of interesting stuff) -- discovered that x86 processors typically can and do implement all sorts of undocumented instructions: https://github.com/xoreaxeaxeax/sandsifter >"Typically, several million undocumented instructions on your processor will be found , but these generally fall into a small number of different groups. After binning the anomalies, the summarize tool attempts to assign each instruction to an issue category: o Software bug (for example, a bug in your hypervisor or disassembler), o Hardware bug (a bug in your CPU), or o Undocumented instruction (an instruction that exists in the processor, but is not acknowledged by the manufacturer)" Anyway, thanks for the link! (The second one! <g>)
In Tatradas – Disassembler for x86 executables written in Delphi/FreePascal
At a large enough N 5% to 10% is massive, at a small enough N 5% to 10% gets you closer to competitive, somewhere between though is where those extra percentage points are "meh". For instance I run my computing on a TR 1950X and I could probably undervolt or overclock the chip but, to be honest, it's not worth the perceived "risk". Undervolting could break specific instructions in undetectable ways and the only way to be sure things haven't broken would be to run something like sandsifter [0] multiple times. Because I, and many others who would have the technical know how, write software on these systems it's not very much worth the headache. If I had a seperate system I built just for gaming or doing a specific task and I wanted to reduce how much I spent, or the power usage, etc undervolting would then shift out of headache -> super wor
Read the rest
th it. The last thing I want to have to do is run every piece of code I need through godbolt and pray there's no AVX instructions that "may" be fishy. I think this is largely why cloud providers don't do things like this as aggressively. They do it to some extent with custom off-roadmap chips but not controlled dynamically in userspace. If we can get something like this original post into the kernel that would be a massive win for everyone. [0] - https://github.com/xoreaxeaxeax/sandsifter
In Linux Developers Discussing Possible Kernel Driver for Intel CPU Undervolting

Showing the 15 most recent of 36 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.