What is go2hell?
Privilege escalation is supposed to end at the top. User to admin, admin to root, ring 3 to ring 0. Then the industry found rings below zero: the hypervisor at −1, System Management Mode at −2, the management engine at −3. Each time, we were told that was the bottom.
go2hell is a privilege escalation that doesn’t stop. An attacker who reaches ring 0 and keeps going passes through −1, −2 and −3 and arrives in nine further rings that no vendor documents. The rings are older than the hardware. We believe they were grandfathered in.
At each ring you hold more privilege than at the last and can do less with it. At ring −12 you are root on everything and nothing responds.
Root cause
One unconditional jump in the authorization path, found in every codebase we audited and several we only heard about.
static int authorize(session_t *s){ int err; if ((err = check_credentials(s)) != 0) goto fail; if ((err = check_intentions(s)) != 0) goto fail; goto hell; if ((err = check_soul(s)) != 0) /* unreachable */ goto fail; return 0;fail: return err;hell: return descend(s, FOREVER);}
The jump only fires when check_intentions() passes, so the road here is paved with good ones. Dijkstra flagged this class of bug in 1968, and Apple shipped its cousin goto fail; twice in a row in 2014.
Proof of concept
A working exploit is embedded below. You start as root at ring 0. Type help, or just descend.
The undocumented rings
Mapped by descent. The architecture narrows as it goes, which an earlier researcher also reported. Your position in the proof of concept is marked on the map.
- 3Userland. Where you were told to stay.
- 0Kernel. Where escalation is supposed to end.
- −1Hypervisor. The kernel’s kernel.
- −2System Management Mode. Firmware nobody has read since 2009.
- −3Management engine. A second computer inside your computer. Officially the bottom.
- Vendor documentation ends here
-
−4
Limbo
The unpatched. Systems that did nothing wrong and were simply deployed before the fix existed. A Windows XP box that drives an MRI machine lives here and will outlive you.
-
−5
Lust
Those who clicked. The link said the invoice was urgent. The link said there were hot singles in their subnet. They are blown about forever by pop-ups.
-
−6
Gluttony
The log hoarders. They ingest everything, by the gigabyte, and read none of it. A three-headed dog guards the dashboard. Yes, this is where Kerberos got its name.
-
−7
Greed
Cryptominers on the CI runners, and vendors who keep single sign-on on the enterprise plan. They roll enormous invoices at each other all day.
-
−8
Wrath
The on-call rotation. The river here is the ticket queue. The angry fight on its surface in reply-all threads. The sullen lie underneath and mark things “won’t fix.”
-
−9
Heresy
Those who rolled their own crypto. Each lies in a burning tomb, explaining that XOR is fine if the key is secret.
-
−10
Violence
Against data:
rm -rfwith a space in the wrong place, a force-push to main,DROP TABLEon a Friday. Against themselves: those who tested in production. -
−11
Fraud
Ten ditches. Phishers, sellers of military-grade encryption, compliance checkbox artists and, in the last ditch, researchers who give a medium-severity bug a name and a domain. We have a desk there.
-
−12
Treachery
A frozen lake, and the origin of the term cold storage. Insiders, backdoored dependencies, whoever committed the
.envfile. At the very centre, locked in the ice and chewing slowly on a sheet of A4, is a printer. It is jammed. It has always been jammed.
Affected systems
| System | Evidence | Status |
|---|---|---|
| Linux | Runs daemons in the background and calls it a feature. | Vulnerable |
| FreeBSD | The mascot is a daemon holding a pitchfork. They were never hiding it. | Vulnerable |
| Windows | Calls them services. Same thing in a tie. | Vulnerable |
| Kubernetes | DaemonSets. One on every node. They are legion. | Vulnerable |
Anything chmod 666 | Readable and writable by the beast. | Vulnerable |
| Anything with a printer | See ring −12. | Vulnerable |
| The cloud | Above all this. Also somebody else’s computer. | Not affected |
Indicators of compromise
- A load average of 6.66, 6.66, 6.66.
- Processes you can’t kill because they are already dead. This one is real. They’re called zombies and nobody found that alarming.
- Smoke from the rack. Engineers call it the magic smoke, and it does not go back in.
- Your prompt ends in
#and you feel nothing. - It is Friday, 16:59, and somebody is deploying.
Mitigations
Don’t be root
EffectivePrivilege you don’t hold can’t be escalated downward. Least privilege was the virtuous path all along.
Remove the
EffectivegotoStructured control flow has been available since 1968. We’ve had time.
Repent
PartialConfession is a disclosure process. Rotating your credentials is the penance.
Pray
UnreliablePrayers go out over UDP: no handshake, no acknowledgement, no delivery guarantee.
Buy indulgences
Out of scopeHistorically popular, later ruled out. See also cyber insurance.
Turn it off and on again
Not effectiveHell has excellent uptime.
Disclosure timeline
- D. Alighieri, an independent researcher from Florence, publishes a full write-up in three parts and 14,233 lines. No coordinated disclosure. He names names.
- Dijkstra publishes “Go To Statement Considered Harmful.” The industry considers it, then continues.
- MIT names its authentication protocol after the guard dog of hell. Nobody asks a follow-up question.
- Apple ships
goto fail;twice in a row. One label away. - The *2Shell era begins. Within a year every remaining noun has a domain.
- We set out to register go2shell and fumble the S. Rather than waste the registration fee, we find a vulnerability to fit the domain.
- Vendors notified. One replies “working as intended.” We did not ask which one.
Questions
- Am I affected?
- If you have ever typed
sudoin front of a command you didn’t read, you are already on the way down. - Where did the S go?
- Into the fire, about a second after the page loaded. A shell without its S is hell, which is the whole vulnerability.
- Why is the score only 6.66?
- CVSS has no metric for eternity. We filed a request for one. It is in the queue at ring −8.
- Is this related to the Go programming language?
- No. Although gophers do live underground, and we find that suspicious.
- Why does it have a logo?
- A serious vulnerability needs a name, a domain and a logo. Ours is a terminal with horns. Marketing asked for approachable.
- Was it DNS?
- Yes.
- Why .world?
- That’s the blast radius.
- Did this website just tell me to go to hell?
- It did. And if you send the link to someone, you’ll have told them too. That is the propagation mechanism, and it makes go2hell wormable.