Lion Cipher Lab

Enumerate NFS exports and abuse no_root_squash

Why it matters

NFS — the Network File System — is one of the oldest and most quietly ubiquitous ways to share a directory between UNIX and Linux machines, and it is everywhere a pentester actually goes: on-prem file servers, NAS appliances, VMware and Kubernetes storage backends, university and research clusters, and the forgotten build server in the corner. Its default trust model is astonishingly weak by modern standards — in its common sec=sys configuration, an NFS server simply believes whatever user ID the connecting client claims to be, with no authentication of the machine or the user at all. Layered…

What you'll learn

Steps in this lab

  1. The words this lab rests on: NFS, an export, and squashing
  2. Build the vulnerable server — and yes, you must deliberately break it
  3. Scope — this is a lab network, and only a lab network
  4. Discover the export — showmount, rpcinfo, and nmap's NFS scripts
  5. Mount the export
  6. Abuse no_root_squash — plant a SUID-root binary, get a root shell
  7. Fix it and re-test — root_squash plus a host allow-list
  8. The judgment: why it really broke, and the fix beyond one flag
  9. Do it better — the habits, and what to carry out of this lab

Open the full interactive lab →