Skip to main content

Posts

Showing posts with the label hack

Cisco Protected Port

I can see in my network any customer can communicate to any one on the same VLAN. Basically when ever any unknown packets ingress into the switch. Switch found no record in CAM table, so that frame flood every port of the respected VLAN, except the frame received port. Such a communication can very dangerous for the service provider and its customer. Because any one can sniff or send information to other customer in same VLAN.  Broadcast packet also flooded into the network that can bottleneck our network. The way to protect such a bottleneck of the network we can configure switch port as protected port thus no port can directly communicated in a same broadcast domain. Command: interface fa0/2 switchchport mode access switchport access vlan 30 switchport protected This way we can protect the user in same VLAN. Protected port only be configured in edge port not the trunk port or L3 connected port. Now the protected port prevent any unicast, broadcast or multicast packet e

Ubuntu Password Reset

Often I've forgotten Ubuntu password, this is the most occurring issue with me. Every-time I have to search Google how to reset the password on Ubuntu. So I decide to make notes for myself. Here is the step how I reset the password. First of all reboot Ubuntu and choose recovery mode from console. After that you may see "Recovery menu", just choose "root Drop to root shell prompt". Now you are in a shell prompt, then use following command to change the password.  #ls /home (this will show your home directory's username) #mount -rw -o remount / #passwd (username) Enter new UNIX password: Retype new UNIX password: passwd Password updated successfully #reboot After wards you can use new password to login to ubuntu. Tested in Ubuntu server 14.04.

Remove Old Kernel packages Debian linux

Few days back I compile new kernel for kali linux to install driver. But that doesn't work and I have to remove new kernel packages. Here is command to remove old kernel packages form kali or any debian base linux root@kali:~# dpkg --purge linux-image-xxxx Remove xxxx with your image version, revision number

Kali linux Device not manage

Recently I upgrade Kali linux 1.0.4 to 1.0.5, all goes well but when I try to up eth0 it didn't up and show message "Device Not Manage". I did everything to get it up but no command avail to up it. like: root@kali:~#service networking restart root@kali:~#service networking start root@kali:~#ifconfig eth0 down root@kali:~#ifconfig eth0 up  Then after googling I found one solution root@kali:~# vi /etc/NetworkManager/NetworkManager.conf Network manager will opened and you can see following line on that file. [main] plugins=ifupdown,keyfile [ifupdown] managed=false Now edit and change  false to true [main] plugins=ifupdown,keyfile [ifupdown] managed=true Now use this command to restart Network manager root@kali:~# service network-manager restart Then you can see your LAN is working. 

Restart Network in Ubuntu Linux

In Ubuntu there was inbuilt command whose job is to network card reconfiguration. Lets see the syntax jay@server:~$ sudo /etc/init.d/networking restart ****OutPut**** [sudo] password for jay:  * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces                                                                * Reconfiguring network interfaces...                                                                                                                   ssh stop/waiting ssh start/running, process 1818                                                                          [ OK ] This Ubuntu script will start and stop all network interface (NIC) at once. Alternative jay@server:~$ sudo ifconfig eth0 down   (replace eth0 with your ethernet number) wait for ethernet down. jay@server:~$ sudo ifconfig eth0 up [sudo] password for jay:

Find and replace text in Linux Command

Most of you encounter a situation where you need to replace the text in Linux file. Recently  I need to do this in Ubuntu server for changing repo "US"  to "local" repo. Therefore here is the process how to change it. You can use vi and vim text editor comes with every Linux OS, if your Linux don't have full function text editor then use this link to install it. In my case I use it for replace international repo to local repo, you can use for any text replacement. So I use word "US" to replace with "NP", Which is local for me. Now use the following command to edit repo source #sudo vi /etc/apt/sources.list You can see  repo source list file is opened, then just use the following syntax to replace the text: In my case I use "us" and "np" word, please replace these with your desire word. :%s/us/np/g or if you need to conformation then you us this command, mean if you don't need to replace whole tex

Adobe flash player install ubuntu and kali linux

Recently I fresh install Ubuntu 13.04. Then I install chromium browser, after that I'm facing youtube video streaming. Chromium doesn't have inbuilt flash player like in Chrome. I tried to install adobe flash player searching from internet but no avail. But I found this command which worked. Make sure you install chromium browser. After that use following command to install flash (I already download tar.gz file from adobe site and extracted, you can use below command to get flash) sudo apt-get install flashplugin-nonfree Then you need to copy libflashplayer.so file into /usr/lib/chromium-browser/plugins directory (I already extracted and copy from extracted folder to following folder, you can use below command) sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/chromium-brower/plugins For kali linux cp/usr/lib/flashplugin-installer/libflashplayer.so /usr/lib/mozilla/lougins To run the browser just run the following command from terminal ch

Install LibreOffice in BackTrack 5 r3 and Kali

Install LibreOffice Backtrack 5 r3 and Kali Sometime I need office to prepare document of the project and some other office work, So I decide to install office in BT or Kali rather switch back window.  I'm going to download 64 bit version of office. You can download of your choice of office. From the command console just type root@bt:~# cd /tmp root@bt:/tmp# wget wget http://download.documentfoundation.org/libreoffice/stable/4.0.1/deb/x86_64/LibreOffice_4.0.1_Linux_x86-64_deb.tar.gz or Click here to choose of your choice of Libre Now untar the file using following command root@bt:/tmp# tar -zxvf LibreOffice_4.0.1_Linux_x86-64_deb.tar   Enter to folder root@bt:/tmp# cd LibreOffice_4.0.1.2_Linux_x86-64_deb/ root@bt:/tmp/LibreOffice_4.0.1.2_Linux_x86-64_deb# dpkg -i *.deb deb package is found under DEBS directory root@kali:~/Desktop/LibreOffice_4.1.1.2_Linux_x86_deb/DEBS# dpkg -i *.deb (Libre version for Kali is different because its new) Output look lik

Backtrack

Running Chrome as root @ BackTrack 5 R3 1.  Open console: vi /usr/bin/google-chrome 2. Go to the last line and add " exec -a " --user-data-dir " : then after your line look like this exec -a "$0" "$HERE/chrome" "$@" --user-data-dir 3. save ":wq!"