Libraries: the basics
Every attack in Grey Hack goes through a library: a .so file in /lib with holes in it. This
page explains what such a file is. The next pages explain the holes,
how new versions are made and
which machines run which version.
In short
Section titled “In short”- The game keeps one live copy of each library: the newest version. Every older version is kept as a frozen copy.
- A new version is the previous version with changes. Most holes go on to the next version unchanged. See new versions.
- The holes are in the file. A copy of
libssh.so 1.0.7has the same holes on every machine. Only the machine decides if a hole works there (its requirements).
What is in a library file
Section titled “What is in a library file”A library file holds:
- its name and its version, for example
libssh.so 1.0.7, - its memory zones, each at an address such as
0x1EA4AA52, - the patch state of the zero-day hole.
Each memory zone holds 2 to 5 holes. It also counts how often its holes were replaced, and it can be a hidden zone. A hole has:
- an unsafe value: the word you give to
overflow, - one result and one user,
- 0 to 3 requirements,
- a minimum
metaxploit.soversion: your copy must be newer to see the hole.
The details and the odds are on holes.
The 19 libraries
Section titled “The 19 libraries”| Kind | Libraries |
|---|---|
| Remote: a service or the router | libssh, libftp, libhttp, libsql, libsmtp, libcam, librshell, librepository, blockchain, libadb, libsmartappliance, kernel_router, aptclient |
| Local: you need a shell on the machine first | metaxploit, crypto, kernel_module, init, net, libtrafficnet |
The kind changes the odds of a hole: a local hole never gives guest, and it never needs a port
forward, a gateway count or the local network. See holes.
kernel_router.so is the router’s kernel. It has its own rules: no
hidden zones, and always at least one easy hole (see
holes).
The version number
Section titled “The version number”- The format is
A.B.C. A new version adds 1 toC. BandCgo up to 9 only:1.0.9becomes1.1.0, and1.9.9becomes2.0.0. So1.0.10cannot exist.- A library starts at
1.0.0. In a new world each library is already at1.0.5, see a new world. - Versions compare part by part, as numbers.
metaxploit.somoves much faster than the others: it goes up one step for every new version of any library. See new versions.