Linux – information gathering (part 2)
This is the secound part of Linux – information gathering.
Peripheral Devices
With the following commands, you get information about peripheral devices. The command “lsusb” lists all USB devices.
1 | lsusb -l |
The command “lspci” lists all PCI devices.
1 | lspci -l |
The command “lpstat” lists all printer devices.
1 | lpstat -a |
Users Information
To find out who you are, you can use „id“. That command prints real and effective user and group IDs.
1 |
The „who“ command shows who is logged on.
1 | who |
Indicates who is logged on the system and what he is doing.
1 | w |
With „last“ you can get a list of the last logged-in users.
1 | last |
Take a look in the home directories, if you have access to them.
1 2 | ls -al /root/ ls -al /home/ |
In this home folders can more user information be found.
1 2 | cat ~/.bashrc cat ~/.profile |
Some interesting mail information can be found in the following folders:
1 2 | cat /var/mail/root cat /var/spool/mail/root |
Information about user rights can be found in the following configuration files.
1 2 3 4 | cat /etc/passwd cat /etc/sudoers cat /etc/group cat /etc/shadow |
Private Key Information
The private keys can be found in the following folders:
1 2 | ls ~/.ssh/* ls /etc/ssh/* |
Previous parts
Linux – information gathering (part 1)
Linux – information gathering (part 2)
Linux – information gathering (part 3)
Thx @Programming Wolf