Posts

Showing posts from 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

Zabbix agent on CentOS 7

Zabbix Agent   is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on client system and provide such information to Zabbix server on their requests. Installing Zabbix Agent Follow below instruction to install zabbix agent on CentOS, RHEL 7. Step 1 - Add required Repository Before install zabbix agent, configure zabbix yum repository using follow command. [root@testmachine ~]# rpm -Uvh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-agent-3.0.4-1.el7.x86_64.rpm Step 2 - Edit zabbix agent configuration As zabbix agent has been successful installed on your system, now we just need to configure zabbix agent. [root@testmachine ~]# cd /etc/zabbix [root@testmachine zabbix]# vim zabbix-agentd.conf ##### Passive checks related ## Line 95 ## Server=" zabbix server ip " ## Line 103 ## ListenPort=10050 (remove # in front of ListenPort) ###

Zabbix 3.0 on CentOS 7

Image
Install Zabbix 3.0 on CentOS 7 What is Zabbix Zabbix is an enterprise-class open source distributed monitoring solution. Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning. Zabbix supports both polling and trapping. All Zabbix reports and statistics, as well as configuration parameters, are accessed through a web-based frontend. A web-based frontend ensures that the status of your network and the health of your servers can be assessed from any location. Properly configured, Zabbix can play an important role in monitoring IT infrastructure. This is equally true for small organisations with a few servers and for large c

Install LAMP on CentOS 7

LAMP  is an archetypal model of web service  solution stacks , named as an  acronym  of the names of its original four  open-source  components: the  Linux   operating system , the  Apache HTTP Server , the  MySQL relational database management system  (RDBMS), and the  PHP   programming language . The LAMP components are largely interchangeable and not limited to the original selection. As a solution stack, LAMP is suitable for building  dynamic web sites  and  web applications . In this tutorial, let us see how to setup LAMP server on RHEL/CentOS 7. Install Apache Apache  is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains. The following commands should be run with root user privileges. [user@testmachine ~]$ sudo -i To install Apache, enter the following command in your terminal: [root@testmachine ~]# yum install -y httpd Start the Apache service and make it to start automatically