网络信息
window:
ipconfig
ipconfig/all
route print #查看路由信息
linux:
ifconfig
ifconfig | more #当有很多网卡时,可以这样查看
ifconfig >1. txt #当有很多网卡时,可以这样查看
head -n 10 1. txt #当有很多网卡时,可以这样查看
ip addr #看不了网关
route -n #查看路由信息能看网关
系统信息
windows:
systeminfo
windows findstr搜寻特定信息
linux grep搜寻特定信息
uname -a #查看内核
cat /etc/*realse #查看具体是centos, unbutun 查看发行版本
cat /proc/version #当前操作系统版本信息
3.软件信息
提权第三方软件
看杀软 安全防护
windows:
wmic
/? #看提示信息
wmic product get name, version #查看安装的软件和版本
x86_64是64位的
linux:
redhat, centos有rpm包的可用
rpm-qai查看安装软件信息
rpm -qai|grep mariadb #查找和maridb相关信息
rpm-qai| more \mairidb #查找和maridb相关信息
kali, ubutun, debain
dpkg --get-selections #查看安装软件信息
4.查看服务
windows:
wmic sevices list brief #查看服务信息列表
wmic services list brief | findstr running #查看正在运行的服务
net start #查看服务信息列表
当杀进程,杀不掉,可以关服务;当关了杀软后,还能运行,杀软的服务没关
linux:
redhat ,centos
systemctl list-units
5.查看进程
windows:
tasklist
wmic process list brief
linux:
ps aux
ps -elf #多看ppid,父进程的pid
pstree -ps #进程树
top #查看活动进程
6.查看自启动程序
windows:
wmic startup
linux:
systemctl list-unit-files | grep enabled #查找开机自启程序
chkconfig
运行等级 0关机1 2 6重启
7.计划任务
windows:
sctasks / query
at
linux:
cat / etc/ crontab
crontab -l
自动开机自动加载的脚本 / etc/ rc
8.查看启动时间
windows:
net statistics workstation
systeminfo
linux:
uptime
top
9.查看用户
windows:
net user
net localgroup
query user或qwinsta #查在线用户
rwinsta #踢在线用户
whoami #查看当前用户
linux:
cat / etc/ passwd
cat / etc/ shadow
id #查看当前用户
whoami
10.查看会话
windows:
net session
linux:
who
11.查看端口
windows:
netstat -ano
netstat -anp tcp udp
linux:
nestat -anplt
12.查看补丁
systeminfo
wmic qfe #查看补丁
13.查看共享
windows:
net share
wmic share
linux:
查看有没有服务
samba
nfs
systemctl list-units |grep samba
14.查arp
windows:
arp -a
linux:
arp-n
15.查防火墙
windows:
netsh firewall show config#查看防火墙配置
linux:
iptables
firewalld
iptables -L #查看规则
16.查代理
windows:
注册表查看
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Internet Settings"
linux:
env|grep -i proxy
17.查远程服务
windows:
查看连接的端口号
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V PortNumber
开启远程服务:
win2008和win2012
wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS != "") call setallowtsconnections 1
wmic /namespace:\\root\cimv2\terminalservices path win32_tsgeneralsetting where (TerminalName ='RDP-Tcp') call setuserauthenticationrequired 1
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fSingleSessionPerUser /t REG_DWORD /d 0 /f
win2003
wmic path win32_terminalservicesetting where (__CLASS != "") call setallowtsconnections 1
linux查服务
ssh
18.查内网其他信息
(1)查存活主机
netbios 协议电脑主机名和ip对应
icmp
tcp udp
(2)查存活端口
nmap tcp,udp脚本,nc,landon
参考连接:
https://blog.csdn.net/weixin_44578334/article/details/109952944