Kali Linux 2022.3 Virtual Box Installation Tips & Tricks

Where to Get Kali Linux 2022.3 for Your Virtual Box VM

First, there are at least two ways to do this and I’ve chosen option #1 which might be the harder of the two. Let’s not let that stop us shall we?

This article focuses on how to get Kali Linux 2022.3 ISO installation running on a Virtual Box VM including some solutions to common issues you might run in to.

  1. You can download the ISO images for your processor type. I chose the installer: kali-linux-2022.3-installer-amd64.iso
  2. You can also download the Kali Linux 2022.3 Virtual Box images but the installation is just a little bit different.

Setting up the Kali Linux ISO for Installation on Virtual Box VM

I’m trying to get Kali Linux 2022.3 up and running and I’ve not touched a Kali Linux install since 2019. Apparently some things have changed and there are new challenges as there are with every release and VM environment.

New Changes to Kali Linux Setup of Root User Since Version 2022.1

With versions of Kali prior to 2020.1, the root user had a default password.

Some older versions of Kali had a default user /password combos like root/ toor and a little later is was kali/kali.

With the release of Kali Linux 2020.1, they changed to a non-root user policy by default.

  • When installing amd64 and i386 images, it will prompt you for a standard user account to be created. That’s it, no more setting up a root user during install!
  • You’ll need tip #2 below to help you create the missing root user for your Kali Linux 2022.3 install once you get past the blank screen issue You can’t fight what you can’t see. 🙂

Black Screen After Logging in to New Install of Kali Linux 2022.3

My very first issue was the “Black Screen” after logging in with the standard account we created during setup.

Luckily, I’d found a helpful person who posted their solution for the Kali Linux Black Screen after Install issue. This was the very first issue I hit installing Kali Linux 2022.3.

The issue as you’ll see in this helpful video, is missing information we need from the Virtual Box Guest Additions CD.

Steps to Fix Kali Linux 2022.3 Black Screen

All of these steps should be in the video but I’ll describe them below so you can follow along with the video.

  1. In Virtual Box go to Devices for your VM and add the Virtual Box Guest Additions ISO as your CDROM device.
  2. From the command line enter:
  3. sudo mount /dev/cdrom /media/cdrom
  4. ls
  5. VBoxLinuxAdditions.run

Video: Fix for Kali Linux 2022.3 Black Screen

Fixing Root User After Installing Kali Linux 2022.3

The seconds issue I encountered after installing Kali Linux 2022.3 was that we were only aloud to setup a standard user during the installation so we don’t actually have access to root user now. How do we fix this?

Video: How to Fix Root User in Kali Linux 2022.3 After Installation

This trick also works in general if you’ve forgotten your root password to Kali Linux any time.

Summary

These solutions fixed my issues with the missing root user and Black Screen in Kali Linux 2022.3.

I hope you’ve found this content helpful in your own journey in to Cyber.

~CyberAbyss

Kali Linux Install or Updates Failing Due to Invalid Signature

Apt-Get Install Fails with Err1 & 404 Not Found Error

After firing up an old Kali Linux VM and trying to update a software package, I discovered that Kali Linux would not install any new packages nor would it install the latest Operating System update.

I kept getting an error, Err1, and a HTTP 404 Not Found saying it was failing to fetch the packages or updates.

Below are screenshots of the first error I saw when running apt-get install sshpass.

Apt-Get Update Error

I also got a different error when I tried to run apt-get update. This time the error references an invalid signature.

Fix for Kali Linux Invalid Signature Error

Important Notes:

  1. The invalid signature in the error was ED444FF07D8D0BF6, we’ll only need the last part, 7D8D0BF6 for our command.
  2. The key server reference is one I had found on an article on the internet but apparently there are other key servers you can reference as well.

To fix the Invalid Signature error, we’ll have to enter the following command. As of this writing, this command worked for me if entered verbatim.

EXAMPLE:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys $key

WHAT I ACTUALLY RAN:
root@kali:/etc/apt# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6

Executing: /tmp/apt-key-gpghome.a5zcatYyQB/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7D8D0BF6
gpg: key ED444FF07D8D0BF6: 22 duplicate signatures removed
gpg: key ED444FF07D8D0BF6: 223 signatures not checked due to missing keys
gpg: key ED444FF07D8D0BF6: "Kali Linux Repository <devel@kali.org>" 238 new signatures
gpg: Total number processed: 1
gpg:         new signatures: 238

Video: Kali Linux Signature Error Fix

Other Helpful Kali Linux References

In the steps above I kind of gloss over some technical parts.

One of those topics was Kali Linux repositories. I’m not an expert on it but know it was important part of troubleshooting and solving my problem. Basically knowing enough to know that was not my issue so I could rule it out.

If you have questions about or just want to dive in to the topic of repositories follow the link below. The page addresses items people frequently get wrong as it can be a bit confusing.

https://stackoverflow.com/questions/66217436/error-gpg-keyserver-receive-failed-no-name

https://www.kali.org/docs/general-use/kali-linux-sources-list-repositories/

How to Backup a Database Table on the Fly Using this Simple SQL Command

Database Table Backups on the Fly

This is a super simple SQL super power trick I learned from a mentor.

If you’re working in SQL Server Management Studio (SSMS) you can open up a New Query window and type in a simple “SELECT INTO” command to backup a database table on the fly.

Sample SQL SELECT INTO Statement

SELECT * INTO new_table FROM old_table_20221122

This is pretty simple. You’re making copying of a table like a “Save As” button would let you do.

This is also great for undoing something bad you’ve done by simply reversing the process.

Picking the Master Lock 141D

The Master Lock 141D

Product Specs:

  • Indoor and outdoor lock is best used as a gym locker lock providing general security and protection from theft.
  • Key lock is constructed with a black vinyl-covered aluminum body for scratch and corrosion resistance, hardened steel shackle for cut resistance
  • Four-pin cylinder and dual locking lever mechanism for pick and pry resistance
  • 1-9/16 inch (40 millimeter) wide lock body; 1/4 inch (6 millimeter) diameter shackle with 7/8 inch (22 millimeter) length, 13/16 inch (21 millimeter) width
  • One padlock, two keys (matching color key head for added convenience)

Video: Picking the Master Lock 141D

My Secrets to Picking the Master Lock Fortress in 30 Seconds

To keep my lock picking skills up, I make time to practice at least once a week even if it is just picking locks I’ve already picked successfully.

Just like any other skill, practice makes perfect and if you don’t use it, you’ll lose it both of those rules also apply to the art of lock picking.

In this blog article I’m going to focus on a technique for a specific lock. If you need a primer to get you going that covers the basics first, check out this introduction and how to guide on lock picking at art-of-lockpicking.com.

The lock I’m picking is the Master Lock Fortress 357D disc type padlock. Below is a photo of the packaging.

The Master Lock Fortress 357D

Today, I’m sharing some of my lock picking secrets in this practice session video from my YouTube channel.

Last Saturday night I filmed myself picking a Master Lock Fortress, disc type, padlock. I titled the video, “My Secrets to Picking the Master Lock Fortress in 30 Seconds”. See video below. Order your own and follow along.

The Master Lock Fortress is a disc type padlock commonly found in many facilities. Often, people may think the name “Fortress” implies that this lock is extra secure but in the end it is just a marketing ploy.

The Secret to Picking the Master Lock Fortress

In my video below, I’ll show you my secret to picking the Master Lock Fortress by focusing on a combination of a pin in very back of the keyway and the correct tension on your tensioning device of choice.

I’m cutting myself some slack for doing this on camera which is a bit more challenging. My claim of picking this lock in 30 seconds starts from from after resetting my first attempt.

Video: My Secrets to Picking the Master Lock Fortress in 30 Seconds

Video of the Secrets to Picking the Master Lock Fortress in 30 Seconds

SQL: How to Find Text in Stored Procedures

Searching for Text in a SQL Stored Procedure

I always write a blog article on things that took me a little to time to find when I working on various projects.

I’m working a project with another developer and they had sent me a screenshot of a SQL stored procedure that I needed to look at but they didn’t tell me the name of the file.

I needed to take some text from the screenshot and figure out which stored procedure it was in out of 100 or more.

Below is an example of the SQL script I used to find the text I was looking for. You’ll be searching the definition for you specific text.

SQL Script Example:
Find Text in Stored Procedures

SELECT DISTINCT
       o.name AS Object_Name,
       o.type_desc,
	   m.definition
FROM sys.sql_modules m
       INNER JOIN
       sys.objects o
         ON m.object_id = o.object_id
WHERE m.definition Like '%@RowString%';

I hope this help you solve your issue!

~Cyber Abyss

Fixing Arduino TFT LCD White Screen Problems

My Arduino TFT Touch Screen Project

I’m working on a hobby project where I’m building Arduino gadgets.

The biggest problem working on Arduinos is that they are more or less experimental and finding drivers and software packages can be quite challenging. Often, it becomes the most time consuming part of any Arduino project.

Arduino TFT LCDs

Recently, I’ve started experimenting with Arduino TFT LCDs and what a joy it is to find all the missing libraries and “How-To” resources to pull this off.

I’m posting this information because it helped me with the issue I was having.

Sometimes it is not just the drivers, but the software to makes Arduino hardware run that often sends you down the rabbit hole. Often, you’ll spend hours troubleshooting your project over a code bug but never being 100% sure you hardware isn’t failing.

Once I finally found the right drivers and a couple of code tweaks, I finally got the 2.4 inch TFT LCD to work a bit and even a drawing app that let you draw with your finger or stylus.

You can find more detailed information and some sample code on Arduino’s Liquid Crystal page.

Arduino Code Example: TFT LCD
(lcd.ino)

As you can see in the code example below, #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { lcd.begin(16, 2); lcd.print("hello, world!"); } void loop() { }

Arduino Code Example: TFT LCD
(lcd_clear.ino)

This example is similar but we added a line to “setCursor”.

I saved this file as lcd_clear.ino then pushed it to the Arduino and it ran.

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() {
  lcd.begin(16, 2);
  lcd.setCursor(2, 1);
  lcd.print("TGIF!!!");
}

void loop() {
 
}

Troubleshooting Arduino TFT LCDs

Below are some videos that were helpful to me in troubleshooting my Arduino TFT LCD problems. Use these video along with the resources I reference earlier and I’m sure you’ll find a way to make it all work.

Video: Arduino TFT White Screen Fix

Video: Arduino TFT Touch Screen Tutorial

Backward Engineering a File Parsing a MicroORM Solution

Backward Engineering a File Parsing MicroORM Solution

I love my work!

I’m given application code I’ve never seen and in a language I don’t code in often enough and asked to figure it out.

Luckily, I have access to business analysts and a DBAs to get details about the business processes and databases the code is related to.

From code and info resources, create working test environment and get familiar enough with application code and databases to have new updates in to production in 2-3 weeks.

No pressure, right?

I was fairly successful today and here are some of the resources that used to solve problems I encountered.

Massive MicroORM 

It’s a small MicroORM based on the Expando or dynamic type and allows you to work with your database with almost no effort. The design is based on the idea that the code provided to you in this repository is a start: you get up and running in no-time and from there edit and alter it as you see fit.

https://github.com/FransBouma/Massive

Video: Introduction to Object-Relational Mapping (ORM)

C# Code: Checking Array Length (See if array has X elements)

Test the length

int index = 25;
if(index < array.length)
{
    //it exists
}

Source: https://stackoverflow.com/questions/794760/does-index-of-array-exist

C# ExpandoObject

C# Frequently Asked Questions:  Dynamic in C# 4.0 – Introducing the ExpandoObject
https://blogs.msdn.microsoft.com/csharpfaq/2009/09/30/dynamic-in-c-4-0-introducing-the-expandoobject/

Video: Make Apps Dynamic using the ExpandoObject

Video: How to use Massive in Master – Detail (Micro ORM – .Net – C#

Video: ASP.NET Tutorial on ADO.NET

Task Scheduler error “The user account is unknown, the password is incorrect

Windows Scheduled Task Errors

I have an website up-time script that I need to deploy in a test environment.
The script has to be run as a scheduled task in Windows Task Scheduler and is designed to be run on a 15 minute interval.

I couldn’t seem to be able to set a scheduled task if my life depended on it because something was killing it every time I would try to create it. 

The error I got was something like…

Task Scheduler – The user account is unknown, the password is incorrect, or the user account does not have permission to modify the task”

After 30 minutes of scouring the various blogs and tech boards, I had found one little hint that pointed my in the right direction.

Check Your Antivirus Software

One  post, that had not even gotten a vote up stated that I should check my Antivirus to see if it was restricting writing of files to the System32 directory in Windows.

Sure enough, I temporarily disabled Avast Antivirus which had been blocking the creation of the scheduled task and now my Uptime script is working as designed.

The morale of the story is always remember to check your Antivirus settings when you run out of checking permission settings as a troubleshooting step.  

Hope this helps somebody!
~Cyber Abyss