Now starting in on the research talks at NDSS BAR. First up, a talk via Skype since the authors were not able to make it due to travel restrictions: Similarity Metric Method for Binary Basic Blocks of Cross-Instruction Set Architecture
Basic background: we want to compute code similarity by finding an embedding for each basic block in a binary
The use triplet loss, with 3 basic blocks per training sample: an anchor, a positive sample, and a negative sample. One novel feature is to use *hard* negative samples – code that looks similar to the anchor, but is not a true match
Evaluation is on x86-ARM, with MISA dataset: 1.1 million semantically equivalent basic block pairs from open source projects.
Solution uses both pre-training and fine-tuning. In the evaluation, they show that pre-training really does help!
Q: How does this extend to other architectures? A: Benefit of ML here is that as long as we have training data, adding other architectures is straightforward, approach is not specific to x86<->ARM case.
(It's quite late in China, so big thanks to the authors for staying up to present :) )
Next up, we have "o-glassesX: Compiler Provenance Recovery with Attention Mechanism from a Short Code Fragment" – basically, given some examples of binary code, can we figure out what compiler was used? Can help with attribution in malware.
First note: single binary can be linked from multiple object files with different compilers. So we want to use smaller code fragments to classify each part.
Interesting – it turns out this can be done with fairly short fragments of code; only 16 instructions (30-60 bytes of x86).
They re-use the Transformer architecture, which has recently been super successful in NLP (GPT-2 is the most famous recent example).
Also cool: you can get some degree of explainability by looking at the attention layer to figure out what instruction has the most influence
(Some clearer pictures from the paper)
You can also visualize the binary in terms of the classifications to figure out where the module boundaries are
They do a nice case study on the Emdivi RAT malware, showing its development over time
Now up: Creating Human Readable Path Constraints from Symbolic Execution. Interesting problem—SMT constraints generated by tools are extremely verbose/messy, hard to interpret.
In addition to benefits to interpretability of the constraints, we may also want to transform them into other forms to make them easier for solvers, or translate to a different domain (Bitvecs -> ints, e.g.)
A big part of this complexity can come from the translation down to bit vectors, which are hard for humans to interpret. Translating into the integer domain can make it easier to understand.
Caveat: domains may not be precisely equivalent for a given path constraint; paper discusses how to figure out whether they are.
Some examples of simplification. When does this function (first image) return y-2? ClariPy (second image) vs simplified integer domain translation (third image)
How does it work technically? The authors use logic synthesis tools with gate-libraries created for human readability to convert path constraints into more readable forms. Existing constraint simplifications are tailored toward solver efficiency, not readability.
Future work: quantify the notion of human-readability so can compare different possible answers; analysis on real binaries rather than toy programs; extend basic ideas to more data-types and domains (e.g., strings).
Last talk of this session looks at TrustZone—"Finding 1-Day Vulnerabilities in Trusted Applications using Selective Symbolic Execution"
Background: TEEs are an interesting attack surface; code runs in a protected environment but may be vulnerable via the API exposed to user programs (e.g.: cvedetails.com/cve/CVE-2016-8…). Want to look for "1-days" in such code by diffing patched vs unpatched code.
TrustZone based on hardware feature of ARM processors, you have a "normal" world where untrusted code runs and a "secure" world where trusted apps run. TrustZone is used for all sorts of things like DRM, encryption, etc.
Challenges: trusted apps (TAs) are closed-source, can't be debugged, and can't be modified due to code signing.
The authors build SimTA, which extends angr by providing an execution environment that mimics the execution environment inside the TEE.
Cool detail: to figure out how the TEE environment worked, the authors actually developed and used an exploit for CVE-2016-8764 and used to to reverse engineer the environment.
SimTA loads the TA according to the memory map they reverse engineered using their exploit, hooks the input/output of the APIs used for TA lifecycle management, and has angr SimProcedures for the GP Internal Core API.
Case study: rediscovering CVE-2016-8764. Used BinDiff to identify changed code between patched & unpatched. Then selectively symbolically execute the modified codepath to find an input that can trigger the vulnerability.
By comparing the path constraints, they can find a new constraint on the input in the patched version that corresponds to the vulnerability that was fixed.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I asked GPT-NeoX-20B a hundred arithmetic questions. It didn't get very many of them right (10/100), but it's almost spookier to me that it gets most of them *approximately* correct??
I also just added results and easier-to-parse data files for both the original and expanded (1000 questions) results. Don't have time to do lots of analysis right now sadly gist.github.com/moyix/ca4091f1…
Definitely was a mistake not to strongly isolate the build directories from one another. I wonder which package (or part of my own infra) wiped out all the package metadata :P
One interesting thing might be to put some canary files one level above the build dir and then yell loudly if those files are gone after the build finishes. Might shake out some fun "oops, building this package deleted my home directory" bugs
Right now all the official build infra (as well as the reproducible build projects) run builds in an isolated chroot, so I can easily imagine issues like this going undetected for a long while.
It's under-appreciated how simple and elegant the OS X UI experience is. In just a single glance here I can learn absolutely nothing about where all my disk space went
It calls to mind the classic design principles of ed(1): "generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity"
Another elegant touch is the way the UI gently keeps users on the path of righteousness. Open source weirdos may complain about their "freedoms", but I sleep more soundly knowing that Big Mac is watching out for me–there will be no rogue disk inventorying in this house!
The basic problem we're looking at in this paper is: if you buy some embedded/IoT device, it may come with a bunch of features that you don't use (say, Bluetooth) that nonetheless require driver support and expose unnecessary attack surface.
Maybe you're a company deploying a fleet of Meraki routers, you don't need the Bluetooth Low Energy localization stuff, and you're worried about vulnerabilities like this one arstechnica.com/information-te…
Hmm, this is actually much less impressive than I expected as far as inverting PhotoDNA (based only on reading @hackerfactor's blog post) reddit.com/r/MachineLearn…
@hackerfactor@matthew_d_green perhaps of interest if you haven't seen it yet and want to take a break from fighting with half of CS twitter about NFTs ;)
Ah, I see, it's taking a pure black box ML approach to try and learn the inverse straight from the hashes. OK, that is pretty impressive!
So, with Broadcom's acquisition of Symantec, it seems like the source code for PGP Desktop (aka Symantec Encryption Desktop) is nowhere on the internet? I have a copy but I'm pretty sure I can't host it anywhere:
Seems like a loss for archival and data recovery work! :(
FWIW, the version I have is:
MD5 (PGPDesktop10.0.1_Source.zip) = c9193850f923cda995e6d4b9f45fcbdf