1

I just installed metasploit + armitage on my Ubuntu 16.04 machine. When I start armitage and click "Hosts->Nmap->Quick Scan (OSdetect)" I get the following error:

msf > db_nmap --min-hostgroup 96 -sV -n -T4 -O -F --version-light 192.168.0.0/24
[*] Nmap: 'TCP/IP fingerprinting (for OS scan) requires root privileges.'
[*] Nmap: 'QUITTING!'

I launched armitage with sudo like so sudo -E java -jar armitage.jar (it wont even run otherwise).

What else can I do to give that nmap scan the necessary privileges?

0

3 Answers 3

2

The nmap command is not launched by armitage but by msfrpcd.

So you must make sure that msfrpcd is running with root privileges.

So what I guess happened for you: you started armitage without root and without msfrpcd running. In this case armitage asks you if it should start msfrpcd. If you clicked "yes". msfrpcd was started without root. If you quit, msfrpcd does not quit, too, but keeps running in the background. Now you restarted armitage with sudo but it connected to the non-sudo msfrpcd so nmap still complains about not having root.

Easiest way to fix: Quit armitage, quit msfrpcd (e.g. by using htop), start armitage with sudo, which will ask you again if it should launch msfrpcd. which will now be launched as root.

Alternatively, you can launch msfrpcd separately with sudo msfrpcd -U user -P password

0

sudo nano /usr/bin/msfrpcd ==>

BUNDLE_GEMFILE=/opt/metasploit/Gemfile bundle exec ruby /opt/metasploit/ms$

you will see the commands above, replace them with :

BUNDLE_GEMFILE=/opt/metasploit/Gemfile bundle exec sudo ruby /opt/metasploit/ms$

(just put a sudo before ruby command, during every armitage launch it will ask you sudo password on terminal and that's all )

0

Instead of using sudo, logging in terminal as root and then starting armitage from root worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .