我的系统上运行着一个恶意 tor 进程。我正在使用 linux 机器。我尝试使用 lsof -i:9050 和 lsof -i|grep 'tor'
我没能在上面找到任何东西。下面是抛出的错误:
May 09 22:57:15.981 [notice] Tor v0.2.3.25 (git-17c24b3118224d65) running on Linux.
May 09 22:57:15.981 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
May 09 22:57:15.981 [notice] Read configuration file "/etc/tor/torrc".
May 09 22:57:15.986 [warn] ControlPort is open, but no authentication method has been configured. This means that any program on your computer can reconfigure your Tor. That's bad! You should upgrade your Tor controller as soon as possible.
May 09 22:57:15.986 [notice] Initialized libevent version 1.4.13-stable using method epoll. Good.
May 09 22:57:15.986 [notice] Opening Socks listener on 127.0.0.1:9050
May 09 22:57:15.986 [notice] Opening Control listener on 127.0.0.1:9051
May 09 22:57:15.000 [warn] It looks like another Tor process is running with the same data directory. Waiting 5 seconds to see if it goes away.
May 09 22:57:20.000 [err] No, it's still there. Exiting.
非常感谢任何帮助。
最佳答案
rogue tor 进程是如何进入您的系统的?你是在那里安装它然后忘了在哪里,还是你被黑了?如果是后者,请跳过下一段。
您可以搜索 tor 监听的 TCP 端口,并从那里获取进程 ID。运行 netstat -anp
并搜索在相关端口上监听的人。如果您不确定端口是什么,我建议使用网络嗅探器(例如 tcpdump
或 wireshark
)。上面的命令,如果以 root 身份运行,将为您提供监听进程的 pid。
如果你在那里找不到端口,或者有,但是ps和kill仍然没有显示进程,那么你很可能被黑了。现代 Rootkit 可以隐藏它们的进程和文件,这样即使您知道它们在哪里也无法访问它们。如果是这样,请不要为终止进程而烦恼。你有更大的问题。
没有通用的有效方法可以从受感染的系统中删除 Rootkit。在这种情况下,您唯一的好做法是重新安装系统。此外,尝试找到用于入侵您的门(通常是过时的服务)并关闭它。
编辑添加
netstat -anp
即使您不是 root 用户也可以使用。您只会看到您自己用户的 PID,但这可能足以满足您在此处尝试执行的操作。
此外,如果 tor 作为您正在做的事情的副产品运行,那么 strace 可能是您的 friend :
strace -e execve -f -o/tmp/trace
将输出到/tmp/trace 您的进程及其任何子进程完成的任何 execve 调用。您可以在那里 grep for tor 并查看 PID 是什么,然后从那里弄清楚如何在一般情况下找到它。
关于linux - 终止流氓 "tor"进程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37132828/