Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to open display #5

Open
yellephen opened this issue Mar 21, 2022 · 3 comments
Open

Failed to open display #5

yellephen opened this issue Mar 21, 2022 · 3 comments

Comments

@yellephen
Copy link

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 with sudo ./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.

@saidelike
Copy link
Collaborator

Hi,

It is a known issue with docker and some distributions like Kali. It was discussed in #1 and it is documented in the readme: https://github.com/nccgroup/BKScan#failed-to-open-display

@yellephen
Copy link
Author

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.

@saidelike
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants