Friday, July 17, 2009

Howto Disconnect a Network Sevice without Stopping Entire Network in Ubuntu / Debian : Cutter

Cutter is tool used for disconnecting an TCP/IP connection. Some time Network administrators want to stop some specific services like ssh, chat. Cutter is a very useful utility for network administrators for blocking high bandwidth consuming services, peer-to-peer Service etc. It is a firewall administrators tool, so use in firewall / router machines.

$ sudo apt-get install cutter (or use synaptic package Manager)

cutter ipaddress1 [ port1 [ ipaddress2 [ port2 ] ] ]

You can use netstat for finding the connection.

Stop all ssh connection between 192.168.0.1 and server
$ sudo cutter 192.168.0.1 22

Stop all ssh connection between 192.168.0.1 and 192.168.0.2
$ sudo cutter 192.168.0.1 192.168.0.2 22

Stop all connections between 192.168.0.1 and server
$ sudo cutter 192.168.0.1

official Site

Thursday, July 16, 2009

Howto Check your webserver for vulnerabilities : Nikto a website scanner



Nikto is an Open Source (GPL) web server scanner which scans your webserver against more than 3500 dangerous files/CGIs, outdated version checking, It has a very good plugin support
Official site
To install in ubuntu / debian
$ sudo apt-get install nikto

Full installation of nikto will offer lot of options
$ nikto will give the list of options

For simple test

$ sudo nikto -h www.yoursite.com

output will we like this
abc@abc-desktop:~$ sudo nikto -h www.xxxx.com
- Nikto v2.03/2.04
---------------------------------------------------------------------------
+ Target IP: 210.222.232.234 (fake value)
+ Target Hostname: www.xxxx.com
+ Target Port: 80
+ Start Time: 2009-07-17 22:06:29
---------------------------------------------------------------------------
+ Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny3 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
- Allowed HTTP Methods: GET, HEAD, POST, OPTIONS, TRACE
+ OSVDB-877: HTTP method ('Allow' Header): 'TRACE' is typically only used for debugging and should be disabled. This message does not mean it is vulnerable to XST.
+ OSVDB-0: ETag header found on server, inode: 3965147, size: 2857, mtime: 0x433a88acc26c0
+ PHP/5.2.6-1+lenny3 appears to be outdated (current is at least 5.2.6RC4)
+ mod_perl/2.0.4 appears to be outdated (current is at least 5.8)

Explore / Browse files with Admin Privileges in Ubuntu

Explore / Browse Files with admin Privileges in ubuntu do the following steps

Sometime we want to manage files with admin privilege . Here a easy way to do this.
Make a application launcher for this purpose.
Right click on empty part of Menu bar and select "Add to Panel "

Now You will get a pop up menu
Select Custom Application Launcher and click on Add

Now a Pop up Window will appear
Select Type as Application and Command must gksu nautilus
After filling the fields Press OK
You will get an icon at Menubar, When you click on that icon it will ask for root password.
and run nautilus in admin mode.

Saturday, July 11, 2009

mz (Mausezahn) : Network Traffic Generation Tool ( as wll as Network Jamming Tool) for Ubuntu / Debian Linux

mz (Mausezahn) is a versatile packet creation and network traffic generation tool. Using this tool You can Jam a Network.

This utility is used for Stress Testing of Networks and Firewall Testing. also for Finding weaknesses in network software or appliances.

Canonical does not provide updates for mz. Some updates may be provided by the Ubuntu community.
Don't Try to make headache to your Network Administartor

$ sudo apt-get install mz

this will send a specified packet to a destination port
$ sudo mz eth0 -t udp "sp=1, dp=80, p=aa:ff:00:11:22:33"
sp: source port dp: destination port p: packet

Flooding a network ,

Inject infinite frames as fast as possible:


$ mz eth0 -c 0 "aa bb cc dd ...."

Inject 100,000 frames with a 50 msec interval:

$ mz eth0 -c 100000 -d 50msec "aa bb cc dd ...."

I have purposefully made some simple mistakes in commands

slay : Kill all the Processes of a Selected User

slay is a command line utility used for killing all the processes used by a particular User. Some users will leave with out logingout, some kid users will use heavy games and stay it in background. slay will kill all the processes for such conditions. The main problem is , slay will not give any warning if you have unsaved documents!!! So take care and use it effectively, good tool for system administrators.

use synaptic or apt for installing slay in ubuntu / debian

$ sudo apt-get install slay

Usage

$ sudo slay varkala will kill all the processes of user varkala.

How to Lock / Unlock User in ubuntu / Debian Linux

For Locking User from command Line

$ sudo usermod -L varkala This will Lock user account named varkala

For Locking User from command Line

$ sudo usermod -U varkala This will UnLock user account named varkala

How to Monitor Memory and Swap Usage in Ubuntu Linux

List Memory Usage in Kilobyte
$ free
total used free shared buffers cached
Mem: 2042788 839976 1202812 0 35992 399284
-/+ buffers/cache: 404700 1638088
Swap: 4462644 0 4462644

$ free -m for display usage in Megabyte
$ free -b for display in usage in Blocks

$ free -s 5 Ddisplay memory usage every 5 seconds continuously

How to Install Web Based System Administration Tool : Webmin in Ubuntu9.04 / Debian

Webmin is a web based magical Graphical front end for System administration in Unix and Linux. You can manage User accounts, Printers, servers like squid, apache, dhcp, DNS and a Lot More .
For Installing Webmin in Ubuntu / Debian do the following Steps.

First You have to install the following dependencies

$ sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl

Now you can download deb Package and install it
deb package is available here

After down loading deb file you can install it using

$ sudo dpkg --install webmin_1.480_all.deb

After Installation webmin can be run using a Firefox

Open firefox and type the following in address bar
https://127.0.0.1:10000 (Not http:// it is https://)

Now it will ask for some Security certificate issues, You can blindly give anything if you are not in a critical system.

Now webmin ask for username and password you can use your Linux username and password.

Official Website of webmin

Friday, July 3, 2009

How to access GUI program on a remote machine using ssh

Using ssh You can access GUI program on a remote machine .
We know how to use ssh and telnet, but the main problem is , you will get only test screen in remote machine. Here a great tutorial for accessing Graphics on Remote terminal using ssh tunneling

Read More

Seminar Topics for Engineering Students

Following Links Help Engineering Students to find Seminar Topics

http://edufive.com/seminartopics.html

http://seminars4you.wordpress.com

http://techalone.com/

http://www.crazyengineers.com