windows常用命令
net user 查看用户(无法列出$用户)
HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\ 查看注册表中的用户
net localgroup administrators 查看本地管理员组
net session 查看会话
net start 查看已经启动的服务
wmic process 显示所有的进程
netstat -ano 查看端口进程
netstat -ano | findstr "80" 查看特定端口
tasklist /svc | findstr "80" 查看占用80端口的进程
taskkill /F /pid "80" 杀掉进程
动态文件监测往往是一种很有效的恶意文件排查方法,一旦锁定进程的pid就能利用wmic process get name,executablepath,processid |findstr pid 迅速抓出文件的
linux常用命令
cat /etc/passwd
cat /etc/shadow
history
home 下的.bash_history
cat .bash_history >> history.txt
netstat -anplt | more 查看端口
查看进程
ps -ef
ps aux
ps aux | grep pid
定时任务查看
#crontab
/etc/crontab/
/var/spool/
查找异常文件
find / -name *.php
-type f //文件
-type d //文件夹
检查日志文件
/var/log
cat test.log | more | less
按/ 进行查找
打开日志文件
head -5 file //显示前5行
tail -5 file //显示后5行
查看进程cpu使用率
top
第一行,任务队列信息,同 uptime 命令的执行结果
第二行,Tasks — 任务(进程)
第三行,cpu状态信息
第四行,内存状态
第五行,swap交换分区信息
第七行以下:各进程(任务)的状态监控
按数字1查看每一个cpu占用率
打包log文件
tar zcvf file.tar.gz dir
tar zxvf file.tar.gz