Open yellephen opened 2 years ago
Hi,
It is a known issue with docker and some distributions like Kali. It was discussed in https://github.com/nccgroup/BKScan/pull/1 and it is documented in the readme: https://github.com/nccgroup/BKScan#failed-to-open-display
After having no luck with kali, I tried on ubuntu 18.04. From a completely fresh install (I chose not to update or upgrade when prompted from the gui), these are the commands I ran
sudo apt-get update
sudo apt-get install docker.io
cd ~/Downloads
git clone https://github.com/nccgroup/BKScan.git
cd BKScan
sudo docker build -t bkscan .
sudo ./bkscan.sh -t xxx.xxx.xxx.xxx -p 3389
and the output I got was
[+] Targeting xxx.xxx.xxx.xxx:3389...
[+] No credential provided, won't support NLA
No protocol specified
[05:38:52:387] [1:1] [ERROR][com.freerdp.client.x11] - failed to open display: :0
[05:38:52:387] [1:1] [ERROR][com.freerdp.client.x11] - Please check that the $DISPLAY environment variable is properly set.
Sorry to hear you are still having problems. Below are 2 environments I tried a while back but things may have changed since then:
Failing on Ubuntu 18.04:
user@ubuntu18-04:~/rdp_bug/docker/docker-xfreerdp$ echo $DISPLAY
:0
user@ubuntu18-04:~$ ps aux|grep Xorg
user 1666 0.4 1.6 533252 131016 tty1 Sl+ Jun03 13:19 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
Success on Ubuntu 16.04:
user@ubuntu16-04:~$ ps aux|grep Xorg
root 3868 0.1 0.9 454868 104224 tty7 Ss+ Jun04 3:13 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitc
Also see http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
You may want to try on the latest Ubuntu though as they may have fixed the problem https://ubuntu.com/download/desktop
I've had this issue on two completely separate kali instances. I install the tool following the installation instructions. The docker installation completes successfully and
sudo ./bkscan.sh -h
gives me the expected output. However when I try to scan a target machine withsudo ./bkscan.sh -t <IP Address>
I get the following error.[+] No credential provided, won't support NLA
No protocol specified
[22:41:07:683] [1:1] [ERROR][com.freerdp.client.x11] - failed to open display: :0.0
[22:41:07:683] [1:1] [ERROR][com.freerdp.client.x11] - Please check that the $DISPLAY environment variable is properly set.