Finding list of installed files from a package in Linux

Recently we installed one package, but couldn’t understood which all files it installed on Ubuntu. You can use the command as, dpkg-query -L PACKAGE_NAME So, lets say, you want to identify which are files “openssh-server” package installed, then run the command as below, dpkg-query -L openssh-server /. /etc /etc/ufw /etc/ufw/applications.d /etc/ufw/applications.d/openssh-server /etc/pam.d /etc/pam.d/sshd /etc/init /etc/init/ssh.conf … Read more

How to disable and / or enable ICMP ping from Linux host ?

To disable the ICMP ping from certain linux host, lets say which has IP of 192.168.0.100 use below command, Type below command on the console of linux PC on which you are trying to enable / disable the ping. $ sudo iptables -A INPUT -p icmp –icmp-type any -j REJECT $ sudo iptables -A OUTPUT … Read more

How to Add new user and Delete existing user on Ubuntu

root@ubuntu:/# adduser “MYNEWUSER” Adding user `”MYNEWUSER”‘ … Adding new group `”MYNEWUSER”‘ (1001) … Adding new user `”MYNEWUSER”‘ (1001) with group `”MYNEWUSER”‘ … Creating home directory `/home/”MYNEWUSER”‘ … Copying files from `/etc/skel’ … Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for “MYNEWUSER” Enter the new value, or … Read more

Understanding wireless beacon packet ( captured using pcap API’s )

As per Wikipedia, Beacon frame is one of the management frames in IEEE 802.11 based WLANs. It contains all the information about the network. Beacon frames are transmitted periodically, they serve to announce the presence of a wireless LAN and to synchronise the members of the service set. Beacon frames are transmitted by the access point (AP) in an infrastructure basic … Read more

Understanding pcap file format – part I – Global Header

The file must begin with a Section Header Block.  Below is typical configuration, with a single Section Header that covers the whole file. +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SHB v1.0 | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Typical configuration with a single Section Header Block The Section Header Block is mandatory. It identifies the beginning of a section of the capture dump … Read more

How to get mac-id using ipaddress in linux

Make sure you ping that IP atleast once so this can get address into ARP table. $ ping -c 1 192.168.1.105 PING 192.168.1.105 (192.168.1.105) 56(84) bytes of data.64 bytes from 192.168.1.105: icmp_seq=1 ttl=128 time=4.68 ms— 192.168.1.105 ping statistics —1 packets transmitted, 1 received, 0% packet loss, time 0msrtt min/avg/max/mdev = 4.681/4.681/4.681/0.000 ms Now user arp … Read more

Wi-Fi Initial Communication between device and access point

Following diagram shows the initial handshaking between the device ( like mobile ) and wireless access-point ( AP ) in open access mode and secured ( e.g. WPA ) mode, Authentication frame ( in open access ): 802.11 authentication is a process whereby the access point either accepts or rejects the identity of a radio … Read more

What is the Difference between Process and Thread ?

Creating a new thread is very similar to forking a new process, but there are differences. When a new process is forked, it shares relatively little data with the parent process which created it, when a new thread is created, it shares much more information (such as all the global variables and static local variables, … Read more