我们在周末侵入了我们的服务器,我正试图追踪入侵者的踪迹.它们似乎运行了一个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 theps
program sees. On some platforms you may
have to use specialps
options or a differentps
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中的显示方式.
原文地址:https://www.jb51.cc/Perl/171738.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。