Scanning local network linux

3 network scanner for Linux

Sometime it’s useful to do an assessment of what’s online on your network, probably you think to know every server and service running, but I had more than one surprise in the past, with “test server just plugged in for a short time”, “New test service” or worst, hacked machine that exposed “new service”.

Network scanning is a procedure for identifying active hosts on a network, either for the purpose of attacking them or for network security assessment. Scanning procedures, such as ping sweeps and port scans, return information about which IP addresses map to live host and the active ports on every server.

Angry IP Scanner

Angry IP Scanner (or simply ipscan) is an open-source and cross-platform network scanner designed to be fast and simple to use. It scans IP addresses and ports as well as has many other features.

Angry IP Scanner, is written in Java, and present in many distributions, also in backtrack allows you to scan an IP range to see which IP are active or not.
Very easy to use, thanks to a convenient graphical interface.

Angry IP Scanner implements several different methods of detecting alive hosts (pinging).
As a rule, if hosts don’t respond to pings, they are considered dead and therefore not scanned further. This behavior can be changed in the Preferences dialog, Scanning tab. In the same place you can also select the pinging method.

So in general the methos are:

ICMP ECHO [ping]
ICMP ECHO [alternative]
UDP packet
This pinging method is preferred when you don’t have administrative privileges. Angry IP Scanner will detect the absence of privileges and use this method automatically.
The method works by sending out UDP packets to some UDP port very unlikely to be open. If the port is closed, the host must send the ICMP packet back informing of the fact. If the packet is reseived, Angry IP Scanner knows that the host is actually alive and records the roundtrip time. No response can mean that the UDP port is open (very unlikely) or the host is dead.

TCP port probe
This method tries to connect to some TCP port that is unlikely to be filtered (e.g. 80). If either the connection can be established or TCP RST packet is received (meaning that port is closed), Angry IP Scanner knows that host actually responds and can be considered as alive. If the port is filtered (no response to connection attempt), then the host is considered to be dead.

AutoScan network.

AutoScan-Network is a network scanner (discovering and managing application). No configuration is required to scan your network. The main goal is to print the list of connected equipments in your network.

Much more useful than Angry IP Scanner this tool can find for the host his services and operating system.

Main Features

  • Fast network scanner
  • Automatic network discovery
  • TCP/IP scanner
  • Wake on lan functionality
  • Multi-threaded Scanner
  • Port scanner
  • Low surcharge on the network
  • VNC Client
  • Telnet Client
  • SNMP scanner
  • Simultaneous subnetworks scans without human intervention
  • Realtime detection of any connected equipment
  • Supervision of any equipment (router, server, firewall…)
  • Supervision of any network service (smtp, http, pop, …)
  • Automatic detection of known operatic system (brand and version), you can also add any unknown equipment to the database
  • The graphical interface can connect one or more scanner agents (local or remote)
  • Scanner agents could be deployed all over the network to scan through any type of equipment (router, NAT, etc)
  • Network Intruders detection (in intruders detection mode, all new equipments blacklisted)
  • Complete network tree can be saved in a XML file.
  • Privileged account is not required
Читайте также:  Увеличение ttl windows 10

Umit is a user-friendly graphical interface to Nmap that lets you perform network port scanning.
Umit was designed to accomodate and run more than one scan at time. Each scan is executed and shown inside a Scan Tab, which has a title and organize every information obtained in the scan result.

The Scan Tab tries to facilitate your life, by making the information easier to navigate and search for a given information. Usually, if you wanted to scan an entire network using Nmap, you would have to open up your favorite terminal, type an entire Nmap command, like this one:

nmap -A -F -n -T4 192.168.1.1-254

and when it finally finishes you’ll end up with a bunch of lines in the terminal that can hardly be searched and read. If your goal was to know which of the 200 hosts found are serving ssh, what were you going to do? Maybe it won’t seen impossible for you, (and it’s not) but surely it’s a boring task that gets worst when you have to do that more than once.

An answer to your problem is Umit, that can handle this task easily, with just a couple of clicks.

So, if you’re wondering if you should retire the command line, I would say NO!. The Nmap’s command interface is very useful when you want to scan a few hosts, and skim the result quickly to make a decision. Every good network administrator know how useful is it to simply call:

to know which services are up, for example. If you’re at the command line, you won’t want to open a graphical application to do so, if you can quickly pull off your doubt about what is up or down from were you stand.

Umit is intended to help you manage your network, by giving you a better way to examine carefully your network peers. If your intention is to know better your network, then Umit is what you need.

Источник

How to Find What Devices are Connected to Network in Linux

Last updated September 30, 2019 By Abhishek Prakash 60 Comments

Brief: This quick trick shows you how to find devices connected to your local network in Linux.

Wireless networks have always been a desirable target for wannabe hackers. Wireless networks are also more vulnerable to hacking than the wired ones.

Forget hacking, do you ever wonder that someone might be leeching off your hard paid wifi network? Maybe a neighbor who once connected to your network and now uses it as his/her own?

It would be nice to check what devices are on your network. This way you can also see if there are some unwanted devices on your network.

So you might end up thinking, “how do I find what devices are connected to my network”?

I’ll show you how to do that in this quick tutorial. Not only it’s a good idea from security point of view, it is also a good little exercise if you have interest in networking.

We will use both, command line and GUI, way for finding out what devices are connected to your local network in Linux. The process is very simple and easy to use even for beginners.

A. Using Linux command to find devices on the network

Step 1: Install nmap

nmap is one of the most popular network scanning tool in Linux. Use the following command to install nmap in Ubuntu based Linux distributions:

You can easily install it in other Linux distributions as well. It should be in the official software repository.

Step 2: Get IP range of the network

Now we need to know the IP address range of the network. Use the ifconfig command to find the IP address in Linux. Look for wlan0 if you are using wifi or eth0 if you are using Ethernet.

Читайте также:  Vpn from windows to mac os

$ ifconfig
wlan0 Link encap:Ethernet HWaddr 70:f1:a1:c2:f2:e9
inet addr:192.168.1.91 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::73f1:a1ef:fec2:f2e8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2135051 errors:0 dropped:0 overruns:0 frame:0
TX packets:2013773 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1434994913 (1.4 GB) TX bytes:636207445 (636.2 MB)

The important things are highlighted in bold. As you see my IP is 192.168.1.91 and the subnet mask is 255.255.255.0 which means that the ip address range on my network varies from 192.168.1.0 to 192.168.1.255.

You may also use ip a command to know your IP address in Ubuntu and other Linux distributions.

At the same time, I’ll recommend you to read about basic Linux networking commands for more information.

Step 3: Scan to find devices connected to your network

It is advisable to use root privileges while scanning the network for more accurate information. Use the nmap command in the following way:

$ sudo nmap -sn 192.168.1.0/24
Starting Nmap 5.21 ( http://nmap.org ) at 2012-09-01 21:59 CEST

Nmap scan report for neufbox (192.168.1.1)
Host is up (0.012s latency).
MAC Address: E0:A1:D5:72:5A:5C (Unknown)
Nmap scan report for takshak-bambi (192.168.1.91)
Host is up.
Nmap scan report for android-95b23f67te05e1c8 (192.168.1.93)
Host is up (0.36s latency).

As you can see that there are three devices connected to my network. The router itself, my laptop and my Galaxy S2.

If you are wondering about why I used 24 in the above command, you should know a little about CIDR notation. It basically means that the scanning will be from 192.168.1.0 to 192.168.1.255.

B. Using GUI tool to find devices connected to network

When I first wrote this article, there was no GUI tool for this task. Then I saw a Google+ discussion about a new network monitoring tool being developed for elementary OS. I suggested including a periodic device scan feature in this tool and the developer readily agreed.

So, now we have a GUI tool that does this task. It’s called Nutty. Just run install this app and run it. It will periodically scan for new devices on the network and will notify you if there is a new device.

This application is only available for elementary OS, Ubuntu and hopefully, other Ubuntu based Linux distributions. You can find installation instructions on this detailed article on Nutty.

Oh, you can also log in to your router and see the devices connected to your devices. I let you figure the best way to find devices connected to your network.

Like what you read? Please share it with others.

Источник

ARP сканирование локальной сети Linux

Иногда возникает необходимость узнать какие устройства подключены к локальной сети Linux. Это может понадобиться если вы хотите подключиться к одному из компьютеров и не помните его адрес или хотите убедиться в безопасности вашей сети и найти все скрытые устройства.

Самый надежный способ обнаружить все подключенные к сети Linux устройства, в том числе и скрытые — это ARP сканирование локальной сети. В этой статье мы рассмотрим как его выполнить и какие утилиты для этого нужны.

Как выполнить ARP сканирование локальной сети?

Как вы знаете, у всех компьютеров в сети есть IP адреса. Никогда не задавались вопросом, как сеть определяет, какому компьютеру принадлежит тот или иной адрес? Ведь сети бывают разные, проводные, беспроводные, ppp и т д. И в каждой из этих сетей аппаратный адрес компьютера имеет свой формат, зависящий от конструктивных особенностей сети, а IP адреса одни и те же.

Все очень просто. Для преобразования физических адресов, в ip адреса используется протокол ARP (Address Resolution Protocol), так и расшифровывается — протокол разрешения адресов. Когда компьютеру нужно обратиться к другому компьютеру в локальной сети, он отправляет специальный запрос в котором буквально спрашивает «У кого IP адрес 192.168.1.4», компьютер с таким ip адресом отправляет ответ «У меня, я 11:22:33:44:55», в ответе он передает свой физический адрес в этой сети. Дальше этот адрес заносится в специальную таблицу. но это уже тонкости реализации и они выходят за рамки нашей статьи. Сегодня мы поговорим как самому выполнить ARP сканирование локальной сети linux и найти все подключенные устройства.

Читайте также:  Download центр загрузок windows

Формат сообщений ARP — простой. Сообщение содержит либо запрос с IP адресом, либо ответ. Размер сообщения зависит от используемого сетевого протокола IPv4 или IPv6, типа оборудования сети и т д. Типы и размеры адресов определяются в заголовке сообщения. Заголовок завершается кодом сообщения. Код 1 для запроса и 2 для ответа.

Тело сообщения состоит из четырех адресов, аппаратные и сетевые адреса отправителя и получателя.

Если в вашей сети есть устройства, которые не отвечают на любые запросы, такие как Ping, HTTP, HTTPS и т д, то их можно найти послав ARP запрос. Это могут быть различные фаерволы и маршрутизаторы, в том числе маршрутизаторы компании Cisco, такое поведение заложено их протоколом. В таком случае ARP сканирование сети Linux будет единственным способом найти такое устройство.

Утилита ARP Scan

ARP Scan или еще называемый MAC Scanner — это очень быстрый инструмент для сканирования локальной сети Linux с помощью ARP. Утилита показывает все IPv4 адреса устройств в вашей сети. Поскольку ARP не использует маршрутизацию, то такой вид сканирования работает только в локальной сети.

ARP Scan находит все активные устройства, даже если у них включен брандмауэр. Компьютеры не могут скрыться от ARP также как они скрываются от ping. Но ARP сканирование не подходит для поиска компьютеров за пределами локальной сети, в таких ситуациях используйте ping сканирование.

Установка ARP Scan

Этот arp сканер сети доступен для следующих операционных систем:

  • Debian, поставляется по умолчанию;
  • Ubuntu, можно установить с репозитория Universe;
  • Fedora, официальные репозитории начиная с версии 6;
  • RedHat — доступна начиная с версии 5;
  • Gentoo, официальные репозитории;
  • ArchLinux — официальные репозитории Pacman.

Для установки в Ubuntu выполните:

sudo apt install arp-scan

Сканирование сети

ARP Scan позволяет находить активные компьютеры как в проводных сетях ethernet, так и в беспроводных Wifi сетях. Также есть возможность работать с Token Ring и FDDI. Не поддерживаются последовательные соединения PPP и SLIP, поскольку в них не используется ARP. Программу нужно запускать с правами суперпользователя.

Но сначала надо узнать сетевой интерфейс, который используется для подключения к сети. Для этого можно воспользоваться программой ip:

В данном случае, это enp24s0. Самый простой способ выполнить ARP сканирование и обнаружить все подключенные к локальной сети компьютеры — запустить программу со следующими параметрами:

sudo arp-scan —interface=enp24s0 —localnet

Здесь параметр —interface, задает интерфейс для сканирования, а —localnet, говорит, что нужно использовать все возможные IP адреса для текущей сети.

Первый параметр можно опустить, тогда программа будет искать все узлы для интерфейса с меньшим номером в системе. В нашем примере имя интерфейса — enp24s0.

Вместо параметра —localnet, можно указать маску сети:

sudo arp-scan —interface=enp24s0 10.0.1.0/24

ARP сканирование можно использовать, даже если у вашего интерфейса нет IP адреса. Тогда в качестве исходящего адреса будет использован 0.0.0.0. Правда, на такие запросы могут ответить не все системы. Тогда ARP сканер сети не так эффективен.

ARP спуфинг и ARP прокси

Поскольку в ARP нет поддержки аутентификации, ARP ответ на запрос может отправить любая машина, даже не та которой он был адресован. Иногда такое поведение используется в архитектуре сети — ARP прокси или маршрутизатор предает свой IP адрес вместо адреса запрашиваемой машины. Но также может использоваться для перехвата данных, отправляемых компьютером. Хакер может использовать ARP чтобы выполнить атаку «Человек посередине» или «Отказ в обслуживании» на других пользователей сети. Для защиты от таких атак существует специальное программное обеспечение.

Выводы

ARP Scan это простой, но очень мощный инструмент, с помощью которого можно выполнять сканирование ip адресов в локальной сети linux. Те, кто знаком с Cisco маршрутизаторами и коммутаторами, знают что найти такие устройства можно только с помощью ARP. Это полезный инструмент, возможно, когда-то вам он пригодится.

Источник

Оцените статью