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
What does the command ss -tlnp list?
- Listening TCP sockets with numeric ports and the owning processes
- All files with the setuid bit
- Installed packages and their versions
- 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.
Which sources help assess a host's patch level?
- Installed package and kernel versions compared with advisories
- The list of installed Windows hotfixes
- An unusually long uptime, hinting that kernel updates were not applied
- The presence of antivirus software
- 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.
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.
