Coder Social home page Coder Social logo

netdiscover's People

Contributors

3wnbr1 avatar alexxy avatar arminaaki avatar craiglawson avatar etrombly avatar jpenalbae avatar mvoggenreiter avatar mygoditsfull0fstars avatar raphaunix avatar spezialist1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

netdiscover's Issues

Failed to make on MacOS 10.14.4

On MacOS Mojave, the build fails giving the following output

$ cmake .

-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Pcap include dirs set to /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
-- Pcap library set to /usr/lib/libpcap.dylib
-- Looking for pcap_breakloop
-- Looking for pcap_breakloop - found
-- Looking for pcap_datalink_name_to_val
-- Looking for pcap_datalink_name_to_val - found
-- Looking for pcap_datalink_val_to_name
-- Looking for pcap_datalink_val_to_name - found
-- Looking for pcap_findalldevs
-- Looking for pcap_findalldevs - found
-- Looking for pcap_freecode
-- Looking for pcap_freecode - found
-- Looking for pcap_get_selectable_fd
-- Looking for pcap_get_selectable_fd - found
-- Looking for pcap_lib_version
-- Looking for pcap_lib_version - found
-- Looking for pcap_list_datalinks
-- Looking for pcap_list_datalinks - found
-- Looking for pcap_open_dead
-- Looking for pcap_open_dead - found
-- Looking for pcap_set_datalink
-- Looking for pcap_set_datalink - found
-- Found LibNet: /usr/local/lib/libnet.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: netdiscover

$ make

Scanning dependencies of target netdiscover
[ 11%] Building C object src/CMakeFiles/netdiscover.dir/main.c.o
[ 22%] Building C object src/CMakeFiles/netdiscover.dir/ifaces.c.o
netdiscover/src/ifaces.c:207:20: error: use of undeclared identifier
      'SIOCGIFHWADDR'
      if (ioctl(fd,SIOCGIFHWADDR,&ifr)==-1) {
                   ^
netdiscover/src/ifaces.c:215:15: error: no member named 'ifr_hwaddr' in
      'struct ifreq'
      if (ifr.ifr_hwaddr.sa_family!=ARPHRD_ETHER) {
          ~~~ ^
netdiscover/src/ifaces.c:220:46: error: no member named 'ifr_hwaddr' in
      'struct ifreq'
      unsigned char* mac=(unsigned char*)ifr.ifr_hwaddr.sa_data;
                                         ~~~ ^
3 errors generated.
make[2]: *** [src/CMakeFiles/netdiscover.dir/ifaces.c.o] Error 1
make[1]: *** [src/CMakeFiles/netdiscover.dir/all] Error 2
make: *** [all] Error 2

Oui.txt error

$ sh http://standards-oui.ieee.org/oui/oui.txt
sh: 0: Can't open http://standards-oui.ieee.org/oui/oui.txt
$ nano update-oui-database.sh
$ nano update-oui-database.sh
$ sh update-oui-database.sh
Trying download "oui.txt" with lynx...update-oui-database.sh: 53: update-oui-database.sh: [[: not found
with elinks...update-oui-database.sh: 57: update-oui-database.sh: [[: not found
with wget...
update-oui-database.sh: 61: update-oui-database.sh: [[: not found
update-oui-database.sh: Can't obtain "http://standards-oui.ieee.org/oui/oui.txt"!
$ sh update-oui-database.sh
Trying download "oui.txt" with lynx...update-oui-database.sh: 53: update-oui-database.sh: [[: not found
with elinks...update-oui-database.sh: 57: update-oui-database.sh: [[: not found
with wget...
update-oui-database.sh: 61: update-oui-database.sh: [[: not found
update-oui-database.sh: Can't obtain "http://standards-oui.ieee.org/oui/oui.txt"!
$ nano update-oui-database.sh
$ sh update-oui-database.sh
Trying download "oui.txt" with lynx...update-oui-database.sh: 53: update-oui-database.sh: [[: not found
with elinks...update-oui-database.sh: 57: update-oui-database.sh: [[: not found
with wget...
update-oui-database.sh: 61: update-oui-database.sh: [[: not found
update-oui-database.sh: Can't obtain "http://standards-oui.ieee.org/oui/oui.h"!
$ nano update-oui-database.sh
$ sh update-oui-database.sh
Trying download "oui.txt" with lynx...update-oui-database.sh: 54: update-oui-database.sh: [[: not found
with elinks...update-oui-database.sh: 58: update-oui-database.sh: [[: not found
with wget...
update-oui-database.sh: 62: update-oui-database.sh: [[: not found
update-oui-database.sh: Can't obtain "https://raw.githubusercontent.com/alexxy/netdiscover/c74f29ccc83f8161136e5392fed30015bb475040/src/oui.h"!
$

I changed the link as -

http://standards-oui.ieee.org/oui/oui.h

http://standards-oui.ieee.org/oui/oui.txt

https://raw.githubusercontent.com/alexxy/netdiscover/c74f29ccc83f8161136e5392fed30015bb475040/src/oui.h

and tried so many times but didn't worked

Failed to make on macOS10.13

  • I have installed the requirement,cmake,libpcap,libnet.

  • I followed the INSTALL.max.txt.

When I am trying to use the make command,I got the error as follows:

[ 11%] Building C object src/CMakeFiles/netdiscover.dir/main.c.o
[ 22%] Building C object src/CMakeFiles/netdiscover.dir/ifaces.c.o
/Users/jz/Documents/ctf/tools/netdiscover/src/ifaces.c:207:20: error: use of
      undeclared identifier 'SIOCGIFHWADDR'
      if (ioctl(fd,SIOCGIFHWADDR,&ifr)==-1) {
                   ^
/Users/jz/Documents/ctf/tools/netdiscover/src/ifaces.c:215:15: error: no member
      named 'ifr_hwaddr' in 'struct ifreq'
      if (ifr.ifr_hwaddr.sa_family!=ARPHRD_ETHER) {
          ~~~ ^
/Users/jz/Documents/ctf/tools/netdiscover/src/ifaces.c:220:46: error: no member
      named 'ifr_hwaddr' in 'struct ifreq'
      unsigned char* mac=(unsigned char*)ifr.ifr_hwaddr.sa_data;
                                         ~~~ ^
3 errors generated.
make[2]: *** [src/CMakeFiles/netdiscover.dir/ifaces.c.o] Error 1
make[1]: *** [src/CMakeFiles/netdiscover.dir/all] Error 2
make: *** [all] Error 2

Not showing any results

Hello, I use Kali Linux 2020.2 on dual boot. I tried netdiscover. It shows no results except router's IP
I type:
sudo netdiscover -r 192.168.1.1/24

Results:

Currently scanning: Finished!   |   Screen View: Unique Hosts                                
                                                                                              
 6 Captured ARP Req/Rep packets, from 1 hosts.   Total size: 288                              
 _____________________________________________________________________________
   IP            At MAC Address     Count     Len  MAC Vendor / Hostname      
 -----------------------------------------------------------------------------
 192.168.1.1     *the device MAC address*      6     288  HUAWEI TECHNOLOGIES CO.,LTD              

It puts the right MAC address of the router.
I tried both libpcap0.8 (1.9.1-4) and libpcap0.8 (1.8.1-6) and no results except that.
Is there any way to show all devices using netdiscover?
Thanks in advance.

Unable to build

On OSX 10.12.1., the step ./configure doesn't work. So the next command, make is invalid for need of a makefile.

thanks
SJ

No devices discovered in Armbian

Hello, I'm using OrangePi with Armbian Bionic, based on Ubuntu 18 and netdiscover is not able to discover devices. Actually it work once for a while, and then suddenly nothing...

I have tried this for long periods with RaspberryPi w Raspbian and was working well.

FYI I am using libpcap0.8 (1.8.1-6) so that doesn't not seem to be the issue.

Any suggestion on what it can be? Thanks

no results found

nerdsicover worked fine always, but from today i dont get any results anymore. This happened after the latest Kali update. Also arp-scan is broken.It scan but returns no results, no devices are found. Network looks fine, I can ping all devices. Nmap network scan works fine.
Where do I need to check to fix?

-bash: ./configure: No such file or directory

[root@worker netdiscover]# ./configure
-bash: ./configure: No such file or directory
[root@worker netdiscover]#

File configure does not exsit, how can I create this file? Thanks a lot.

how make in mac os 10.12?

$ brew list
aescrypt gdk-pixbuf libnet pygobject
aescrypt-packetizer geoip libpcap pygtk
aespipe geoipupdate libpng python
aircrack-ng gettext libtiff rbenv
ant glib libtool readline
asio gmp libtorrent-rasterbar reaver
atk go libxml2 redis
autoconf gobject-introspection libyaml ruby
automake grep luajit ruby-build
bdw-gc gtk+ lynis ruby21
boost hadoop lynx scons
boost-python harfbuzz lzo shared-mime-info
cairo hbase make skipfish
cctools hicolor-icon-theme makedepend slowhttptest
cloc hping maven snappy
cmake httrack mongodb snort
couchdb hydra mpfr solr
cpp-netlib icu4c mysql sonar
cryptopp ilmbase net-snmp sonar-runner
curl instantclient-basic nmap sonarqube
daq instantclient-sdk node spidermonkey
eigen instantclient-sqlplus nspr sqlite
erlang isl numpy suricata
ettercap john-jumbo opencv tesseract
exiftool jpeg openexr theharvester
exiv2 json-c openssl tor
fdupes leptonica pango v8-315
findutils libdnet pcap w3m
fontconfig libevent pcre wget
fping libffi pixman wrk
freetype libgpg-error pkg-config wxmac
gawk libidn portaudio xctool
gawk3 libksba postgresql xz
gcc libmagic py2cairo zmap
gdbm libmpc pyenv

$ pwd
/project/netdiscover/src

$ which wget
/usr/local/bin/wget
$ which lynx
/usr/local/bin/lynx
$ sh update-oui-database.sh
-n Trying download "oui.txt" with lynx...
-n with elinks...
with wget...
update-oui-database.sh: Can't obtain "http://standards.ieee.org/regauth/oui/oui.txt"!

$ make
$ make
[ 11%] Building C object CMakeFiles/netdiscover.dir/main.o
In file included from /Volumes/BOOK/安全/project/netdiscover/src/main.c:39:
/Volumes/BOOK/安全/project/netdiscover/src/ifaces.h:38:10: fatal error:
'netinet/ether.h' file not found

include <netinet/ether.h>

     ^

1 error generated.
make[2]: *** [CMakeFiles/netdiscover.dir/main.o] Error 1
make[1]: *** [CMakeFiles/netdiscover.dir/all] Error 2
make: *** [all] Error 2

README out of date

Hello, just thought I'd point out the README is out of date? Netdiscover seems to be only buildable with cmake at the moment, but the instructions still show the original Make procedure.

Broken oui.txt URL

In update-oui-database.sh it uses the URL http://standards.ieee.org/regauth/oui/oui.txt which appears to be out of date. A quick search turned up https://standards.ieee.org/products-services/regauth/oui/index.html which currently has a "public listing" link to https://regauth.standards.ieee.org/standards-ra-web/pub/view.html#registries

This lists various products which have txt downloads. I'm not certain of the correct one but the MAC Address Block Large (MA-L) page has in its intro "This product was previously referred to as an OUI (Organizationally Unique Identifier)", so I'm guessing an appropriate replacement URL might be http://standards-oui.ieee.org/oui/oui.txt

Broken on macOS 10.13

Build is broken on macOS 10.13
Latest working on macOS is commit ae6b9f0
I guess it's just a matter of preprocessor but I don't have the knowledge to fix it

ewen@Ewens-MBP:~/Downloads/netdiscover$ cmake .
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Pcap include dirs set to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include
-- Pcap library set to /usr/lib/libpcap.dylib
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/ewen/Downloads/netdiscover-886319af1758a1cb9cc1ec904ea46646572797c9

ewen@Ewens-MBP:~/Downloads/netdiscover$ make
[ 11%] Building C object src/CMakeFiles/netdiscover.dir/ifaces.c.o
/Users/ewen/Downloads/netdiscover-886319af1758a1cb9cc1ec904ea46646572797c9/src/ifaces.c:207:20: error: use of undeclared identifier 'SIOCGIFHWADDR'
      if (ioctl(fd,SIOCGIFHWADDR,&ifr)==-1) {
[ 11%] Building C object src/CMakeFiles/netdiscover.dir/ifaces.c.o
/Users/ewen/Downloads/netdiscover-886319af1758a1cb9cc1ec904ea46646572797c9/src/ifaces.c:207:20: error: use of undeclared identifier 'SIOCGIFHWADDR'
      if (ioctl(fd,SIOCGIFHWADDR,&ifr)==-1) {
                   ^
/Users/ewen/Downloads/netdiscover-886319af1758a1cb9cc1ec904ea46646572797c9/src/ifaces.c:215:15: error: no member named 'ifr_hwaddr' in 'struct ifreq'
      if (ifr.ifr_hwaddr.sa_family!=ARPHRD_ETHER) {
          ~~~ ^
/Users/ewen/Downloads/netdiscover-886319af1758a1cb9cc1ec904ea46646572797c9/src/ifaces.c:220:46: error: no member named 'ifr_hwaddr' in 'struct ifreq'
      unsigned char* mac=(unsigned char*)ifr.ifr_hwaddr.sa_data;
                                         ~~~ ^
3 errors generated.
make[2]: *** [src/CMakeFiles/netdiscover.dir/ifaces.c.o] Error 1
make[1]: *** [src/CMakeFiles/netdiscover.dir/all] Error 2
make: *** [all] Error 2

Bug About netdiscover 0.3 beta 7 running on macOS 10.15

I can’t make file until vist bdb06d9.

Now the program runs.

It can passively monitor the arp response packet and extract the source MAC and source IP normally and display it on the screen.

At the same time, it is normal to determine the scanning and sending function of the program by capturing packets with other hosts in the broadcast domain (figure).

However, there is no host IP and MAC of the facts on the screen output.

I suspect that the problem lies in the arp request packet of the program structure. The source MAC address does not seem to be filled correctly (all 0s), so the target host return packet during the scanning process fails to enter the local interface correctly, resulting in the missing screen output. Active host information for active scanning.

The code I feel is probably in ifaces.c, but I don't know how to program it, so I hope I can get your help and let the software work.

image

↑Host response DesMAC all 0,This is obviously wrong.↑

image

↑This is the netdiscover running on kali. You can see that the source MAC in the arp request datagram is correct.↑

other information

image

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.