Giter VIP home page Giter VIP logo

onesixtyone's Introduction

onesixtyone

CI

The SNMP protocol is a stateless, datagram oriented protocol. An SNMP scanner is a program that sends SNMP requests to multiple IP addresses, trying different community strings and waiting for a reply. Unfortunately SNMP servers don't respond to requests with invalid community strings and the underlying UDP protocol does not reliably report closed UDP ports. This means that 'no response' from the probed IP address can mean either of the following:

  • machine unreachable
  • SNMP server not running
  • invalid community string
  • the response datagram has not yet arrived

The approach taken by most SNMP scanners is to send the request, wait for n seconds and assume that the community string is invalid. If only 1 of every hundred scanned IP addresses responds to the SNMP request, the scanner will spend 99*n seconds waiting for replies that will never come. This makes traditional SNMP scanners very inefficient.

onesixtyone takes a different approach to SNMP scanning. It takes advantage of the fact that SNMP is a connectionless protocol and sends all SNMP requests as fast as it can. Then the scanner waits for responses to come back and logs them, in a fashion similar to Nmap ping sweeps. By default onesixtyone waits for 10 milliseconds between sending packets, which is adequate for 100MBs switched networks. The user can adjust this value via the -w command line option. If set to 0, the scanner will send packets as fast as the kernel would accept them, which may lead to packet drop.

Running onesixtyone on a class B network (switched 100MBs with 1Gbs backbone) with -w 10 gives us a performance of 3 seconds per class C, with no dropped packets. All 65536 IP addresses were scanned in less than 13 minutes. onesixtyone sends a request for the system.sysDescr.0 value, which is present on almost all SNMP enabled devices. This returned value gives us a description of the system software running on the device. Here is an excerpt of a log file:

192.168.120.92 [1234] HP ETHERNET MULTI-ENVIRONMENT,ROM A.05.03,JETDIRECT,
JD24,EEPROM A.05.05
130.160.108.146 [public] Hardware: x86 Family 15 Model 0 Stepping 10 AT/AT
COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocessor Free)
192.168.112.64 [public] Power Macintosh, hardware type 406; MacOS 9.0;
OpenTransport 2.5.2
192.168.104.254 [public] Novell NetWare 4.11  August 22, 1996
192.168.112.83 [public] Macintosh Quadra 650, System Software 7.1
192.168.244.210 [public] RICOH Aficio 850 / RICOH Network Printer D model
192.168.240.39 [public] Cisco Systems WS-C5000
192.168.244.103 [public] HPJ3210A AdvanceStack 10BT Switching Hub Management
Module, ROM A.01.02, EEPROM A.01.01, HW A.01.00

Authors

onesixtyone was designed and implemented by Alex Sotirov ([email protected]).

onesixtyone's People

Contributors

41exio avatar adamhj avatar buslov avatar charles2910 avatar darrenmartyn avatar dguido avatar disconnect3d avatar dmd avatar japesinator avatar monwolf avatar pgoodman avatar rex4539 avatar secuser avatar woodruffw avatar xambroz 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  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

onesixtyone's Issues

Community input file (`-c` option) is missing by one

onesixtyone is accounting one more community than it should when the file is '\n' terminated. To solve it, we should see if it's last community read was 0 sized and EOF was reached:

--- a/onesixtyone.c
+++ b/onesixtyone.c
@@ -142,7 +142,11 @@ void read_communities(char* filename)
     printf("MAX_COMMUNITIES (%d) reached. Remaining communities will be skipped \n", i);
   }
 
-  community_count = i;
+  if (c == 0 && ch == -1)
+	  community_count = i - 1;
+  else
+	  community_count = i;
+
   fclose(fd);
 }
 

[Feature] Add a progress bar with ETA

Hi,

it will be great if it can display a progress with the ETA, so when scanning networks with several communities, we can know how long it will take to finish.

Thanks in advance

Ability for fetch sysObjectID

Please add ability for fetch/display numeric sysObjectID (1.3.6.1.2.1.1.2) together with sysDescr.

Can be optional, with output something like:

192.168.120.92 [1234] {.1.3.6.1.4.1.318.1.3.4.5} HP ETHERNET MULTI-ENVIRONMENT,ROM A.05.03,JETDIRECT,
JD24,EEPROM A.05.05
130.160.108.146 [public] {.1.3.6.1.4.1.318.1.3.4.5} Hardware: x86 Family 15 Model 0 Stepping 10 AT/AT
COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocessor Free)

Unfortunately I'm not C guru..

Debian patches to onesixtyone

Hi, there are a couple patches Debian is applying to onesixtyone and it would be nice to see them incorporated upstream.
They are:

Description: Add missing flags
Author: Sophie Brun <[email protected]>
Last-Update: 2019-04-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 onesixtyone: onesixtyone.c
-	gcc -o onesixtyone onesixtyone.c
+	gcc $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o onesixtyone onesixtyone.c
 
 solaris: onesixtyone.c
 	cc -o onesixtyone onesixtyone.c -lsocket -lnsl

and

Description: don't hard codes the build architecture compiler
 onesixtyone fails to cross build from source, because the upstream
 Makefile hard codes the build architecture compiler "gcc". Making it
 substitutable is sufficient for making onesixtyone cross buildable.
Author: Helmut Grohne <[email protected]>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930902
Last-Update: 2019-07-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 onesixtyone: onesixtyone.c
-	gcc $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o onesixtyone onesixtyone.c
+	$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -o onesixtyone onesixtyone.c
 
 solaris: onesixtyone.c
 	cc -o onesixtyone onesixtyone.c -lsocket -lnsl

If you'd like to see them upstreamed, I could open a PR.

Cheers!

new tagged release?

Hi,
It would be great if you could make a tagged release.
I would like to update the Debian package (it's still version 0.3.2) and the packaging tools works best with tagged release: we have tools that monitors web pages listing release, and it works well with github pages showing git tags.
Thanks!

Inventory notification

Your tool/software has been inventoried on Rawsec's CyberSecurity Inventory.

onesixtyone : https://inventory.rawsec.ml/tools.html#onesixtyone

What is Rawsec's CyberSecurity Inventory?

An inventory of tools and resources about CyberSecurity. This inventory aims to help people to find everything related to CyberSecurity.

More details about features here.

Note: the inventory is a FLOSS (Free, Libre and Open-Source Software) project.

Why should you care about being inventoried?

Mainly because this is giving visibility to your tool and improve its referencing.

Badges

The badge shows to your community that your are inventoried. It looks good but also shows you care about your project, that your tool is referenced.

Feel free to claim your badge here: http://inventory.rawsec.ml/features.html#badges, it looks like that Rawsec's CyberSecurity Inventory, but there are several styles available.

Want to thank us?

If you want to thank us, you can help make our open project better known by tweeting about it! For example: Twitter URL

So what?

That's all, this message is just to notify you if you care. Else you can close this issue.

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.