Debian:列出所有用户安装的软件包?

问题描述:

在我参加的网络安全竞赛中,我得到了一台安装了许多软件包的 Debian 虚拟机,并要求我清理无关或恶意的软件包.

For a cyber security competition I participate in, I'm given a Debian virtual machine with many packages installed and asked to clean extraneous or malicious packages.

过去,我使用过 dpkg -l |grep [searchterm] 和执行此任务的常用包列表.然而,这是极其低效和耗时的.

In the past, I've used dpkg -l | grep [searchterm] and a list of common packages to preform this task. However, this is extremely inefficient and time-consuming.

为了加快我的任务,有什么方法可以搜索系统上安装的软件包列表,哪些进程已由用户安装并且不是系统默认"软件包?

To speed up my task, is there any way to search through the list of packages installed on a system for which processes have been installed by a user and are not system "default" packages?

这个命令可能会缩短你的工作:

This command may shorten your work:

apt-mark showmanual

它应该显示手动"安装了哪些软件包.不过,这并不是 100% 可靠,因为许多自动安装的软件包被标记为手动安装(因为原因太长,无法在此描述).

It is supposed to show what packages were installed "manually". It is not 100% reliable though, as many automatically installed packages are flagged as manually installed (because of reasons too long to describe here).

您还可以(如果允许)运行安全工具,例如 clamav 和/或 rkhunter 来扫描您的计算机以查找恶意程序.

You may also (if allowed) run security tools such as clamav and/or rkhunter to scan your computer for malicious programs.