Intranet Penetration_Information Collection (Linux)

Linux information collection

Linux information collection script:
1. Address:

https://github.com/rebootuser/LinEnum

2. Usage:
Upload to the /tmp directory, and then grant permissions to run to
Insert image description here
collect manually.

1. Check the port status (service, intranet IP connection, etc.)

netstat -anpt

Insert image description here

2. Check the process status

ps -ef 或者 ps -aux
top

Insert image description here

3. View files (obtain passwords, website directories, asset information, etc.)

1)查看历史命令:cat /root/.bash_history
2)查看passwd文件:cat /etc/passwd
3)查看shadow文件:cat /etc/shadow
4)查看系统日志:cat /var/log/syslog或者/var/log/下的所有日志

Insert image description here

4. Find a file

find / -name *.conf

Insert image description here

5. View scheduled tasks

crontab -l

6. View system related information

cat /etc/issue         查看系统名称
cat /etc/lsb-release   查看系统名称,版本号    #或者 cat /etc/*release
uname -an              查看内核版本

Insert image description here

7. Install software information

dpkg -l 
rpm -qa

8. Network information:

ifconfig
route  #查看路由信息

9. View the last login information of all users

lastlog 

Insert image description here

10. View other users currently logged in to the system w command

Insert image description here

Scan:
1. Windows:

for/l %i in(11255) do @ping 192.168.1.%i -w 1 -n 1 | find /i "ttl"

2、Linux:

#!/bin/bash
#测试局域网中的存活主机
for i in {
    
    1..254}
do
  ping -c 1 192.168.100.$i &>/dev/null && echo 192.168.100.$i is alive &
done

Guess you like

Origin blog.csdn.net/qq_42383069/article/details/124315756