Browsing articles in "Linux"
Nov
24
2011

Code a network packet sniffer in PHP

Example of a packet sniffer is Wireshark. Packet sniffers pick up the packets going in and out of a system and analyse them and present them to user for further analysis. In this post we are going to code a simple packet sniffer in php. The basic theory this packet sniffer is that , raw packets can sniff without much effort if they are put into receiving mode. This will work only on a Linux [...]

Nov
8
2011

Check Ubuntu version from command line

Here is a simple command to get your Ubuntu version from terminal / commandline. or or or Try any of them. Cheers!

Nov
7
2011

Install suphp on Ubuntu Linux

suphp is an apache module (mod_suphp) that replaces mod_php and runs php scripts with a specific user. To install on Ubuntu : 1. Install libapache2-mod-suphp 2. Now disable the mod_php 3. Now restart Apache : This should install and enable suphp. mod_suphp is loaded here : and suphp is configured here : The above configuration make suphp the handler for php files. Suphp consists of two components: 1. mod_suphp – an Apache module that replaces [...]

Nov
5
2011

Monitor bandwidth used by each process on Ubuntu Linux with nethogs

nethogs is a command line utility for linux which can be used to monitor the network bandwidth used by each application. Url : http://nethogs.sourceforge.net/ Install on Ubuntu : sudo apt-get install nethogs Usage : and the output would be something like : It shows the PID , username , process , network interface being used , data sending speed and data receiving speed. Other options with help Change the delay between updates to 5 seconds [...]

Nov
4
2011

Search network traffic with ngrep

ngrep or network grep is a command line utility that can be used to search network packets for a given regex pattern. ngrep uses the pcap library to capture network packets and gnu regex library to perform regex searches. ngrep is like tcpdump + grep. Url : http://ngrep.sourceforge.net/ Install on Ubuntu : The windows version can be downloaded from : http://ngrep.sourceforge.net/download.html Windows version uses Winpcap packet capture library. Usage : Ubuntu Linux 1. Search network [...]

Nov
2
2011

TCP SYN flood DOS attack with hping

Wikipedia defines hping as : hping is a free packet generator and analyzer for the TCP/IP protocol distributed by Salvatore Sanfilippo (also known as Antirez). Hping is one of the de facto tools for security auditing and testing of firewalls and networks, and was used to exploit the idle scan scanning technique (also invented by the hping author), and now implemented in the Nmap Security Scanner. The new version of hping, hping3, is scriptable using [...]

Nov
1
2011

Take webpage screenshot from command line in Ubuntu Linux

There are many instances when you want to take the screenshot of a webpage from within a php script or the command line. On ubuntu there are several ways to do it and most of them produce a webkit , gecko or khtml rendered screenshot image. Some of the methods require X session to open a window and take screenshots. So VNC can be used to run in on servers for example. To Setup a [...]

Nov
1
2011

Setup VNC on Ubuntu Linux

Install the following packages : 1. vnc4server – This is the vnc server application. It is run on the system which is to be viewed remotely. 2. xvnc4viewer – This is the client application. It will connect to a remote vnc system. sudo apt-get install vnc4server xvnc4viewer Now run vncserver from terminal The :12 is the display number. It can be any number and will open vncserver on that number. You can have multiple vncservers [...]

Oct
23
2011

Setup Internet Connection Sharing on Ubuntu Linux with Firestarter

Firestarter is an easy to install firewall application for Ubuntu which also has to the option to enable Internet Connection Sharing at the click of a mouse. Install : sudo apt-get install firestarter Launch the application firestarter. The wizard will come up on the first run. Enable Internet Connection Sharing in the wizard, and start the firewall. Now other computers connected to this machine should be able to access internet , provided they all have [...]

Oct
23
2011

Top Port Scanners on Ubuntu Linux

Here is a list of port scanners that work on Ubuntu/Linux. 1. Angry IP Scanner Download and Install from http://www.angryip.org/ Fast and easy to use network scanner and port scanner. To scan ports got to Tools > Preferences > Ports > Port Selection Enter the ports you want to scan Start the scan. 2. nmap – network mapper Install : sudo apt-get install nmap Nmap is a utility for network exploration or security auditing. It [...]

Pages:«1234567»