Customisable and automated HTTP header injection

headi

Customisable and automated HTTP header injection. Example run from the HTB machine Control:

InsecureSkipVerify is not currently configured, if you want to disable security checks then feel free to uncomment crypto/tls in the imports and the TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, lines in http transport configuration and then build locally.


Install

go get github.com/mlcsec/headi

Headers

Injects the following HTTP headers:

  • Client-IP
  • Connection
  • Contact
  • Forwarded
  • From
  • Host
  • Origin
  • Referer
  • True-Client-IP
  • X-Client-IP
  • X-Custom-IP-Authorization
  • X-Forward-For
  • X-Forwarded-For
  • X-Forwarded-Host
  • X-Forwarded-Server
  • X-Host
  • X-HTTP-Host-Override
  • X-Original-URL
  • X-Originating-IP
  • X-Real-IP
  • X-Remote-Addr
  • X-Remote-IP
  • X-Rewrite-URL
  • X-Wap-Profile

An initial baseline request is made to gauge the normal response for the target resource. Green indicates a change in the response and red no change. [+] and [-] respectively.


Usage

Two options for HTTP header injection:

  1. Default payloads (127.0.0.1, localhost, etc.) are injected into the headers mentioned above
  2. Custom payloads can be supplied (e.g. you've enumerated some internal IPs or domains) using the pfile parameter
$ headi
Usage:
  headi -u https://target.com/resource
  headi -u https://target.com/resource -p internal_addrs.txt

Options:
  -p, --pfile        Payload File
  -t, --timeout    HTTP Timeout
  -u, --url           Target URL

Currently only takes one URL as input but you can easily bash script for numerous URLs like so:

$ for i in $(cat urls); do headi -url $i;done
Comments
  • Kindl help

    Kindl help

    When i was testing my multiple domains using "$ for i in $(cat urls); do headi -url $i;done" i realised i was unable to add payload file -p or --pfile like i did for the one without multiple domains. MY QUESTION IS HOW DO I CREATE CUSTOM PAYLOAD FILE -p for testing multiple domains?It only gave me the usual 127.0.0.1 as the payload.

  • ISSUE IS REAL

    ISSUE IS REAL

    Is not working."go get" command is not working,and its been a long time you update this repository.Many things have changed with golang,im not the problem at all.YOU ALWAYS SOUND IMPATIENT AND INSULT people asking you for solutions.Is that how you learn coding?or your teachers where not patient with you?Try to check and dont insult as if you know it all.

  • Installation Issue on Ubuntu

    Installation Issue on Ubuntu

    Have been trying for a while but it is not working :

    root@ubuntu-s-1vcpu-1gb-blr1-01:~/999.bash-scripts# git clone https://github.com/mlcsec/headi Cloning into 'headi'... remote: Enumerating objects: 122, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (13/13), done. remote: Total 122 (delta 10), reused 6 (delta 6), pack-reused 103 Receiving objects: 100% (122/122), 36.58 KiB | 1.59 MiB/s, done. Resolving deltas: 100% (32/32), done.

    root@ubuntu-s-1vcpu-1gb-blr1-01:~/999.bash-scripts# cd headi

    root@ubuntu-s-1vcpu-1gb-blr1-01:~/999.bash-scripts/headi# make before.build go mod init v0 && go mod tidy go: creating new go.mod: module v0 go: finding module for package github.com/fatih/color go: found github.com/fatih/color in github.com/fatih/color v1.13.0 go mod download && go mod vendor

    root@ubuntu-s-1vcpu-1gb-blr1-01:~/999.bash-scripts/headi# make.build-headi -bash: make.build-headi: command not found

    root@ubuntu-s-1vcpu-1gb-blr1-01:~/999.bash-scripts/headi# make build-headi make: *** No rule to make target 'build-headi'. Stop.

  • Bad content length + Refactoring

    Bad content length + Refactoring

    Added

    • Try to obtain real Content-Length value:
      • disable chunk-encoded response (e.g useful to make it works with burp academy labs)
      • Or recompute it (e.g useful to make it works with https://www.google.fr)
    • code refactoring
      • Add makefile to build binary
      • Add multiple functions in main and comment
  • NOT WORKING ANYMORE

    NOT WORKING ANYMORE

    I tried to use "go get" to download and install headi,i found out it doesnt download anything,i even used go install -v github.com/mlcsec/headi@latest after go get github.com/mlcsec/headi did not work.Both are not working.I tried export GO111MODULE=off ,also not working.Kindly do something or fix it.

  • Final Question

    Final Question

    I'm not a newbie in golang,and i'm very vast in it for the past 4 years.Maybe the problem is with the Operating system(OS) im using.Im using Ubuntu 18.4 and maybe the golang version im using is not also compatible with HEADI.Im using golang 1.71. PLEASE which golang version are you using that is working for you?I know you are using Kali Linux.

Related tags
Di - A (very) WIP Go 1.18+ generic dependency injection package based on type reflection

di A (very) WIP Go 1.18+ generic dependency injection package based on type refl

Apr 26, 2022
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite
Extremely flexible golang deep comparison, extends the go testing package, tests HTTP APIs and provides tests suite

go-testdeep Extremely flexible golang deep comparison, extends the go testing package. Latest news Synopsis Description Installation Functions Availab

Jan 5, 2023
Go library for HTTP content type negotiation

Content-Type support library for Go This library can be used to parse the value Content-Type header (if one is present) and select an acceptable media

Jul 10, 2022
Code generator that generates boilerplate code for a go http server

http-bootstrapper This is a code generator that uses go templates to generate a bootstrap code for a go http server. Usage Generate go http server cod

Nov 20, 2021
This is a simple HTTP application that returns system info

sysinfo This is a simple HTTP application that returns system info. Trace Support There is also simple OpenTelemetry tracing support via the -t flag.

Dec 25, 2022
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.
A full-featured license tool to check and fix license headers and resolve dependencies' licenses.

SkyWalking Eyes A full-featured license tool to check and fix license headers and resolve dependencies' licenses. Usage You can use License-Eye in Git

Dec 26, 2022
A Go (golang) library for parsing and verifying versions and version constraints.

go-version is a library for parsing versions and version constraints, and verifying versions against a set of constraints. go-version can sort a collection of versions properly, handles prerelease/beta versions, can increment versions, etc.

Jan 9, 2023
🤖🤝A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Dealbot A tool to test and analyze storage and retrieval deal capability on the Filecoin network. Getting Started Clone the repo and build: git clone

Sep 10, 2022
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.
Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Jan 2, 2023
CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON.

Cuetils CUE utilities and helpers for working with tree based objects in any combination of CUE, Yaml, and JSON. Using As a command line binary The cu

Dec 24, 2022
Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format

Go-Hex Hex dump and read values of files quickly and swiftly with Go-Hex a program designed to dump any file in a hexadecimal format Dump Hashes ----

Oct 10, 2021
A process that receives probe information and stores it in a database for reporting and analysis

probed is a process that receives probe information and stores it in a database for reporting and analysis.

Nov 2, 2022
Golang: unify nil and empty slices and maps

unifynil, unify nil and empty slices and maps in Golang Empty slices and maps can be nil or not nil in Go. It may become a nightmare in tests and JSON

Jan 16, 2022
🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.

?? github.com/elliotchance/pie Enjoy a slice! pie is a library of utility functions for common operations on slices and maps. Quick Start FAQ What are

Dec 30, 2022
Code Generation for Functional Programming, Concurrency and Generics in Golang

goderive goderive derives mundane golang functions that you do not want to maintain and keeps them up to date. It does this by parsing your go code fo

Dec 25, 2022
Implementation of do255e and do255s in Go

Go Implementation of do255e and do255s This is a plain Go implementation of do255e and do255s. It is considered secure; all relevant functions should

Aug 15, 2022
MemBi is all the members of bugbounty and infosec project.
MemBi is all the members of bugbounty and infosec project.

Member of Bugbounty and Infosec ?? What is MemBi? MemBi is all the members of bugbounty and infosec project. If you don't know who to follow, see! ??

Sep 23, 2022
sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine.

sigurls is a reconnaissance tool, it fetches URLs from AlienVault's OTX, Common Crawl, URLScan, Github and the Wayback Machine. DiSCLAIMER: fe

May 22, 2021
A tool and library for using structural regular expressions.

Structural Regular Expressions sregx is a package and tool for using structural regular expressions as described by Rob Pike (link).

Dec 7, 2022