All Projects → jasondrawdy → Forerunner

jasondrawdy / Forerunner

Licence: other
Fast and extensible network scanning library featuring multithreading, ping probing, and scan fetchers.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Forerunner

Qrcode
qrcode scanner ( decoder ) by golang 二维码扫描识别
Stars: ✭ 233 (+497.44%)
Mutual labels:  scanner
Recon-X
Advanced Reconnaissance tool to enumerate attacking surface of the target.
Stars: ✭ 27 (-30.77%)
Mutual labels:  scanner
rdio-scanner-pi-setup
A fully working police radio scanner on a Raspberry Pi with Trunk Recorder and Rdio Scanner
Stars: ✭ 24 (-38.46%)
Mutual labels:  scanner
Esp32marauder
A suite of WiFi/Bluetooth offensive and defensive tools for the ESP32
Stars: ✭ 233 (+497.44%)
Mutual labels:  scanner
ZZYQRCode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 124 (+217.95%)
Mutual labels:  scanner
Judge-Jury-and-Executable
A file system forensics analysis scanner and threat hunting tool. Scans file systems at the MFT and OS level and stores data in SQL, SQLite or CSV. Threats and data can be probed harnessing the power and syntax of SQL.
Stars: ✭ 66 (+69.23%)
Mutual labels:  scanner
Aggressor
Ladon for Cobalt Strike, Large Network Penetration Scanner, vulnerability / exploit / detection / MS17010 / password/brute-force/psexec/atexec/sshexec/webshell/smbexec/netcat/osscan/netscan/struts2Poc/weblogicExp
Stars: ✭ 228 (+484.62%)
Mutual labels:  scanner
findcdn
findCDN is a tool created to help accurately identify what CDN a domain is using.
Stars: ✭ 64 (+64.1%)
Mutual labels:  scanner
extrude
🕵️ Analyse binaries for missing security features, information disclosure and more...
Stars: ✭ 51 (+30.77%)
Mutual labels:  scanner
owasp-zap-fileupload-addon
OWASP ZAP add-on for finding vulnerabilities in File Upload functionality.
Stars: ✭ 19 (-51.28%)
Mutual labels:  scanner
Rengine
reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with…
Stars: ✭ 3,439 (+8717.95%)
Mutual labels:  scanner
PIP-Module-Scanner
Scans your Python project for all installed third party pip libraries that are used and generates a requirements.txt file based on it
Stars: ✭ 19 (-51.28%)
Mutual labels:  scanner
sx
🖖 Fast, modern, easy-to-use network scanner
Stars: ✭ 1,267 (+3148.72%)
Mutual labels:  scanner
Webdirscan
跨平台的web目录扫描工具
Stars: ✭ 234 (+500%)
Mutual labels:  scanner
Sudomy
Sudomy is a subdomain enumeration tool to collect subdomains and analyzing domains performing automated reconnaissance (recon) for bug hunting / pentesting
Stars: ✭ 1,572 (+3930.77%)
Mutual labels:  scanner
Open Paperless
Scan, index, and archive all of your paper documents (acquired by Mayan EDMS)
Stars: ✭ 2,538 (+6407.69%)
Mutual labels:  scanner
aemscan
Adobe Experience Manager Vulnerability Scanner
Stars: ✭ 161 (+312.82%)
Mutual labels:  scanner
pywhatcms
Unofficial WhatCMS API package
Stars: ✭ 42 (+7.69%)
Mutual labels:  scanner
yara-exporter
Exporting MISP event attributes to yara rules usable with Thor apt scanner
Stars: ✭ 22 (-43.59%)
Mutual labels:  scanner
kube-knark
Open Source runtime tool which help to detect malware code execution and run time mis-configuration change on a kubernetes cluster
Stars: ✭ 32 (-17.95%)
Mutual labels:  scanner

Forerunner

The Forerunner library is a fast, lightweight, and extensible networking library created to aid in the development of robust network centric applications such as: IP Scanners, Port Knockers, Clients, Servers, etc. In it's current state, the Forerunner library is able to both synchronously and asynchronously scan and port knock IP addresses in order to obtain information about the device located at that endpoint such as: whether the IP is online, the physical MAC address, and etc. The library is a completely object oriented and event based library meaning that scan data is contained within specially crafted "scan" objects which are designed to handle all data from results to exceptions.

Requirements

  • .NET Framework 4.6.1

Features

Method Description Usage
Scan Scan a single IP for information Scan("192.168.1.1");
ScanRange Scan a range of IPs for information ScanRange("192.168.1.1", "192.168.1.255")
ScanList Scan a list of IPs for information ScanList("192.168.1.1, 192.168.1.2, 192.168.1.3")
PortKnock Ping every port of a single IP PortKnock("192.168.1.1");
PortKnockRange Ping every port in a range of IPs PortKnockRange("192.168.1.1", "192.168.1.255");
PortKnockList Ping every port using a list of IPs PortKnockList("192.198.1.1, 192.168.1.2, 192.168.1.3");
IsHostAlive Ping a host N times for X milliseconds IsHostAlive("192.168.1.1", 5, 1000);
GetAveragePingResponse Get average ping response for a host GetAveragePingResponse("192.168.1.1", 5, 1000);
IsPortOpen Ping individual ports via TCP & UDP IsPortOpen("192.168.1.1", 45000, new TimeSpan(1000), false);

Examples

IP Scanning

Scanning a network is a commonplace task in this digital age and so I have taken the liberty to make this as simple as possible for any future programmer whom may wish to do such a thing in an easy way. The Forerunner library is completely object oriented, thus making it ideal for plug and play situations; the object for IP scanning is called an IPScanObject and it actually contains quite a few properties:

  • Address (String)
  • IP (IPAddress)
  • Ping (Long)
  • Hostname (String)
  • MAC (String)
  • isOnline (Bool)
  • Errors (Exception)

With the object in mind, let's try and create a new object and perform a scan using it. There are multiple ways to go about this, however, the simplest way to get started is to first create a new Scanner object so we can access our scanning methods. Next, create an IPScanObject and then set it to the Scan method with the IP you would like to enumerate; for example:

Synchronous
using System;
using Forerunner; // Remember to import our library.

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            // Our IP we would like to scan.
            string ip = "192.168.1.1";

            // Create a new scanner object.
            Scanner s = new Scanner();

            // Create a new scan object and perform a scan.
            IPScanObject result = s.Scan(ip);

            // Output that we have finished the scan.
            if (result.Errors != null)
                Console.WriteLine("[x] An error occurred during the scan.");
            else
                Console.WriteLine("[+] " + ip + " has been successfully scanned!")

            // Allow the user to exit at any time.
            Console.Read();
        }
    }
}

Another way, which is my preferred method of operation, is to create a Scanner object and subscribe to the Event Handlers of things like ScanAsyncProgressChanged or ScanAsyncComplete, that way I have full control over my async methods; I can control how they're progress states affect my application and so on; for example:

Asynchronous
using System;
using System.Threading.Tasks;
using Forerunner; // Remember to import our library.

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            // Our IP we would like to scan.
            string ip = "192.168.1.1";

            // Setup our scanner object.
            Scanner s = new Scanner();
            s.ScanAsyncProgressChanged += new ScanAsyncProgressChangedHandler(ScanAsyncProgressChanged);
            s.ScanAsyncComplete += new ScanAsyncCompleteHandler(ScanAsyncComplete);

            // Start a new scan task with our ip.
            TaskFactory task = new TaskFactory();
            task.StartNew(() => s.ScanAsync(ip));

            // Allow the user to exit at any time.
            Console.Read();
        }

        static void ScanAsyncProgressChanged(object sender, ScanAsyncProgressChangedEventArgs e)
        {
            // Do something here with e.Progress, or you could leave this event
            // unsubscribed so you wouldn't have to do anything.
        }

        static void ScanAsyncComplete(object sender, ScanAsyncCompleteEventArgs e)
        {
           // Do something with the IPScanObject aka e.Result.
            if (e.Result.Errors != null)
                Console.WriteLine("[x] An error occurred during the scan.");
            else
                Console.WriteLine("[+] " + e.Result.IP + " has been successfully scanned!")
        }
    }
}

Port Knocking

I know what you're thinking. Port knocking? Yes, and no. The term doesn't mean port knocking in the traditional sense of connecting through a predefined set of ports, but rather just checking if any ports are actually open. It's literally "knocking" on a port in every sense of the word by trying to connect to each port and sending data. Just like with IP scanning, port knocking uses a custom object which is called a "Port Knock Scan Object" or PKScanObject for short. The PKScanObject actually contains a list of PKServiceObjects which in turn hold our port data; the service object contains the following properties:

  • IP (String)
  • Port (Int)
  • Protocol (PortType)
  • Status (Bool)

Port knocking is in similar fashion with IP scanning. First, create a Scanner object. Next, create a new PKScanObject and set it to the PortKnock method with the IP of your choosing, then display your results; for example:

Synchronous
using System;
using Forerunner; // Remember to import our library.

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            // Our IP we would like to scan.
            string ip = "192.168.1.1";

            // Create a new scanner object.
            Scanner s = new Scanner();

            // Create a new scan object and perform a scan.
            PKScanObject result = s.PortKnock(ip);

            // Output that we have finished the scan.
            if (result.Errors != null)
                Console.WriteLine("[x] An error occurred during the scan.");
            else
                Console.WriteLine("[+] " + ip + " has been successfully scanned!")

           // Display our results.
           foreach (PKServiceObject port in result.Services)
           {
                Console.WriteLine("[+] IP: " + port.IP + " | " +
                                  "Port: " + port.Port.ToString() + " | " +
                                  "Protocol: " + port.Protocol.ToString() + " | " +
                                  "Status: " + port.Status.ToString());
           }

           // Allow the user to exit at any time.
           Console.Read();
        }
    }
}

Lastly, I will show you a simple example of port knocking asynchronously. It is essentially the same as port knocking synchronously except for the fact that you can use events to your advantage. You can get progress updates without having to worry about UIs crashing or systems being in a locked state; for example:

Asynchronous
using System;
using System.Threading.Tasks;
using Forerunner; // Remember to import our library.

namespace Example
{
    class Program
    {
        static void Main(string[] args)
        {
            // Our IP we would like to scan.
            string ip = "192.168.1.1";

            // Setup our scanner object.
            Scanner s = new Scanner();
            s.PortKnockAsyncProgressChanged += new PortKnockAsyncProgressChangedHandler(PortKnockAsyncProgressChanged);
            s.PortKnockAsyncComplete += new PortKnockAsyncCompleteHandler(PortKnockAsyncComplete);

            // Start a new scan task with our ip.
            TaskFactory task = new TaskFactory();
            task.StartNew(() => s.PortKnockAsync(ip));

            // Allow the user to exit at any time.
            Console.Read();
        }

        static void PortKnockAsyncProgressChanged(object sender, PortKnockAsyncProgressChangedEventArgs e)
        {
            // Display our progress so we know the ETA.
            if (e.Progress == 99)
            {
                Console.Write(e.Progress.ToString() + "%...");
                Console.WriteLine("100%!");
            }
            else
                Console.Write(e.Progress.ToString() + "%...");
        }

        static void PortKnockAsyncComplete(object sender, PortKnockAsyncCompleteEventArgs e)
        {
            // Tell the user that the port knock was complete.
            Console.WriteLine("[+] Port Knock Complete!");

            // Check if we resolved an error.
            if (e.Result == null)
                Console.WriteLine("[X] The port knock did not return any data!");
            else
            {
                // Check if we have any ports recorded.
                if (e.Result.Services.Count == 0)
                    Console.WriteLine("[!] No ports were open during the knock.");
                else
                {
                    // Display our ports and their details.
                    foreach (PKServiceObject port in e.Result.Services)
                    {
                        Console.WriteLine("[+] IP: " + port.IP + " | " +
                                          "Port: " + port.Port.ToString() + " | " +
                                          "Protocol: " + port.Protocol.ToString() + " | " +
                                          "Status: " + port.Status.ToString());
                    }
                }
            }
        }
    }
}

Credits

Icon: monkik
https://www.flaticon.com/authors/monkik

License

Copyright © ∞ Jason Drawdy

All rights reserved.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of the above copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].