Posts Tagged ‘brute force chip break’
Four Kinds of Brute Force: Passwords, Keys, Addresses, States
“Can you brute force it” is a question with four different answers, and the answer depends on what is being guessed rather than on how large the space is. A password, a cryptographic key, a memory address and a protocol state are all things one might enumerate, and the four enumerations have nothing in common beyond the word.
Sorting a request into the correct category takes ten minutes and changes everything that follows: the equipment, the criterion for success, the expected duration and the reason the attempt will fail.
Category one: a password
A password is chosen by a person, which means it is drawn from a distribution that is nothing like uniform. That single fact is the whole reason password search is feasible at all, and it is why password search tools are dictionaries rather than counters.
The distribution is heavily skewed. A few hundred candidates cover a large fraction of real choices, because people pick dates, names, keyboard patterns, sports teams and the same handful of defaults that every product ships with. The tail is long, but the head is where the work happens.
| Property | Value |
|---|---|
| Chosen by | A person, usually once, usually quickly |
| Distribution | Highly skewed |
| Tool | Ordered dictionary, then rules, then exhaustion |
| Success criterion | Target accepts the input |
| Failure mode | Retry counter |
The distinguishing feature is that success is observable without any measurement. The device either opens or it does not. That makes password search the easiest category to run and the easiest to defend: a counter and a delay defeat it completely, which is why every serious product has both.
Category two: a cryptographic key
A key is generated by a random process, which means it is drawn from a uniform distribution. Nothing about one candidate makes it more likely than another, so dictionaries are useless and the only structure available is what the algorithm leaks.
For a modern key this category is not searchable by enumeration at all. A 128-bit key is 3.4 × 10^38 candidates; at a billion attempts per second that is ten thousand billion years. The number is so far beyond reach that the only sensible response is to stop treating it as a search problem.
What makes key recovery possible is not a smaller space but a leak. A comparison that returns early leaks the matching prefix. A table lookup that touches cache lines in a secret-dependent order leaks the index. A multiply whose timing depends on the operand leaks bits. Each of those converts one large search into many small ones, and the conversion is where the skill lies.
| Property | Value |
|---|---|
| Chosen by | A random generator |
| Distribution | Uniform |
| Tool | Side channel, not enumeration |
| Success criterion | Recovered key verifies |
| Failure mode | Constant-time implementation |
The commercial consequence is that a request to “brute force the AES key” is not a request that can be fulfilled. The honest answer is that the key has to be obtained by a leak or by reading the memory that holds it, and both of those are different jobs.
Category three: an address
An address space is ordered, finite and usually small. Enumerating it is not guessing at all; it is reading, one location at a time, and it succeeds by covering the space rather than by finding a match.
This category includes reading a serial EEPROM from 0x0000 to the end, walking a flash array in sectors, and scanning a memory-mapped peripheral region for registers that respond. In each case the “search” is a loop whose length is known in advance, and the result is a complete map rather than a single hit.
| Property | Value |
|---|---|
| Chosen by | The memory map |
| Distribution | Ordered, dense |
| Tool | Read command with auto-increment |
| Success criterion | Complete dump obtained |
| Failure mode | Unmapped regions fault or alias |
The failure mode is worth knowing because it produces convincing wrong answers. A read of an unmapped region often returns the last value on the bus, which looks like data. A dump that contains a long run of identical bytes may be an erased region, or may be an aliased unmapped region, and distinguishing them requires knowing the map — which is what the enumeration is supposed to produce.
Category four: a protocol state
A protocol state is the least obvious category and often the most productive. The “space” here is the set of states a state machine can be in, and the goal is to find a sequence of inputs that reaches a state the designer did not intend.
The space is not enumerable by counting, because the number of possible input sequences is unbounded. What makes it tractable is structure: state machines have far fewer reachable states than their input alphabet suggests, and the transitions are usually guarded by simple conditions.
| Property | Value |
|---|---|
| Chosen by | The protocol designer |
| Distribution | Structured, sparse |
| Tool | Model extraction and graph search |
| Success criterion | Reaching an unintended state |
| Failure mode | Rate limiting and timeouts |
The productive methods here are the ones from protocol analysis: send a valid sequence, change one field, observe whether the state advances, and build a transition graph from the observations. A device that reports its state through an LED, a status byte or a response code gives the graph away for free.
Mixed cases and how to split them
Real systems rarely present one category cleanly, and the split is where most of the analytical value lies.
A device that demands a PIN and locks after five failures is two categories at once: a password (category one) and a state machine that counts failures (category four). The password space is small, so the naive conclusion is that the job is a short dictionary run. But the counter is a state in the protocol sense, and reaching a state where attempts are unlimited is a different objective with a different technique — one that does not involve guessing the PIN at all.
The same applies to key provisioning. A device that generates a key at first boot and stores it in flash is category two at rest and category one during provisioning, because the provisioning trigger is often a factory command with a weak or default credential. Attacking the provisioning state is usually easier than attacking the key.
| Apparent category | Often actually | The cheaper object |
|---|---|---|
| Password with a lockout | Password plus protocol state | The lockout state |
| Key in flash | Key plus provisioning path | The provisioning command |
| Address read refused | Address plus permission state | The permission check |
| Encrypted protocol | Protocol state plus a key | The state machine |
The general rule is that a system with more than one secret has a weakest one, and the weakest one is almost never the one the customer is worried about. Establishing the full set before choosing a target is the difference between attacking the designed defence and attacking the implementation around it.
Why the classification decides the quote
The four categories differ in duration by several orders of magnitude, and a quote that assumes the wrong one is wrong by the same factor.
| Category | Realistic duration | Reason it ends |
|---|---|---|
| Password, no counter | Hours | Found |
| Password, with counter | Never | Attempts exhausted |
| Key, with a leak | Days to weeks | Found |
| Key, constant time | Never | No leak to measure |
| Address | Seconds to minutes | Space covered |
| Protocol state | Days | Unintended state reached |
The table is the practical reason for classifying first. Two requests that both say “brute force” can be the second row and the fifth row, and those are a refusal and a coffee break.
What we do with a request
The first question we ask is what the secret is a property of: a person, a generator, a memory map, or a protocol. The answer is usually available from the product description without touching hardware.
Where the answer is a person, the work is a dictionary and the counter is the whole story, which is why the rate measurement described in when brute force works comes before any attempt. Where the answer is a generator, the work is a side channel or a memory read, and the relevant route is where timing leaks or extracting IC flash. Where the answer is a memory map, the work is an enumeration of the kind described in brute force on EEPROM, and where it is a protocol, the work is the graph search in reverse engineering IC firmware.
The service here is the classification and, when the classification says the work is impossible, the refusal. Most of the value of this page is in the second case.