Last active
January 13, 2023 08:43
-
-
Save caitlynrw/28c34acb64799955a68906875a534e76 to your computer and use it in GitHub Desktop.
Working Kali Linux Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM kalilinux/kali-rolling:latest | |
RUN echo "*** install packages *** " && apt update && apt upgrade -y \ | |
&& DEBIAN_FRONTEND=noninteractive apt install kali-linux-default kali-desktop-xfce xorgxrdp xrdp -y \ | |
&& useradd -d /home/kali -m -s /bin/bash kali && /bin/echo -e "kali\nkali\n" | passwd kali \ | |
&& echo 'kali ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | |
RUN echo "*** cleanup & patch ***" && \ | |
rm -f /usr/share/xfce4/panel/plugins/power-manager-plugin.desktop && apt clean \ | |
&& wget https://gist.githubusercontent.com/DarkMagicSource/28c34acb64799955a68906875a534e76/raw/1822c954966e5999bbf5d02b31699dd6fb6a6c56/entry -O /entry \ | |
&& chmod +x /entry | |
USER kali | |
EXPOSE 3389 | |
CMD ["sudo", "/entry"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Start xrdp sesman service | |
/usr/sbin/xrdp-sesman | |
# Run xrdp in foreground if no commands specified | |
if [ -z "$1" ]; then | |
/usr/sbin/xrdp --nodaemon | |
else | |
/usr/sbin/xrdp | |
exec "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment