Giter Site home page Giter Site logo

therockstardba / anchorwatch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iamrootsh3ll/anchorwatch

0.0 2.0 0.0 1.14 MB

A Rogue Device Detection Script with Email Alerts Functionality for Windows Subsystem

Home Page: https://rootsh3ll.com/blog

License: GNU General Public License v3.0

PowerShell 100.00%

anchorwatch's Introduction

alt text

AnchorWatch - A rogue device detection script for Windows with email alerts

Features

AnchorWatch is a simple script that scans the subnet every X minutes and sends an email alert for each unknown device discovery.

Email contains the following information:

  1. MAC Address
  2. Hostname
  3. IP Address
  4. OS Name
  5. OUI Vendor Name
  6. Last Seen Timestamp

Installation

AnchorWatch is a powershell script that depends on nmap - a network scanning utility - for scanning the subnet. AnchorWatch will send an email notification each time an unknown device is detected on the network. An example of email notification from AnchorWatch:

alt text

Dependency

AnchorWatch has no dependency other than nmap. Download nmap for windows here: https://nmap.org/download.html

Configuration

Edit ./anchorWatch.ps1 and add the follwing details in corresponding sections:

SMTP Hostname           Domain Name of SMTP Server
SMTP Username
SMTP Password
Email Address From      [email protected]
Email Address to        [email protected]

Additionally, you'd need to add network range in trustDevices.ps1 also.

Scanning

./anchorWatch.ps1

Running anchorWatch.ps1 will start AnchorWatch in default blacklisting mode.

Default mode blacklists all the devices by default. You'd need to whitelist all the devices manually by adding the Corresponding MAC to a text file named known_hosts.txt

known_hosts.txt data format:

<MAC Address> <Host name>

Automatic Device Whitelisting

To speedup the whitelisting process, you can alternatively run the following command:

./trustDevices.ps1

./trustDevices.ps1 scans the whole subnet(s) and creates a list of discovered devices under known_hosts.txt in a tabular form. Net admins can then verify each device manually and manage their whitelist using known_hosts.txt

Fix Powershell ExecutionPolicy Error

To change the execution policy for the computer, for particular users, or for particular sessions, use the Set-ExecutionPolicy cmdlet, as follows.

  1. Start Windows PowerShell with the "Run as Administrator" option. (For more information, see Starting Windows PowerShell.) Only members of the Administrators group on the computer can change the execution policy.

  2. Run the Set-ExecutionPolicy cmdlet.

As an Administrator, you can set the execution policy by typing this into your PowerShell window:

Set-ExecutionPolicy RemoteSigned

About

AnchorWatch is a work of Freelance by Hardeep Singh. Originally created in 2015 for a fellow redittor who asked for a free alternative for Rogue Device Detection tool for Windows machine. At the time there were no cheap or free alternative available, especially for Windows domain. Hence, AnchorWatch came to life.

Hardeep Singh is the founder of https://rootsh3ll.com and primarily teaches Wireless Network Security. You can reach him on harry [at] rootsh3ll.com

Follow on Twitter: https://twitter.com/rootsh3ll

(Slight rework by github.com/cap44)

anchorwatch's People

Contributors

cap44 avatar iamrootsh3ll avatar

Watchers

 avatar  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.