Couldn't open a raw socket. Error: Permission denied (13)

I am trying to get familiar with hacking and networking by doing HackTheBox challenges. At starting point Oopsie I am supposed to use command nmap -sS -A 10.10.10.28. However, after running it in Ubuntu 20.04 I got following error: Starting Nmap 7.91 ( ) at 2021-01-25 20:07 CET Couldn't open a raw socket. Error: Permission denied (13). At I read, that this feature is not implemented in nmap. Is there any way to open a raw socket in my operating system with this tool?

1

2 Answers

Did you install nmap using:
$ sudo snap install nmap
or
$ sudo apt install nmap
I had this same issue, I installed using snap and was getting the same error as you. If that is the case remove the snap install and use apt:
$ sudo snap remove nmap
$ sudo apt install nmap

run a command with nmap, if you get the error:
bash: /snap/bin/nmap: No such file or directory
use the following command to let go of the cached link:
hash -r
run nmap again,this worked for me.

How I got my answer.

1

You have to grant network access to nmap with:snap connect nmap:network-control

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like