Skip to content

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.

  • 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.7 has the same holes on every machine. Only the machine decides if a hole works there (its requirements).

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.so version: your copy must be newer to see the hole.

The details and the odds are on holes.

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 format is A.B.C. A new version adds 1 to C.
  • B and C go up to 9 only: 1.0.9 becomes 1.1.0, and 1.9.9 becomes 2.0.0. So 1.0.10 cannot exist.
  • A library starts at 1.0.0. In a new world each library is already at 1.0.5, see a new world.
  • Versions compare part by part, as numbers.
  • metaxploit.so moves much faster than the others: it goes up one step for every new version of any library. See new versions.