Labs / Break into a network / Break into a network: discover, pivot, move, take

Lab 4 of 4 · Break into a network: discover, pivot, move, take

Take the core: lift the crown jewels off the soft copy

The prize also sits on an unguarded backup. Pull the full copy through the relay, save it off, then guard every copy.

Start this lab 5 steps

The idea

Stage 3's session on the inventory database named the prize: a backup machine at 10.0.2.40, a nightly copy of the crown-jewel store. The lesson of this last stage is where you go for it. The crown jewels exist in more than one place, and the copy is the soft one: the backup is guarded as plumbing, not as the data it holds — here it hands out the whole copy over an ordinary web request, no login, reachable through the same relay. You take the crown jewels from the copy nobody watched.

Steps

  1. Follow the pointer to the backup

    Stage 3's database session named the prize: the backup machine tdw-core-bak at 10.0.2.40, a nightly copy of the crown-jewel store. The lab has the relay from stage 2 open again for you. Confirm the backup answers through it: it is on the same core network, in reach of the same web server you own.

    You are aiming at the copy, not the hardened original — because a copy of the most sensitive data is usually the softer way to the same thing.

    kali:~# proxychains curl -s http://10.0.2.40/
  2. The copy nobody guarded

    Ask the backup what it serves. It lists a dump folder — the whole copy, handed out over an ordinary web request with no login. The original store would make you sign in; its backup, treated as plumbing, does not.

    That gap is the whole opening of this stage: reaching the copy and reading it have become the same thing.

    kali:~# proxychains curl -s http://10.0.2.40/dumps/
  3. Take the crown jewels

    Pull the dump through the relay. It is the crown-jewel copy: the customer billing tokens and the crown-jewel marker the whole engagement was for. Reached from a machine that never had a path here, through one trusted web server, off the copy nobody watched.

    kali:~# proxychains curl -s http://10.0.2.40/dumps/crown-jewels.csv
  4. Save it off

    Reading the data is not the same as having it: save it back to your own machine. Write the dump to Kali and record its size and a hash — the evidence a report hands the client, and, for a real attacker, the copy that leaves the network. The relay that carried you in carries the data out.

    kali:~# proxychains curl -s http://10.0.2.40/dumps/crown-jewels.csv -o /tmp/loot.csv; echo "staged $(wc -c < /tmp/loot.csv) bytes to /tmp/loot.csv"; sha256sum /tmp/loot.csv
  5. Guard every copy — the defender's answer

    The whole chain ends here because a copy of the crown jewels was guarded as plumbing. The defender's answer is to treat every copy as the crown jewels:

    • Guard backups like the original. The copy gets the same firewalling, the same login, and the same access rules as the original store. Reaching it must not mean reading it.
    • Encrypt it, and keep the key elsewhere. The backup is encrypted with a key the backup machine does not itself hold, so a stolen dump is unreadable.
    • Watch reads of the copy. A large or unusual read of a backup should raise the alarm exactly as it would on the original; backups are where this is most often missing.
    • And close the first thread. None of this stage happens if the firewall never trusted the web server inward. Layer the defences: the firewall split from stage 1, the per-machine logins from stage 3, and a guarded backup.

    Running this against a network whose owner has not authorised you in writing is a crime under laws like the UK Computer Misuse Act and the United States' CFAA — the signed engagement is what makes it a test and not an offence.

Run these steps on real machines

Keep reading

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab