365labs - Microsoft 365 and cybersecurity consultancy

View Original

Installing Chrome, Edge, VSCode, PowerShell 7 on Kali 2022.4

Update: 14/12/2022 - PowerShell 7.3.1 and 7.2.8 were released shortly after this article was published.

Installing Google Chrome

As always update package sources before we start:

sudo apt update

Download the current stable build of Chrome for Debian and install using apt:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install google-chrome-stable_current_amd64.deb

Note: You may receive a permissions notification: “Download is performed unsandboxed as root…….” this can safely be ignored if you confirm the installation was successful.

Installing Microsoft Edge

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm microsoft.gpg
sudo apt update && sudo apt install microsoft-edge-stable

Edge should now be installed successfully. Run Edge:

microsoft-edge

PowerShell

PowerShell 7.2.6 is installed by default in Kali 2022.4. PowerShell 7.2.7 (Long Term Support) or PowerShell 7.3.0 (Stable) are both available to manually download and install.

Firstly remove version 7.2.6. It does not seem to like being upgraded.

sudo apt remove powershell powershell-lts

Then download one of the following using wget:

wget https://github.com/PowerShell/PowerShell/releases/download/v7.2.7/powershell-lts_7.2.7-1.deb_amd64.deb

wget https://github.com/PowerShell/PowerShell/releases/download/v7.3.0/powershell_7.3.0-1.deb_amd64.deb

Then install the version you downloaded:

sudo apt install ./powershell-lts_7.2.7-1.deb_amd64.deb

sudo apt install ./powershell_7.3.0-1.deb_amd64.deb

Note: You may receive permissions notification: “Download is performed unsandboxed as root…….” this can safely be ignored if you confirm the version you install was sucessful.

Then from your terminal start PowerShell:

pwsh

From the PowerShell prompt check the installed version:

$PSVersionTable

Install Azure and ExchangeOnline PowerShell modules

From PowerShell:

Install-Module -Name Az
Import-Module Az
Install-Module -Name ExchangeOnlineManagement
Import-Module ExchangeOnlineManagement

Then attempt a connection to Exchange Online:

Connect-ExchangeOnline -UserPrincipalName 365username@365domain.com
Get-Mailbox

You should be connected to Exchange Online and see a list of mailboxes in the tenant. Disconnect from Exchange Online:

Disconnect-ExchangeOnline -Confirm:$false

Install Visual Studio Code (VSCode)

sudo apt update
sudo apt install code-oss

If required you can install the PowerShell extension from the GUI. If you want something similar to the ISE interface from Windows PowerShell, press F1 and type Enable ISE Mode.

See this content in the original post