Wednesday, September 17, 2025

Several modules must be compiled when running VMware Workstation on Ubuntu

Several modules must be compiled when running VMware Workstation on Ubuntu

I have a machine with Ubuntu 24.04.2 with VMware Workstation working as expected. When I connected to the machine Ubuntu told me there were packages available that can be updated inlcuding the kernel. So, I did the update and rebooted the machine. Running VMware Workstation failed with "several modules must be compiled". The fix is quite easy, run the following to fix it.
$ sudo vmware-modconfig --console --install-all
Notes:
- VMWare Workstation: 17.6.3
- Host: Ubuntu 24.04.2 LTS

Friday, September 12, 2025

Hello world assembly on x86 Linux

Hello world assembly on x86 Linux

Save code below as hello.asm
global _start

section .data
message: db 'hello, world!', 10

section .text
_start:
    mov     rax, 1          ; system call number should be stored in rax
    mov     rdi, 1          ; argument #1 in rdi, where to write (description)?
    mov     rsi, message    ; argument #2 in rsi, where does the string start?
    mov     rdx, 14         ; argument #3 in rdx, how many bytes to write?
    syscall                 ; this instruction invokes a system call

    mov     rax, 60         ; 'exit' syscall number
    xor     rdi, rdi
    syscall
Now assemble/build the file
nasm -felf64 hello.asm -o hello.o
Link to create executable
ld -o hello hello.o
Run it
u1@v1vm10:~$ ./hello 
hello, world!

Wednesday, September 10, 2025

Formatting code in Blogger

I have been using Github gists to share code and I have no plan of abandoning it. For smaller/one liners, I sometimes use div element with inline CSS.

I have been exploring formatting my code directly in Blogger but it is mostly hit and miss. I came accross highlight.js and I am impressed with the result.

Below is a quick guide how to format code using highlight.js:
  1. Open blogger template
  2. Before the <head> element, add the following
  3. In the post itself, soround the code like:

Sunday, September 07, 2025

Test page for code formatting

netsh advfirewall firewall add rule name="RPC Endpoint Mapper" dir=in action=allow protocol=TCP localport=135
netsh advfirewall firewall add rule name="RPC Endpoint Mapper" dir=in action=allow protocol=TCP localport=135
Tags:
- Highlight.js
- hilite.me

OPC Classic client least privilege configuration

 The OPC Classic server is running on a different machine and is running a specific account, say opcuser.  The OPC Classic client is running as another user, say u1. My goal is to configure my client machine as secure as possible using subscription/callback, thus say:


Do the following on the client machine

Step 1. Allow DCOM inbound in Windows Firewall. Run on elevated command prompt

netsh advfirewall firewall add rule name="RPC Endpoint Mapper" dir=in action=allow protocol=TCP localport=135


Step 2. Add opcuser to Distributed COM Users

net localgroup "Distributed COM Users" /add opcuser


Step 3. Run Component Services (dcomcnfg.exe) and Distributed COM Users to Default Access Permissions

  1. Navigate to console Root | Component Services | Computers | My Computer

  2. Bring "My Computer" Properties

  3. Navigate to COM Security tab

  4. Click on Access Permissions | Edit Default...

  5. In Access Permission, add Distributed COM Users and check allow for both Local Access and Remote Access


Step 4. Add Windows Firewall rule for the application. Below assumes the application is located in C:\opc directory. 

netsh advfirewall firewall add rule name="OPC Client Inbound" dir=in action=allow program="C:\opc\oclientnet.exe" enable=yes


REF: 20250907-least


DCOM callback not working with UAC enabled

 OPC Classic DCOM client not receiving callback when UAC is enabled


The OPC Classic server is running on another node and is running using a specific user, say opcuser. The OPC Classic client is also running as a different user, say user1. The opcuser on the client is a member of the Administrators group but UAC is enabled. The issue is that the client is not receiving a callback due to UAC restrictions. When an account is accessed remotely, UAC gives it a "filtered" token without full administrative rights. This is a common cause of DCOM callback failures in workgroup environments.

To fix this, on the OPC client machine (the one receiving the callback), you need to modify the registry:

  1. Open the Registry Editor (regedit).

  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System.

  3. Create a new DWORD (32-bit) Value named LocalAccountTokenFilterPolicy.

  4. Set its value to 1.

  5. Reboot the machine.

This change tells Windows to not filter the administrative token for local accounts over the network, allowing DCOM callbacks to function correctly without disabling the core security benefits of UAC.

REF: 20250907


Several modules must be compiled when running VMware Workstation on Ubuntu

Several modules must be compiled when running VMware Workstation on Ubuntu I have a machine with Ubuntu 24.04.2 with VMware Workstation wor...