• Stars
    star
    831
  • Rank 54,863 (Top 2 %)
  • Language
    Go
  • Created over 2 years ago
  • Updated 10 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tool for discovering the origin host behind a reverse proxy. Useful for bypassing cloud WAFs!

hakoriginfinder

Tool for discovering the origin host behind a reverse proxy. Useful for bypassing WAFs and other reverse proxies.

How does it work?

This tool will first make a HTTP request to the hostname that you provide and store the response, then it will make a request to every IP address that you provide via HTTP (80) and HTTPS (443), with the Host header set to the original host. Each HTTP response is then compared to the original using the Levenshtein algorithm to determine similarity. If the response is similar, it will be deemed a match.

Usage

Provide the list of IP addresses via stdin, and the original hostname via the -h option. For example:

prips 93.184.216.0/24 | hakoriginfinder -h example.com

You may set the Levenshtein distance threshold with -l. The lower the number, the more similar the matches need to be for it to be considered a match, the default is 5.

The number of threads may be set with -t, default is 32.

The hostname is set with -h, there is no default.

Output

The output is 3 columns, separated by spaces. The first column is either "MATCH" or "NOMATCH" depending on whether the Levenshtein threshold was reached or not. The second column is the URL being tested, and the third column is the Levenshtein score.

Output example

hakluke$ prips 1.1.1.0/24 | hakoriginfinder -h one.one.one.one
NOMATCH http://1.1.1.0 54366
NOMATCH http://1.1.1.30 54366
NOMATCH http://1.1.1.20 54366
NOMATCH http://1.1.1.4 54366
NOMATCH http://1.1.1.11 54366
NOMATCH http://1.1.1.5 54366
NOMATCH http://1.1.1.22 54366
NOMATCH http://1.1.1.13 54366
NOMATCH http://1.1.1.10 54366
NOMATCH http://1.1.1.25 54366
NOMATCH http://1.1.1.19 54366
... snipped for brevity ...
NOMATCH http://1.1.1.251 54366
NOMATCH http://1.1.1.248 54366
MATCH http://1.1.1.1 0
NOMATCH http://1.1.1.3 19567
NOMATCH http://1.1.1.2 19517
MATCH https://1.1.1.1 0
NOMATCH https://1.1.1.3 19534
NOMATCH https://1.1.1.2 19532

Installation

Install golang, then run:

go install github.com/hakluke/hakoriginfinder@latest

More Repositories

1

how-to-exit-vim

Below are some simple methods for exiting vim.
7,022
star
2

hakrawler

Simple, fast web crawler designed for easy, quick discovery of endpoints and assets within a web application
Go
4,374
star
3

hakrevdns

Small, fast tool for performing reverse DNS lookups en masse.
Go
1,404
star
4

weaponised-XSS-payloads

XSS payloads designed to turn alert(1) into P1
JavaScript
1,338
star
5

haktrails

Golang client for querying SecurityTrails API data
Go
528
star
6

hakip2host

hakip2host takes a list of IP addresses via stdin, then does a series of checks to return associated domain names.
Go
416
star
7

hakcheckurl

Takes a list of URLs and returns their HTTP response codes
Go
388
star
8

bug-bounty-standards

A list of edge cases that occur in bug bounty programs, conversations on how they should be handled. The goal is to standardise the way that specific situations are handled in bug bounties.
225
star
9

haklistgen

Turns any junk text into a usable wordlist for brute-forcing.
Go
212
star
10

hakscale

Distribute ordinary bash commands over many systems
Go
162
star
11

haktldextract

Extract domains/subdomains from URLs en masse
Go
133
star
12

hakfindinternaldomains

Feed it a list of subdomains, it will resolve them and tell you which ones are internal
Go
92
star
13

hakcron

Easily schedule commands to run multiple times at set intervals (like a cronjob, but with one command)
Go
84
star
14

hakq

A basic golang server/client for distributing tasks over multiple systems.
Go
38
star
15

hakrevshell

Shell
37
star
16

hakcertstream

Basic implementation of certstream to print new subdomains and domains
Go
37
star
17

hakstore

Go
27
star
18

hakluke

18
star
19

hakcsp

Return domains in CSP headers in http response
Go
16
star
20

hakaxfr

Attempt zone transfers on domains
Go
16
star
21

hakjoke

Gets joke from icanhazdadjoke.com, prints it
Go
13
star
22

haksecuritytxt

Takes a list of domains as the input, checks if they have a security.txt, outputs the results.
Go
13
star
23

helloworlds

hello world in different languages
Assembly
12
star
24

----svg-onload-alert---

jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//</stYle/</titLe/</teXtarEa/</scRipt/--!>\x3csVg/<sVg/oNloAd=alert()//>\x3e
HTML
11
star
25

XSS

Xss payloads
JavaScript
9
star
26

hakawshostnames

Generate a list of all AWS hostnames
Go
8
star
27

hakurlencode

(en|de)code urls from the CLI
Go
6
star
28

gzipsplit

split lines of text into multiple gzip files
Go
6
star
29

hakgzsplit

Split text files into gzip files with x lines
Go
5
star
30

vulnerable-code-examples

An unorganized batch of vulnerable code examples for use in my blogs, training, etc.
PHP
5
star
31

wordlesolver

Little python script + dictionary to help solve Wordle puzzles
Python
4
star
32

FakeKoala

3
star
33

diodb-api

Go
2
star