Giter Club home page Giter Club logo

kali-linux-docker's Introduction

Kali-Linux(LXDE)-Docker image with VNC

Docker image with HTML5 VNC interface access to Kali-Linux container LXDE desktop environment.

Quick Start

This Kali Linux Docker image provides a minimal base install of the latest version of the Kali Linux Rolling Distribution. There are no tools added to this image, so you will need to install them yourself. For details about Kali Linux metapackages, check https://www.kali.org/news/kali-linux-metapackages/

Before building, check the Dockerfile to uncomment or add needed Kali Linux Metapackages

Build the image

docker build -t kali-docker .

Run the docker image and open port 6080

docker run -it -d --rm --name kali-docker -p 6080:80 kali-docker

Browse http://127.0.0.1:6080/

Connect with VNC Viewer and protect by VNC Password

Forward VNC service port 5900 to host by

docker run -it --rm -p 6080:80 -p 5900:5900 kali-docker

Now, open the vnc viewer and connect to port 5900. If you would like to protect vnc service by password, set environment variable VNC_PASSWORD, for example

docker run -it --rm -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword kali-docker

A prompt will ask password either in the browser or vnc viewer.

To get into bash of the running container

sudo docker exec -i -t kali-docker /bin/bash

P.S. If you are going to run container in cloud virtual machine, first run the bellow command to virtual machine in cloud to create ssh tunnel to your virtual machine

ssh -i .ssh/private_key -L 6080:localhost:6080 -L 5900:localhost:5900 user@IP

kali-linux-docker's People

Contributors

maxtacu avatar oliverlavery avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kali-linux-docker's Issues

Docker image won't build with `python-pip`

Hey @maxtacu nice job with this project!

I am building the docker image but receiving

E: Package 'python-pip' has no installation candidate

Looks like its something to do with apt install python-pip package.
Python Packaging Authority started to remove the python2 from repositories, I believe.

When changing python-pip to python3-pip in Dockerfile I am progressing the build till the end but unfortunately the following error occurs:

Downloading wsgiref-0.1.2.zip (37 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8bqibueq/wsgiref_1528c82a54e9481e9e17aa01f935348c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8bqibueq/wsgiref_1528c82a54e9481e9e17aa01f935348c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-s1qbri8a cwd: /tmp/pip-install-8bqibueq/wsgiref_1528c82a54e9481e9e17aa01f935348c/ Complete output (8 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-8bqibueq/wsgiref_1528c82a54e9481e9e17aa01f935348c/setup.py", line 5, in <module> import ez_setup File "/tmp/pip-install-8bqibueq/wsgiref_1528c82a54e9481e9e17aa01f935348c/ez_setup/__init__.py", line 170 print "Setuptools version",version,"or greater has been installed." ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Setuptools version",version,"or greater has been installed.")? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. The command '/bin/sh -c pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt' returned a non-zero code: 1

build error

OS:centos7
when I build this images,i got a error on step 12:

ERROR: Could not find a version that satisfies the requirement urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests>=2.20.0->-r /usr/lib/web/requirements.txt (line 14)) (from versions: none)
ERROR: No matching distribution found for urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests>=2.20.0->-r /usr/lib/web/requirements.txt (line 14))

could you tell me what happen?

novnc exit staus 1

Hi, I am sorry to file an issue again.
when I try to run this docker with command:

docker run -it -d --rm -p 6080:80 kali-docker

I got a error, it seems Novnc can't work and keep restarting.

Error:
2020-06-07 12:47:39,263 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-07 12:47:39,263 INFO success: lxpanel entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-07 12:47:39,263 INFO success: lxsession entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-07 12:47:39,263 INFO success: pcmanfm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-07 12:47:39,263 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-06-07 12:47:39,265 INFO spawned: 'novnc' with pid 148
2020-06-07 12:47:39,305 INFO exited: novnc (exit status 1; not expected)
2020-06-07 12:47:41,511 INFO spawned: 'novnc' with pid 166
2020-06-07 12:47:41,546 INFO exited: novnc (exit status 1; not expected)
2020-06-07 12:47:44,725 INFO spawned: 'novnc' with pid 184
2020-06-07 12:47:44,839 INFO exited: novnc (exit status 1; not expected)
2020-06-07 12:47:44,839 INFO gave up: novnc entered FATAL state, too many start retries too quickly

Service failed to build

After executing docker-compose build ( which is just building the Dockerfile and mapping the ports ) it will give me the mentioned error.

Expected Behavior

The script should be able to install.

Current Behavior

The script aborts.

...
The following packages will be REMOVED:
  libargon2-0 libdns-export1100 libdns-export1102 libisc-export169
0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
After this operation, 5496 kB disk space will be freed.
Do you want to continue? [Y/n] Abort.
ERROR: Service 'kali' failed to build: The command '/bin/sh -c apt-get install -y --no-install-recommends --allow-unauthenticated         openssh-server pwgen sudo vim-tiny        supervisor         net-tools         lxde x11vnc xvfb autocutsel        xfonts-base lwm xterm         nginx         python-pip python-dev build-essential         mesa-utils libgl1-mesa-dri         dbus-x11 x11-utils     && apt-get autoclean     && apt-get autoremove     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1

Steps to Reproduce

  1. Prepare a docker-compose file:
kali:
  build: .
  ports:
  - "6080:80
  1. Run the following command:
cd /path/to/kali-linux-docker && docker-compose build

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.