Linux – information gathering (part 2)

2017-07-27 von Mario

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.

lsusb -l

The command “lspci” lists all PCI devices.

lspci -l

The command “lpstat” lists all printer devices.

lpstat -a

Users Information

To find out who you are, you can use „id“. That command prints real and effective user and group IDs.

id

The „who“ command shows who is logged on.

who

Indicates who is logged on the system and what he is doing.

w

With „last“ you can get a list of the last logged-in users.

last

Take a look in the home directories, if you have access to them.

ls -al /root/
ls -al /home/

In this home folders can more user information be found.

cat ~/.bashrc
cat ~/.profile

Some interesting mail information can be found in the following folders:

cat /var/mail/root
cat /var/spool/mail/root

Information about user rights can be found in the following configuration files.

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:

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

Kategorie: IT-Security Schlagwörter: