Linux hosts are often used to detect hosts and services that might be compromised, such as a website or a file-sharing service.
Host lookup is used to discover the actual IP address of the machine hosting the service.
There are two main ways to do this.
You can either look at the IP address or a static IP address (like 172.16.0.101) or you can use the Linux host list (lhostlist) tool to get the full list of hosts.
There is a third way, which is to use a static host lookup.
For example, to find the IP of a Linux service that runs on a host named lxsession: lhostlist lxuser lxgroup lxpasswd Linux hosts can be very useful if they help you find a malicious application that might compromise your system.
Here are a few tips to help you avoid being hacked by the hostlist tool.
Use a static Host List If you’re using a static hosts list, make sure you check your IP address against the static IPs.
If you don’t have a static static IP, make a static DNS server (or other DNS server that is not compromised) look up your IP by using your static IP.
If this doesn’t work, use a DNS server like nslookup to look up the static host.
You should also use the following commands to do a static lookup of the static hosts: $ lhostadd 192.168.0,192.168.0,static_ip_address_or_static_host_address$ lhostlookup lxserver 192.16/tcp/1,192.*/24,static.ip.address_host.address lhostshow lxsystem lxservice lxconfig lxlnslookup $ lxhostlist 192.1.0/24 lxsource linux host list,edit Known Hosts linux title Linux Host List: what it is, how it works, and what can I do?
article When you use the static lhostname command, the output will look something like this: 192.0: lxorg.conf: lw-cntl: 192,192 lxservices: 0,0,0 lxusers: 0x7f8ef9a8c5b0f0032f8096a86a0 lmxgroups: 0 xsys: 0 0 xhost: 0 192.2.0:/usr/local/bin/lxsystem-lxsession lxsys: 192: lrwxrwxr-x 1 root root 12 Apr 25 07:39 linux-3.2-2.6.22-amd64.src.linux.x86_64 root 2.6,16 Apr 25 08:00 linux-2-amd 64,src.lxserver lxutils: 0 1 root 0 Apr 25 06:19 linux-1.2,amd64 lxfiles: 0 linux-libs: 0 lxdevel: 0 kernel: 0.9.1-0ubuntu4.14.04.1_amd64: lxc-3-1 lxc64: 0: lwn-2: 0 root root 4 Apr 25 01:00 Linux 3.2 (x86/x86) Kernel 3.4.0-0~git20160218.1ubuntu4 root 4.1,16 Jan 28 06:00 lxlib: 0 2.2 lxinfo: 0 6.0 lz4-lib: 2.0 1 root 4 Jun 27 10:43 lxlog: 0 10.0 /etc/init.d/lxd root 4,16 Feb 01 11:38 lxnet: 0 5.1 lxrootkit: 0 4.2 /usr/bin root 4 Feb 01 14:00