blog.pixelmelt.dev
How I Reversed Amazon's Kindle Web Obfuscation Because Their App Sucked
How I bypassed Amazon’s Kindle web DRM | Hacker News Hacker News This article hit #1 on Hacker News, thanks all! TL;DR I bought my first ebook from amazon Amazon's Kindle Android app was really buggy and crashed a bunch Tried to download my book to use with a functioning reader app Realized Amazon no longer lets you do that Decided to reverse engineer their obfuscation system out of spite Discovered multiple layers of protection including randomized alphabets Defeated all of them wit...
Building The Language Model Nobody Asked For
I lied in the title, well, sort of. Nobody explicitly asked for this but the signs were always there. LLMs don't really serve the user Have you ever really watched someone interact with an LLM for the first time? They might try a few questions to see how smart it is, hooked on the promise that it is a new, somehow better, source of information. Then when the model regurgitates a few Wikipedia-esque emoji ridden paragraphs they will promptly get bored of it. Then they try something different...
Defeating DevTools Detection
⚠️ LibreWolf currently doesn't have devtools-bypass.patch enabled (the patch required for this to work) ⚠️ You can use this patcher I wrote which will modify your existing LibreWolf installation: librewolf-hotpatcher.py GitHub Gist: instantly share code, notes, and snippets. Gist 262588213843476 (slightly dangerous, may break your librewolf) TL;DR You can't have a lot of features if you want a catch-all solution, DevTools are inherently pretty detectable, yo...
Attacking a stack based JavaScript virtual machine
I was asked by my friend @PixelMelt to help out with a research project he was working on, focused on the analysis of a few JavaScript obfuscators. I happily agreed to take part and was asked to analyse one of three different obfuscators: Obfuscator.io : Likely the most common JavaScript obfuscator. JS-Confuser: A newer obfuscator with some nice techniques. PISTOL: PixelMelt's JavaScript Virtualisation Obfuscation. I chose to go with PISTOL as I am already familiar enough with the others, a...
Recursive vs Linear JSVM Disassembly
Linear disassembly Your disassembler goes through decoding every opcode in the bytecode linearly. Here is an example of where linear disassembly works VM Bytecode: 0, 4, 0, 6, 1 key generated or created by attacker: 0 = op_number, 1 subsequent num argument 1 = op_add Step through bytes linearly to disassemble: op_number, 4 op_number, 6 op_add Simple, but If the VM changes things around during runtime, like opcode IDs or how instructions are decrypted, just going through instruction by instructio...
A Clever (but not so good) Scraper Protection
Here is an interesting anti scraping measure that was pointed out to me by a reddit post recently. Take a look at this displayed text and then the HTML content for that exact same text. Text content HTML content The HTML appears to be a random mess of characters, this must be some JavaScript trickery right? Nope! Even when disabling JavaScript on the web page the text still renders as readable content and the HTML remains jumbled! So how does this protection work? Well if you take a closer look ...
Try-Catch Control Flow Obfuscation
"a lot of vm's i worked on in the past would also exploit errors to force a catch execution to continue" - Draco Error-Driven Control Flow Obfuscation JavaScript exception handling can be exploited to create non-linear code flow that confuses analysis. Given you probably don't want to make the fact that the function or operation you called is always going to throw an error, as that makes it easier for attackers to identify that you're doing this. try { // code that appea...
Overview of JavaScript Virtualization Obfuscation
The Nature of Code "Protection" Given that no protection is impossible to break by nature of how computers work. (they must be able to see instructions to execute them) All you can really do is abstract the way the program runs. Abstraction by Virtualization One way to abstract any given program is to virtualize the code, essentially (re)compiling the input code and creating a fantasy CPU architecture implemented in your language of choice to run the compiler output. If you know how Ja...
Javascript obfuscation tricks
Functions reading themselves Comments are included when a function reads itself Which lets you include arbitrary string data inside a comment and then use it in your program. Most websites that disallow obfuscated code will likely not have automated tools that check for this. Some deobfuscators unknowingly remove comments, permanently breaking the reversed output (As they are missing vital pieces) Source: doctor8296 (function func() { // foo = "Y29uc29sZS5sb2coJ2hlbGxvLCB3b3JsZCEnKQ" &...
Branch Encryption
Usage with virtualization based obfuscation Sources: Mesh design pattern: hash-and-decrypt - Archive loski2619 on the Sneaker Development Discord This technique prevents future states of a program from being known before they are reached. In a proper implementation, an attacker wouldn't be able to infer previous states of a program it hasn't tracked, at the same time, the attacker wouldn't be able to jump into states which require non-constant values to be executed (unless it can ...
Cloning your Discord friends with Large Language Models
Did it work well and is it useful in any way? No. Is it hilarious to mess around with and does it mimic them well? Yes. Do I need like a supercomputer or something for this? For this project I used a single RTX 3090 that has 24GB of vram, during training my vram sat at around 22GB of usage. I'm using linux so for the people running windows you might want to check how much vram your system is using at idle to avoid running out of memory during training. You could probably also do this on goo...