View Issue Details

IDProjectCategoryView StatusLast Update
0005290Kali Linux[All Projects] Feature Requestspublic2019-08-15 13:48
ReportertjnullAssigned Torhertzog 
PriorityurgentSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Product Version2019.1 
Target VersionFixed in Version 
Summary0005290: Adding Powershell Core to be in the main installation of Kali Linux
DescriptionFor the past several months I have been working on maintaining the packages for Powershell Core to be working on Kali Linux. It appears that other distributions are now pushing Powershell to their Linux Distributions as well. Since other distributions are pushing Powershell on their Linux distributions I thought it would be fantastic if Kali Linux could also have it built-in to its operating system. Powershell is one of the most powerful languages for windows systems and many people are starting to use it now more then ever.

Please let me know if you decide to take this feature request into consideration because I absolutely love to help you all get Powershell working and installed by default on Kali Linux.
Steps To ReproduceI have tested this in Kali Linux 2019.1 and it works very well!

First, we need to download and add the public repository GPG key so APT will trust the packages and alert you to any issues with package signatures:

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
Second, Once the GPG key has been added, we need to add the Microsoft package repository to its own package list file under /etc/apt/sources.list.d/ This will allow us to also pull any updated packages that the PowerShell team will release in the future:

echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/PowerShell.list
apt update


Third we will need to install the following dependency packages below to continue the installation. You can download the package here:

libicu57: https://packages.debian.org/stretch/amd64/libicu57/download
icu-devtools: https://packages.debian.org/stretch/amd64/icu-devtools/download
liblttng-ust0: https://packages.debian.org/stretch/amd64/liblttng-ust0/download
liburcu4: https://packages.debian.org/stretch/amd64/liburcu4/download
liblttng-ust-ctl2: https://packages.debian.org/stretch/amd64/liblttng-ust-ctl2/download

Once the packages have been installed we can then install powershell on Kali Linux:

root@kali:~# apt-get install powershell
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libxmlsec1 libxmlsec1-openssl
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  powershell
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
Need to get 58.0 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Get:1 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch/main amd64 powershell amd64 6.1.3-1.debian.9 [58.0 MB]
Fetched 58.0 MB in 3s (20.1 MB/s)
Selecting previously unselected package powershell.
(Reading database ... 419462 files and directories currently installed.)
Preparing to unpack .../powershell_6.1.3-1.debian.9_amd64.deb ...
Unpacking powershell (6.1.3-1.debian.9) ...
Setting up powershell (6.1.3-1.debian.9) ...
Processing triggers for man-db (2.8.5-2) ...
root@kali:~/Downloads# pwsh
PowerShell 6.1.3
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /root/Downloads>

Reference: https://www.netsecfocus.com/infosec/tools/2018/09/25/Installing_Powershell_and_Powershell_Preview_on_Kali_Linux_2018-3.html

Relationships

has duplicate 0005624 closedrhertzog Can't install PowerShell on Kali 2019.2 

Activities

tjnull

2019-03-04 15:31

reporter  

Proof of Powershell.PNG (65,114 bytes)
Proof of Powershell.PNG (65,114 bytes)

akozlov

2019-03-05 18:48

reporter   ~0010395

Neat. So would this allow .PS1 files to be run and executed within the context of Kali?

tjnull

2019-03-07 16:04

reporter   ~0010400

@akozlov Yep and even to import modules as well. However, powershell for linux uses .net core instead of .net framework but I do not think there are any big differences. Still testing that out :D

rhertzog

2019-04-25 14:47

administrator   ~0010534

You say " It appears that other distributions are now pushing Powershell to their Linux Distributions as well.". Can you give us pointers related to this? If others are working on this, it might make sense to cooperate instead of doing it alone on our side. So please share any link/information that you might have.

rhertzog

2019-04-25 15:00

administrator   ~0010535

FWIW, we are definitely interested in having powershell available as a first-class package in our repository. We will be working on it and I will keep this bug updated. But it will require some significant work, we will see.

tjnull

2019-05-02 12:12

reporter   ~0010549

@rhertzog Microsoft Published an article on how you can install powershell for different Linux distributions shown here: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6

In the past, the instructions for installing Kali Linux are incorrect. That's why I created a guide back in September that covers step by step on installing PowerShell for Kali Linux.

As of now, the latest version of Ubuntu contains a snap in package that you can select to have PowerShell automatically install on your Ubuntu System. I do not know if there is one for debian based systems but it is definitely something we should look into further to see what process they have created already for adding powershell to Kali.

Issue History

Date Modified Username Field Change
2019-03-04 15:31 tjnull New Issue
2019-03-04 15:31 tjnull File Added: Proof of Powershell.PNG
2019-03-05 18:48 akozlov Note Added: 0010395
2019-03-07 16:04 tjnull Note Added: 0010400
2019-04-25 14:37 rhertzog Assigned To => rhertzog
2019-04-25 14:37 rhertzog Status new => assigned
2019-04-25 14:47 rhertzog Note Added: 0010534
2019-04-25 15:00 rhertzog Note Added: 0010535
2019-05-02 12:12 tjnull Note Added: 0010549
2019-08-15 13:48 rhertzog Relationship added has duplicate 0005624