Posts

Showing posts from November, 2016
How to fix 70 seconds Linux root shell hack (Abusing LUKS to hack the system) You need to check if your partitions are encrypted using LUKS. To do this, run following command: dmsetup status | awk ‘BEGIN {FS=”:”} ; /crypt\s*$/ {print “Encrypted: ” $1}’ This command will show you the names of encrypted partitions. If you don't see any partition in the list, you're safe. If you're affected, you can lookup for a patch from your Linux Distribution vendor. If there's no patch, you need to add the following lines to your boot configuration: sed -i ‘s/GRUB_CMDLINE_LINUX_DEFAULT=”/GRUB_CMDLINE_LINUX_DEFAULT=”panic=5 /’ /etc/default/grub grub-install For more detailed information, you may visit: Hector Marco's Website Implementation of Cryptsetup utility

Hyper-V nested at ESXi 6.0

Image
I know it's a weird scenario but you may need to run Hyper-V on an ESXi server for testing purposes. Let's make an example:you have an ESXi 6.0 node with a Windows Server 2012 R2 running on it. You need to install Hyper-V, but you can't! Because your hardware configuration doesn't support virtualization on hypervisor. To able to run nested Hyper-V hosts, you need to follow the below steps: 1. Power Off the virtual machine. 2. Remove it from the inventory (it won't be deleted) 3. Locate the VM folder on datastore, download the server .vmx file to your desktop. 4. Using Notepad++ to open the .vmx file and add two below options at the end of file. Save the file. hypervisor.cpuid.v0="FALSE" vhv.enable="TRUE" 5. Upload the file back to datastore. 6. Add to inventory/Register the vm again 7. Right click on VM and select Edit Settings, on Virtual Hardware tab, collapse CPU and change CPU/MMU virtualization option to Hard

Using PowerShell to verify forward and reverse DNS records

Image
If you first time to using powershell console to run scripts, you may hit this error: Solution: Type "Set-ExecutionPolicy RemoteSigned" and hit enter Press Y and hit enter . Here is the script for verify forward and reverse DNS records using powershell: You may copy & paste, save as dnslookup.ps1 $hostlist = @($input)        # running through the list of hosts    $hostlist | %{         $obj = "" | Select ComputerName,Ping,IPNumber,ForwardLookup,ReverseLookup,Result         $obj.ComputerName = $_             # ping each host         if(Test-Connection $_ -quiet){              $obj.Ping = "OK"        $obj.Result = "OK"         }         else{              $obj.Ping = "Error"        $obj.Result = "Error"         }                  # lookup IP addresses of the given host         [array]$IPAddresses = [System.Net.Dns]::GetHostAddresses($obj.ComputerName) | ?{$_.AddressFami

Install ESXi 4.1 from usb stick

Not all servers nowadays have a DVD player installed. Sometimes it is handy to boot from usb and installing a single VMWare ESXi server. Here's example how to make the usb bootable and install VMWare ESXi 4.1. Creating bootable USB including the installation file There are many posts on the web detailing how to create a bootable USB stick with syslinux. One I have found particularly useful for this scenario is UNetbootin .  This forum will show you how to use UNetbootin. Daniel Buonocore's post over at blogs.vmpros.nl Adding the kick-start script Rename the isolinux.cfg file to syslinux.cfg Edit the syslinux.cfg and add ks=usb and on the end of the append line --- mod.tgz default menu.c32 menu title VMWare VMvisor Boot Menu timeout 80 label VMvisor Recovery CD menu label ^VMvisor Recovery CD kernel mboot.c32 append vmkboot.gz ks=usb --- vmkernel.gz --- sys.vgz --- cim.vgz ---ienviron.vgz --- recovery.vgz --- install.vgz --- mod.tgz