From 6d15413a881f62661fe5d98c2202b5ffbe7f2455 Mon Sep 17 00:00:00 2001 From: Ryen Tang Date: Thu, 21 May 2020 11:24:08 +0800 Subject: [PATCH] Update KaliLinux --- .../kalilinux}/docker/Dockerfile | 36 +++++-------------- release/community-stable/kalilinux/meta.json | 12 +++++++ .../unstable/kali-rolling/getLatestTag.ps1 | 14 -------- release/unstable/kali-rolling/meta.json | 10 ------ 4 files changed, 20 insertions(+), 52 deletions(-) rename release/{unstable/kali-rolling => community-stable/kalilinux}/docker/Dockerfile (72%) create mode 100644 release/community-stable/kalilinux/meta.json delete mode 100644 release/unstable/kali-rolling/getLatestTag.ps1 delete mode 100644 release/unstable/kali-rolling/meta.json diff --git a/release/unstable/kali-rolling/docker/Dockerfile b/release/community-stable/kalilinux/docker/Dockerfile similarity index 72% rename from release/unstable/kali-rolling/docker/Dockerfile rename to release/community-stable/kalilinux/docker/Dockerfile index 4131085d2..0dae6e832 100644 --- a/release/unstable/kali-rolling/docker/Dockerfile +++ b/release/community-stable/kalilinux/docker/Dockerfile @@ -2,26 +2,16 @@ # Licensed under the MIT License. # # Docker image file that describes an Kali Rolling image with PowerShell -# installed from Debian9 PowerShell package +# installed from Debian11 PowerShell package -# Define arg(s) needed for the From statement -ARG fromTag=kali-rolling -ARG imageRepo=kalilinux/kali-linux-docker - -FROM ${imageRepo}:${fromTag} AS installer-env +FROM kalilinux/kali-rolling:latest AS installer-env # Define Args for the needed to add the package -ARG PS_VERSION=6.2.3 -ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.9_amd64.deb +ARG PS_VERSION=7.0.1 +ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.11_amd64.deb ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} ARG PS_INSTALL_VERSION=7 -# Define Args for the needed to add the package -ARG KALI_REPO_KEY_PACKAGE_URL=https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.2_all.deb - -# Define Args for the needed to add the package -ARG DEBIAN_PACKAGE_URL=http://ftp.us.debian.org/debian/pool/main/i/icu/libicu57_57.1-6+deb9u3_amd64.deb - # Define Args and Env needed to create links ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ \ @@ -40,20 +30,8 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION \ # Installation RUN \ - # Download the Kali repository package and save it - wget -O /tmp/kali-archive-keyring_2018.2_all.deb --no-check-certificate ${KALI_REPO_KEY_PACKAGE_URL} \ - # install kali package to renew kali repository expired certificate in container image - && apt-get install --no-install-recommends /tmp/kali-archive-keyring_2018.2_all.deb \ - # remove kali package - && rm -f /tmp/kali-archive-keyring_2018.2_all.deb \ - # Download the libicu57 Debian package and save it - && wget -O /tmp/libicu57_57.1-6+deb9u3_amd64.deb --no-check-certificate ${DEBIAN_PACKAGE_URL} \ - # install required libicu57 package - && dpkg -i /tmp/libicu57_57.1-6+deb9u3_amd64.deb \ - # remove libicu57 package - && rm -f /tmp/libicu57_57.1-6+deb9u3_amd64.deb \ # update package list - && apt-get update \ + apt-get update \ # install dependencies && apt-get install --no-install-recommends -y \ # required for HttpClientHandler @@ -66,6 +44,8 @@ RUN \ locales \ # required to support NTLM for PSRemoting gss-ntlmssp \ + wget \ + libicu63 \ # enable en_US.UTF-8 locale && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ # generate locale @@ -95,7 +75,7 @@ RUN \ && rm -rf /var/lib/apt/lists/* # Define args needed only for the labels -ARG IMAGE_NAME=pshorg/powershellcommunity:kali-kali-rolling +ARG IMAGE_NAME=pshorg/powershellcommunity:kalilinux ARG VCS_REF="none" # Add label last as it's just metadata and uses a lot of parameters diff --git a/release/community-stable/kalilinux/meta.json b/release/community-stable/kalilinux/meta.json new file mode 100644 index 000000000..34838a665 --- /dev/null +++ b/release/community-stable/kalilinux/meta.json @@ -0,0 +1,12 @@ +{ + "IsLinux" : true, + "PackageFormat": "powershell_${PS_VERSION}-1.debian.11_amd64.deb", + "SkipGssNtlmSspTests": false, + "shortTags": [ + {"Tag": "latest"} + ], + "tagTemplates": [ + "#psversion#-kalilinux-#tag#", + "kalilinux" + ] +} diff --git a/release/unstable/kali-rolling/getLatestTag.ps1 b/release/unstable/kali-rolling/getLatestTag.ps1 deleted file mode 100644 index 266872373..000000000 --- a/release/unstable/kali-rolling/getLatestTag.ps1 +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -# return objects representing the tags we need to base the kali image on - -# The versions of kali we care about -$shortTags = @('latest') - -$parent = Join-Path -Path $PSScriptRoot -ChildPath '..' -$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..' -$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags' -Import-Module $modulePath - -Get-DockerTags -ShortTags $shortTags -Image "kalilinux/kali-rolling" -FullTagFilter '^latest$' -OnlyShortTags diff --git a/release/unstable/kali-rolling/meta.json b/release/unstable/kali-rolling/meta.json deleted file mode 100644 index cf9db6c00..000000000 --- a/release/unstable/kali-rolling/meta.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "IsLinux" : true, - "PackageFormat": "powershell_${PS_VERSION}-1.debian.9_amd64.deb", - "SkipGssNtlmSspTests": false, - "IsBroken": true, - "tagTemplates": [ - "#psversion#-kali-#tag#", - "kali-#shorttag#" - ] -}