Bitzu

CPSA ยท Mapping, fingerprinting and host auditing

Host audit techniques

Listing processes and sockets, assessing patch levels and finding interesting files.

Key points

  • With a login on the host you can see what an outside scan cannot: processes and their owners, listening and established sockets (for example ss -tulnp), the installed package or hotfix list compared with known advisories, and interesting files such as world-writable files, setuid binaries, private keys, backups and configuration files holding passwords.
  • A listener bound to 0.0.0.0 is reachable from the network, one bound to 127.0.0.1 is not.

Source: https://man7.org/linux/man-pages/man8/ss.8.html

Practice questions

Single choice

What does the command ss -tlnp list?

  1. Listening TCP sockets with numeric ports and the owning processes
  2. All files with the setuid bit
  3. Installed packages and their versions
  4. Logged-in users and their last login times
Show answer

Answer: A. Listening TCP sockets with numeric ports and the owning processes

-t selects TCP, -l only listening sockets, -n keeps numeric ports and -p shows the owning process. It does not list files, users or patches.

Select all that apply

Which sources help assess a host's patch level?

  1. Installed package and kernel versions compared with advisories
  2. The list of installed Windows hotfixes
  3. An unusually long uptime, hinting that kernel updates were not applied
  4. The presence of antivirus software
  5. The colour scheme of the login banner
Show answer

Answer: A. Installed package and kernel versions compared with advisories, B. The list of installed Windows hotfixes, C. An unusually long uptime, hinting that kernel updates were not applied

Installed package or kernel versions compared with advisories, the Windows hotfix list and an unusually long uptime (hinting that kernel updates were never applied by reboot) all help. The presence of antivirus or a login banner says nothing about patches.

True or false

If an external port scan finds no open ports on a host, the host has no listening sockets.

Show answer

Answer: False

False. Services bound to loopback, or ones blocked by a firewall, do not appear to an external scan but still listen. A local view with ss shows them, and they matter after a foothold is gained.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CPSA topics in this module