这个perl恶意软件对更改“$0”有什么作用?

我们在周末侵入了我们的服务器,我正试图追踪入侵者的踪迹.它们似乎运行了一个perl脚本,导致名为init的www数据进程以100%运行.不幸的是我没有perl专业知识,所以我不知道这是做什么的:
6 my $processo =("atd","sendmail: accepting connections","rpc.idmapd","syslogd -m 0","/sbin/udevd -d","/sbin/init");
# ...
24 use IO::Socket;
25 use Socket;
26 use IO::Select;
27 chdir("/tmp");
28 $servidor="$ARGV[0]" if $ARGV[0];
29 $0="$processo"."\0"x16;;
30 my $pid=fork;
31 exit if $pid;

在我看来,第29行的指令旨在以某种方式隐藏过程.它究竟做了什么?

解决方法

perldoc perlvar开始:

On some (but not all) operating systems assigning to $0 modifies the argument area that the ps program sees. On some platforms you may
have to use special ps options or a different ps to see the changes.
Modifying the $0 is more useful as a way of indicating the current
program state than it is for hiding the program you’re running.

所以是的,你的断言是正确的.它正在寻找掩盖它在ps中的显示方式.

相关文章

1. 如何去重 #!/usr/bin/perl use strict; my %hash; while(...
最近写了一个perl脚本,实现的功能是将表格中其中两列的数据...
表的数据字典格式如下:如果手动写MySQL建表语句,确认麻烦,...
巡检类工作经常会出具日报,最近在原有日报的基础上又新增了...
在实际生产环境中,常常需要从后台日志中截取报文,报文的形...
最近写的一个perl程序,通过关键词匹配统计其出现的频率,让...