GithubHelp home page GithubHelp logo

detect-responder's Introduction

Detect Responder (LLMNR, NBT-NS, MDNS poisoner) with osquery

Overview

Build Status

This repo contains a python-based extension for osquery to detect active instances of Responder or any NBT-NS and LLMNR spoofers/poisoners on the network.

This extension was developed using osquery's Python bindings from https://github.com/osquery/osquery-python/

This extension was written with native Python modules to reduce the need for installing third-party Python libraries on hosts. Although it would have been cleaner and easier to use a library like Scapy, it would require installing it on every host where the extension was used.

Although many similar tools exist, most of them exist as independent scripts. This extension can take advantage of an existing osquery deployment and can provide network coverage everywhere that you have an osquery agent installed.

Note: This extension has not been tested on production networks and exists only as a proof-of-concept.

How it works

The extension operates by sending 4 network requests:

  1. A llmnr query for "wpad" to a multicast address
  2. A llmnr query for a randomized 16 character name to a multicast address
  3. A NBT-NS query for "WPAD" to a broadcast address
  4. A NBT-NS query for a randomized 16 character name to a broadcast address

Installation

To begin, the osquery-python package must be installed on the system. The easiest way to install it is via $ sudo pip install osquery.

Create a folder called /var/osquery/extensions (MacOS) or /etc/osquery/extensions (Linux), chmod 755 it, and copy detect_responder.ext to that directory. The extension and directory should have the following permissions:

$ ls -al /var/osquery/extensions
total 3336
drwxr-xr-x   4 root  wheel      128 Jun  3 14:37 .
drwxr-xr-x  15 root  wheel      480 Apr 17 10:25 ..
-rwxr-xr-x   1 root  wheel     5594 Jun  3 14:33 detect_responder.ext

To configure the extension to load when osquery starts, do one of the following:

  • Create a file called extensions.load in /var/osquery (MacOS) or /etc/osquery (Linux) and populate the file with the full path to detect_responder.ext
  • Edit your flags file and add the following flag: --extension /path/to/detect_responder.ext

Usage

Once you have verified that the extension has loaded correctly, you should be able to run SELECT * FROM detect_responder;. To test it, run Responder on a different host on the same network.

To test using osqueryi, run: sudo osqueryi --nodisable_extensions --extension /var/osquery/extensions/detect_responder.ext --verbose

Limitations

  • This extension currently only picks the first broadcast address returned by the query. It will support multiple interfaces in the future.
  • This extension can be easily fingerprinted and detected. There are no plans to modify it to be harder to profile.

Acknowledgements

detect-responder's People

Contributors

clong avatar

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.