CyberKeeda In Social Media
Showing posts with label Linux Applications. Show all posts
Showing posts with label Linux Applications. Show all posts

How to scan IP addresses details on your network using NMAP

 


You know using Linux is a kind fun, think about a requirement and you can see a wide number opensource tools gives you wings to your idea, no hurdles just go with your goal, they all will support you..

I would like to share you, what made me search internet and write this blog post.

So within my Lab environment, it's a very frequent task to configure, update IP configuration of other virtual machines, so to tackle this task, I have already written an Ansible Role, which basically configures the IP address for the host which has existing dhcp address assigned to it.

Now still there are some information I need to provide ansible before I proceed to run the playbook and the information it needs is, I need to manually look for free IPs in my current network.

So I was curious how to scan my network for used and free IP addresses, thus I surfed the internet and found, my friendly network troubleshooting tool NMAP gives the insight about it.

Let's see what command can be used to find those details.

Using below one lines to search for used IPs within your network.

$ nmap -sP 192.168.29.0/24

Output


Starting Nmap 6.40 ( http://nmap.org ) at 2022-06-16 17:10 IST
Nmap scan report for 192.168.29.1
Host is up (0.0078s latency).
Nmap scan report for 192.168.29.9
Host is up (0.0050s latency).
Nmap scan report for 192.168.29.21
Host is up (0.0043s latency).
Nmap scan report for 192.168.29.30
Host is up (0.0015s latency).
Nmap done: 256 IP addresses (4 hosts up) scanned in 2.59 seconds

Now let's scan again the same network and look for the listening ports along with the host ip

$ sudo nmap -sT 192.168.29.0/24

Output

Starting Nmap 6.40 ( http://nmap.org ) at 2022-06-16 17:17 IST
Nmap scan report for 192.168.29.1
Host is up (0.0061s latency).
Not shown: 992 filtered ports
PORT     STATE  SERVICE
80/tcp   open   http
443/tcp  open   https
1900/tcp open   upnp
2869/tcp closed icslap
7443/tcp open   oracleas-https
8080/tcp open   http-proxy
8200/tcp closed trivnet1
8443/tcp open   https-alt
MAC Address: AA:HA:IC:PF:P3:C1 (Unknown)

Nmap scan report for 192.168.29.9
Host is up (0.0083s latency).
Not shown: 998 closed ports
PORT    STATE SERVICE
80/tcp  open  http
554/tcp open  rtsp
MAC Address: 14:07:o8:g5:7E:99 (Private)

Nmap scan report for 192.168.29.21
Host is up (0.0051s latency).
Not shown: 998 closed ports
PORT   STATE SERVICE
22/tcp open  ssh
80/tcp open  http
MAC Address: 08:76:20:00:75:D5 (Cadmus Computer Systems)

Nmap scan report for 192.168.29.25
Host is up (0.0057s latency).
Not shown: 999 filtered ports
PORT    STATE SERVICE
135/tcp open  msrpc
MAC Address: F0:76:30:60:8E:21 (Unknown)

Nmap scan report for 192.168.29.30
Host is up (0.0018s latency).
Not shown: 997 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
8000/tcp open  http-alt
8080/tcp open  http-proxy

Nmap done: 256 IP addresses (5 hosts up) scanned in 7.84 seconds

If you need additional details like Host OS details and some more, then run the scan again with below command

$ sudo nmap -sT -O 192.168.29.0/24

Output

Nmap scan report for 192.168.29.30
Host is up (0.00026s latency).
Not shown: 997 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
8000/tcp open  http-alt
8080/tcp open  http-proxy
Device type: general purpose
Running: Linux 3.X
OS CPE: cpe:/o:linux:linux_kernel:3
OS details: Linux 3.7 - 3.9
Network Distance: 0 hops

Hope this post will help you in some sort !
Read more ...

How to disable Visual mode in VIM

Have you witnessed, suddenly your copy paste stopped working from windows box to putty terminal into VIM insert console,  more over to it, there is a strange string named as VISUAL at the bottom of the screen.

Visual mode is a feature of VIM which changes the interaction with vim when there is a mouse selection. This made copy+pasting annoying, let know it's cure here.

Open terminal and create a hidden file under your home directory as "vimrc"

# touch ~/.vimrc

# echo "set mouse-=a" >> ~/.vimrc

And yes you are done, back to usual mode no Visual :) 


Info from : GitHub


Read more ...

How to Create Windows 10 Bootable USB on Ubuntu or any Linux desktop



Are you looking for any desktop application on Ubuntu to create a bootable pendrive/flash drive with Windows.

WoeUSB is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD.


WoeUSB  package contains two programs:
  • woeusb: A command-line utility that enables you to create your own bootable Windows installation USB storage device from an existing Windows Installation disc or disk image
  • woeusbgui: A GUI wrapper of woeusb based on WxWidgets


So, lets know how install the WoeUSB on Ubuntu 
Official & updated Installation and Github link : Here
#    sudo add-apt-repository ppa:nilarimogard/webupd8
#    sudo apt update
#    sudo apt install woeusb
In case if you wish to remove that woeusb PPA, remove it from the bellow command.
#    sudo add-apt-repository --remove ppa:nilarimogard/webupd8
#    sudo apt-update
Now, WoeUSB has installed on my Ubuntu, though the interface is self explanatory still let's move ahead and know how to use it.

Open WoeUSB application and choose the USB drive and your windows iso kept within your Ubuntu.
Once you are done click install and you are done, you can monitor the progress on screen.


In case you receive a error dialogue like below, follow the below steps

Find your USB drive's mounted file system and block by running lsblk on terminal and find your device their.
To filter, look for size of your USB or name of the USB drive, below screen shot gives the picture of my USB drive ( 8 GB ) size, and named as /dev/sdc
#    lsblk

So we will unmount that partition out of the system.
Notice there  /dev/sdc is the full size of my USB disk, but the data is witten on it's /dev/sdc1 partition.
My USB disk is  /dev/sdc, ensure your USB is unmounted with the following command. Replace /dev/sdc1 with your own partition name.
#    sudo umount /dev/sdc1
Now try again from the   WoeUSB desktop application.
In case if you are willing to do the same through woeusb CLI utility, here is the way.
#    sudo woeusb -v --device /home/kunal/windows-10.iso /dev/sdc
/home/kunal/windows-10.iso  :  Replace it with your iso location.
/dev/sdc : replace it with your USB drive ( check it from lsblk )
Read more ...

How to install Sublime text editor on Ubuntu


Sublime text editor is one of the popular text editor for code, markup and prose that's the line it says on it's official website  and most of the users believe the same.
So let's know how to install it on your Ubuntu Box.

I'm using Ubuntu 18.04  while writing this blog during installation.

Install the GPG key


  #  wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -

Make apt work using https also


  #  sudo apt-get install apt-transport-https

Select the channel to use ( Recommended Stable )
For Stable release use the below command.
  #  echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list 

For Development release use the below command.
  #  echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list

Update apt sources and install Sublime Text


  #  sudo apt-get update #  
  #  sudo apt-get install sublime-text

To remove/uninstall sublime text editor  use the below command


  #  sudo apt-get remove sublime-text && sudo apt-get autoremove #  


Meanwhile you can anytime install it from Ubuntu Software Center,  it's also enlisted there.

Official Installation Link : Here


Read more ...
Designed By Jackuna