收集基本信息:
history >>history.txt
pstree -achup>>pstree.achup.txt
ps -auxe>>psauxe.txt
ps -ef >>psef.txt
ss -a >>ssa.txt
ss >>ss.txt
netstat -anop >>netstatanop.txt
查找具体某天修改过的文件
find / -type f -newermt "2018-11-27" ! -newermt "2018-11-29"|xargs stat
查反弹shell(可能不太准,给个参考)
while [ 1 -eq 1 ]
do
sleep 1
t=""
for i in `find /proc/ -maxdepth 3 -name 'fd' `
do
if [ -e $i/0 -a -e $i/1 ]
then
if [ '2'x = `ls -l $i/0 $i/1|grep "socket" |wc -l`x ]
then
#echo $i/0
#echo $i/1
t=$i
break
fi
fi
done
#echo $t
pid=`echo "$t" |awk -F / '{print $3}' `
echo $pid,`pstree -s $pid`
done
Dump内存指令
gcore PID
strace -f -o xxx -e trace=open -p <PID> 这个是记录跟踪系统调用情况的