Open Windows Applications on Network Computers Remotely with VBScript

The Win32_Service Class and VBScript

For background, the Win32_Service class is part of the Windows Management Instrumentation (WMI) system, and it allows you to interact with Windows services programmatically. Here’s an explanation of how to use it in VBScript:

' Create a WMI service object
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")

' Query for a specific service (e.g., "Spooler")
Set colServices = objWMIService.ExecQuery("SELECT * FROM Win32_Service WHERE Name='Spooler'")

' Iterate through the collection of services (should be just one in this case)
For Each objService In colServices
    WScript.Echo "Service Name: " & objService.Name
    WScript.Echo "Display Name: " & objService.DisplayName
    WScript.Echo "Status: " & objService.Status
Next

In this example, we first create a WMI service object using GetObject with the appropriate namespace (root\cimv2). Then, we use ExecQuery to run a WQL (WMI Query Language) query to select a specific service by its name. In this case, we are querying the “Spooler” service. You can replace “Spooler” with the name of the service you want to query.

Finally, we iterate through the collection of services (which should have only one service in this example) and display some properties of the service, such as its name, display name, and status.

This is just a basic example, and you can perform various actions with Windows services using Win32_Service through WMI, such as starting, stopping, or modifying services, depending on your needs.

Opening Apps Remotely with VBScript

If you’re ever find yourself in need of opening a Windows application remotely on a network computer you can try this handy VBScript.

In the example below, run this script “as is” to see that it will open Notepad.exe on your local computer.

Next, to get this to open notepad.exe on a remote computer on the same network, change the strComputer variable from “.” to the name of your network c0mputer.

In the example below, I’ve copied a text file to to the remote computer, C:\scripts\test.txt, and we’ll open it with notepad on the network computer so the remote user can read our message.

Sample Code: Open NotePad Remotely

'Pass a . to run this on your own PC or a string value for a network computer
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2:Win32_Process")

Error = objWMIService.Create("notepad.exe 'C:\scripts\test.txt'", null, null, intProcessID)
If Error = 0 Then
    Wscript.Echo "Notepad was started with a process ID of " _
         & intProcessID & "."
Else
    Wscript.Echo "Notepad could not be started due to error " & _
        Error & "."
End If

Troubleshooting

If you’re having problems getting this script to run on a corporate network, you may need to run this script as an admin. If you don’t know how to do that, check out my article on how to run VBScript as an adminstrator.

I’ve recently run into a situation where I needed this script to send a message to users on remote Kiosk PCs that don’t require authentication in another city on a large corporate network. This script would do the trick.

I hope this article helped you!

~Cyber Abyss

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