Linux – Metasploitable_2 (Cannot issue apt-get to update or install any packages)


I just setup Metasploitable 2 on VMware Fusion. I downloaded the image from here. I've booted it up and everything and can navigate around but would like to run a apt-get install update and possible be able to install additional packages through using the apt-get function later on if I need too. However, it's not letting me run the command. Here are a few examples of what i'm talking about.

Here i'm running..

apt-get install git

enter image description here

Here i'm trying to do a simple update. Maybe there isn't anything to update but I would think there would be something..

apt-get update

enter image description here

Here i'm just trying to install a simple command called tree…

apt-get install tree

enter image description here

Don't understand what is going on. I do have a connection because i can ping for instance. I've looked up documentation on installing Metasploitable 2 but everything seems outdated and as a result several steps pertaining to those documents just don't work since their outdated. Is there any documentation out there that someone could point me too to finish setting up this image. All i want to do is use it as a target so probably don't need to do much else. However, i'm new to VMware and especially Metasploitable 2 so if anyone has any suggestions on additional steps I need to complete in configuring any settings please let me know.

Best Answer

Metasploitable2 is specifically designed to be a vulnerable distribution that's been forked off Ubuntu. While your usual package management commands exist, there's no real point in patching security holes (as you would normally do), or even making available a full set of packages.

If you absolutely must get packages, I'd recommend working out what version of ubuntu they use as a base and either downloading the packages manually, or adding the repos, but using pinning to prevent the system from auto-updating like so.

In short, this is entirely by design