Tuesday, September 29, 2020

Compacting virtual disk image (VirtualBox)...

Scenario
Host OS: Manjaro Linux
Guest OS: Kali Linux

Action on guest OS:
- Log in to guest OS
- Clear package manager cache
- Uninstall unnecessary apps
- Delete unnecessary files
- Clear logs
- Boot into vm via Linux Live USB iso
- Open terminal
- Install zerofree if not exist
- Run the command below
$ zerofree -v /dev/sdX
- Replace sdX with the actual partition like sda1, sda2 etc
- Shut down the vm

 Action on host OS:
- Open terminal and run VBoxManage command
$ VBoxManage modifymedium disk /path/your-vdi-image --compact

Monday, September 21, 2020

How to test Live USB on VirtualBox Linux...

Plugged in your USB pendrive.

Check your USB drive details:
$ sudo fdisk -l

Add your user to disk group:
$ sudo usermod -a -G disk $USER

Open terminal and run the command below (replace X with your drive). There's no need for sudo:
$ vboxmanage internalcommands createrawvmdk -filename ~/usb.vmdk -rawdisk /dev/sdX

Next open VirtualBox and create new vm. When in the hard disk option, use an existing virtual hard disk file. Select usb.vmdk file that you've created earlier in the previous step.

Complete setup.

Now you can start the newly created vm to test your Live USB.

Sunday, September 20, 2020

From Lysia with love, now on Mikah...

Started to get bored with Ubuntu+Gnome Shell combo. It's time to distro hop!

A friend of mine recommended Manjaro, an Arch based distro. I've never tried an Arch based distro before.

Manjaro officially comes with 3 DEs of choice (XFCE, KDE Plasma and Gnome).

Been using Gnome for quite a while (since Gnome 2 era), might as well I try something new. Downloaded KDE Plasma version and I'm hooked!

Love the AUR, love the rolling release and love the ability to switch kernel.

A happy camper now since April this year.





How to browse the web anonymously on Manjaro with Kalitorify...

Download the project with git
$ git clone https://github.com/brainfucksec/kalitorify

Install dependencies
$ sudo pacman -S tor curl

Install make if not available in your system
$ sudo pacman -S make

* Important notes, proceed at your own risks:
kalitorify program was created for the Kali Linux operating system (Kali Linux rolling 2020.x), don't run on other Linux distributions if you're not sure what you're doing.

To make it works on Manjaro: Change UID that Tor runs as in the system (for Debian based distro, it's debian-tor. For Arch based distro, it's tor).
Open kalitorify.sh script with any text editor and search for debian-tor.

Before the changes:
# The UID that Tor runs as (varies from system to system)
#`id -u debian-tor` #Debian/Ubuntu
readonly tor_uid="$(id -u debian-tor)"

After the changes:
# The UID that Tor runs as (varies from system to system)
#`id -u debian-tor` #Debian/Ubuntu
readonly tor_uid="$(id -u tor)"
Save the changes.

Install kalitorify
$ cd kalitorify

$ sudo make install
Restart the machine.

Now check kalitorify version
$ kalitorify -v

To start kalitorify
$ sudo kalitorify -t

Sometimes transparent proxy failed to activate, kalitorify will suggest to restart with command below:
$ sudo kalitorify --restart


To stop kalitorify, use command below:
$ sudo kalitorify -c
Restart the machine.

Disclaimer:
Use these steps at your own risks. I will not be held responsible for any breaks, unable to restart, crash, damage or any legal terms that happen to your system.

Friday, September 18, 2020

Install and configure RDP server on Linux...

To install freerdp on Debian, Kali Linux, Linux Mint, Ubuntu and derivatives, run the command:
$ sudo apt install freerdp2-shadow-x11 winpr-utils

To install freerdp on Arch Linux and derivatives, run the command:
$ sudo pacman -S freerdp

To start the RDP server without authentication at all, use the -auth option. Warning: if authentication is disabled, anyone can connect. Only use this option for testing.
$ freerdp-shadow-cli -auth

To start RDP server with authentication:
  • First calculate the hash for password
$ winpr-hash -u myusername -p mypassword

Output:
a991ae45aa987a1a48c8bdc1209ff0e7
  • Next, create SAM (example: my-sam) file and add this text
dirn:::a991ae45aa987a1a48c8bdc1209ff0e7:::
  • Now start RDP server
$ freerdp-shadow-cli /sam-file:my-sam /sec:nla
  • Connect from Windows

Tuesday, August 13, 2019

Playing Red Alert 2 in full HD...

- Go to Red Alert 2 installation folder
- Open RA2.ini file
- Edit Video segment
[Video]
    ScreenWidth=1920
    ScreenHeight=1080
    StretchMovies=no

Enjoy!

RA2 gameplay

Playing Star Wars Rogue Squadron 3D in full HD...

Having to use modern OS such as Windows 10 means no classic games. I have an old game installer of Star Wars Rogue Squadron 3D.

Since I love the game so much, the solution:
Windows XP in VMWare.

Unfortunately, the game can be play on 1024x768 resolution max.

Luckily there's a patch for it.
Download it from here.

- Extract the zip file and run uniws.exe.
- Click Find it for me button, or you can search Rogue Squadron.EXE manually.
- Set New Resolution to 1920x1080 then click Patch button.
- Run Rogue Squadron, go to settings -> video and choose the custom resolution that has been patched.
- To revert back the patch, click Undo Patch button.
- Done! Enjoy the game.

UniWS patcher

Rogue Squadron 3D video settings

Game play screen

Note:
Since this is a virtual machine we're talking about, theoretically it should be fine in Ubuntu as host OS. However after installing VMWare Tools especially SVGA driver, Windows XP loads on blank screen with sound. For now, I just have the virtual machine under Windows 10.

Update - 21/09/2019:
I'm able to solve the VMWare Tools installation after run the command below on Ubuntu host OS.
sudo apt install libncursesw5