Coder Social home page Coder Social logo

bitquark / shortscan Goto Github PK

View Code? Open in Web Editor NEW
690.0 7.0 65.0 3.79 MB

An IIS short filename enumeration tool

License: MIT License

Go 100.00%
bugbounty security security-audit security-scanner security-tools iis iis-server pentesting pentesting-tools vulnerability-detection

shortscan's Introduction

馃寑 Shortscan

An IIS short filename enumeration tool.

Functionality

Shortscan is designed to quickly determine which files with short filenames exist on an IIS webserver. Once a short filename has been identified the tool will try to automatically identify the full filename.

In addition to standard discovery methods Shortscan also uses a unique checksum matching approach to attempt to find the long filename where the short filename is based on Windows' propriatary shortname collision avoidance checksum algorithm (more on this research at a later date).

Installation

Quick install

Using a recent version of go:

go install github.com/bitquark/shortscan/cmd/shortscan@latest

Manual install

To build (and optionally install) locally:

go get && go build
go install

Usage

Basic usage

Shortscan is easy to use with minimal configuration. Basic usage looks like:

$ shortscan http://example.org/

Examples

This example sets multiple custom headers by using --header/-H multiple times:

shortscan -H 'Host: gibson' -H 'Authorization: Basic ZGFkZTpsMzN0'

To check whether a site is vulnerable without performing file enumeration use:

shortscan --isvuln

Advanced features

The following options allow further tweaks:

Shortscan v0.7 路 an IIS short filename enumeration tool by bitquark
Usage: shortscan [--wordlist FILE] [--header HEADER] [--concurrency CONCURRENCY] [--timeout SECONDS] [--output type] [--verbosity VERBOSITY] [--fullurl] [--stabilise] [--patience LEVEL] [--characters CHARACTERS] [--autocomplete mode] [--isvuln] URL

Positional arguments:
  URL                    url to scan

Options:
  --wordlist FILE, -w FILE
                         combined wordlist + rainbow table generated with shortutil
  --header HEADER, -H HEADER
                         header to send with each request (use multiple times for multiple headers)
  --concurrency CONCURRENCY, -c CONCURRENCY
                         number of requests to make at once [default: 20]
  --timeout SECONDS, -t SECONDS
                         per-request timeout in seconds [default: 10]
  --output type, -o type
                         output format (human = human readable; json = JSON) [default: human]
  --verbosity VERBOSITY, -v VERBOSITY
                         how much noise to make (0 = quiet; 1 = debug; 2 = trace) [default: 0]
  --fullurl, -F          display the full URL for confirmed files rather than just the filename [default: false]
  --stabilise, -s        attempt to get coherent autocomplete results from an unstable server (generates more requests) [default: false]
  --patience LEVEL, -p LEVEL
                         patience level when determining vulnerability (0 = patient; 1 = very patient) [default: 0]
  --characters CHARACTERS, -C CHARACTERS
                         filename characters to enumerate [default: JFKGOTMYVHSPCANDXLRWEBQUIZ8549176320-_()&'!#$%@^{}~]
  --autocomplete mode, -a mode
                         autocomplete detection mode (auto = autoselect; method = HTTP method magic; status = HTTP status; distance = Levenshtein distance; none = disable) [default: auto]
  --isvuln, -V           bail after determining whether the service is vulnerable [default: false]
  --help, -h             display this help and exit
  --version              display version and exit

Utility

The shortscan project includes a utility named shortutil which can be used to perform various short filename operations and to make custom rainbow tables for use with the tool.

Examples

You can create a rainbow table from an existing wordlist like this:

shortutil wordlist input.txt > output.rainbow

To generate a one-off checksum for a file:

shortutil checksum index.html

Usage

Run shortutil <command> --help for a definiteive list of options for each command.

Shortutil v0.3 路 a short filename utility by bitquark
Usage: main <command> [<args>]

Options:
  --help, -h             display this help and exit

Commands:
  wordlist               add hashes to a wordlist for use with, for example, shortscan
  checksum               generate a one-off checksum for the given filename

Wordlist

A custom wordlist was built for shortscan. For full details see pkg/shortscan/resources/README.md

Credit

Original IIS short filename research by Soroush Dalili.

Additional research and this project by bitquark.

shortscan's People

Contributors

bitquark avatar random-robbie 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

shortscan's Issues

bypass 403 IIS

Is there any way to bypass 403? I have used many tools but it did not work. Any tip?

bypass 403 IIS

scan result

馃寑 Shortscan v0.9.0 路 an IIS short filename enumeration tool by bitquark
FATAL Unable to access server error="Get "https://example.com/.aspx\": context deadline exceeded (Client.Tim
why the scan result is like that ?

Idea

Hey dude,

Got an idea can we get an option to add a prefix to the wordlist.

that way we can do something like ASP as the prefix and then bruteforce the rest of the folder

Shortscan location

Hey :)
Just adding this here for next time I have the same issue!
Once I installed shortscan, I couldn't run it just by typing shortscan but I had to type:
$HOME/go/bin/shortscan

Header examples

Could you please add more examples to the README about adding multiple headers or how to send a request to an IP with a different HOST header?

NTLM Authentication

Is there any way to use NTLM authentication with this?

I can do this via a web proxy but the tool does not provide a way to use a web proxy either.

Results output - Feature request

Hi,
I am working on a site and using shortscan. I get a list of 40-50 possible files and folders with different extensions. Could you add a flag to output the results in an organised matter so that they can be used in Burp Intruder or FFUF.
Example output:

ACTIVi~2.ASP         ACTIVI?.ASP? 
DATAPR~2.ASP         DATAPR?.ASP? 
RISKRE~2.ASP         RISKRE?.ASP? 
RISKGR~2.ASM         RISKGR?.ASM? 
RISKIN~2.ASP         RISKIN?.ASP? 
ZENDES~1.ASH         ZENDES?.ASH?

I would like an output similar to this (sorted and unique), if possible (printed to terminal or stored in txt files):

ASP? files (might require some fuzzing as these are not complete names):
ACTIVI
DATAPR
RISKRE
RISKIN

ASH? files  (might require some fuzzing as these are not complete names):
ZENDES

Folders  (might require some fuzzing as these are not complete names):
TMP
usersd

Known files:
test.aspx
test123.aspx

Known folders:
javascript
js

This way, it is much easier to go to the next step and ffuz.

Thanks <3

[Feature Request] Recursive

Shortscan finds folders, make it recursive so that for each found folder, you run shortscan against them.

results in a DoS of target

$> shortscan target.url

access to target via web browser and via ping indicate server is up and running prior to scan

Shortscan v0.5 路 an IIS short filename enumeration tool by bitquark
Target: xxxxxxxxxxxxxxxxxxxx
Running: Microsoft-IIS/7.5 (ASP.NET v4.0.30319)
Vulnerable: Yes!


Finished! Requests: 722; Retries: 0; Sent 139614 bytes; Received 274905 bytes

no shortnames are found and after running scan, and now the website is not reachable from my machine via ping or web browser.

isitdownrightnow.com also reports site as down

wordlist additon

Hey dude,

Can you add WMSCalendar and manifest.json and productimg and NEW FOLDER to the wordlist as this has come up a few times for me so far.

Cheers

Wordlist Contents?

First of all I wanted to say thank you for the great tool! I was looking into using a wordlist with your shortutil tool, but I'm unsure of what the wordlist should contain. Would it be possible to include a few samples?

I'm unsure if it can contain directories like /iishelp/iis/misc/default.asp

Or the end directory like /misc/

Of if the word list can contain actual pages like admin.aspx

[Feature Request] Run shortscan on multiple folders

When I use shortscan on the webroot, I sometimes get few results and the tool cannot find certain folders, unless you know the name.
For example, even though I have the folder "handlers" in my wordlist, shortscan does not find it.
If I point shortscan to site/handlers though, shortscan see the directory as vulnerable and finds files/folders.

I was wondering if it would be possible to add another flag so that shortscan goes through a wordlist of folders so that instead of me scripting it via bash, shortscan will try its magic with:
site/admin
site/js
site/docs
site/upload
site/...

You could have a short check to find vulnerable folders first and then do a complete check only on those folders that are vulnerable to reduce the amount of requests.

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.