>_ IzzyLab

Hands-on task

This task is step 7 of the course “Investigating a server”

Nesting dolls in the attacker's dump

medium~5 min

/root/evidence/ contains an archive exfil.tar the attacker prepared for exfiltration. Inside it is a compressed archive loot.tgz, and inside that is the file creds.txt that the whole thing was about. Extract the contents of creds.txt and write them to /root/creds.txt to find out which passwords need changing urgently.

What you'll practise:
  • tar
  • nested archives
  • gzip
  • pipelines
  • investigation

Topic breakdown

An archive inside an archive is a common trick: it hides the contents from a quick glance and from scanners that don't look deeper than one level. Such nesting dolls are taken apart layer by layer, and on each layer you need to know the format: .tar is just files glued together, .tgz (.tar.gz) is the same thing compressed with gzip, and for it tar needs the gzip decompression flag. tar can write a file from an archive to stdout (-O) and read an archive from stdin (-f -), so two layers can be joined with a pipe without temporary files — and the evidence isn't scattered across the disk.

What's checked

  1. creds.txt extracted from the nested archive

What it looks like