Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joanbono/gottern
Golang port for Metasploit's pattern_create and pattern_offset
https://github.com/joanbono/gottern
buffer-overflow exploit-development go golang metasploit oscp oscp-tools pattern-create pattern-offset
Last synced: 4 days ago
JSON representation
Golang port for Metasploit's pattern_create and pattern_offset
- Host: GitHub
- URL: https://github.com/joanbono/gottern
- Owner: joanbono
- License: apache-2.0
- Created: 2019-02-23T19:23:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-03-07T12:24:18.000Z (almost 4 years ago)
- Last Synced: 2024-05-02T04:39:38.569Z (9 months ago)
- Topics: buffer-overflow, exploit-development, go, golang, metasploit, oscp, oscp-tools, pattern-create, pattern-offset
- Language: Go
- Size: 1.75 MB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
![](img/Gottern_banner.png)
[![GitHub Issues](https://img.shields.io/github/issues/joanbono/gottern.svg)](https://github.com/joanbono/gottern/issues)
[![GitHub tag](https://img.shields.io/github/tag/joanbono/gottern.svg)](https://github.com/joanbono/gottern/tags)
[![Go Version](https://img.shields.io/badge/go-1.13.7-blue.svg?logo=go)](https://golang.org/dl/)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Go Report Card](https://goreportcard.com/badge/github.com/joanbono/gottern)](https://goreportcard.com/report/github.com/joanbono/gottern)Golang port for Metasploit's `pattern_create` and `pattern_offset`.
Based on [`haxpattern`](https://github.com/DharmaOfCode/haxpattern)## Usage
```bash
$ gottern help
Pattern Offset Seeker and Pattern CreatorUsage:
Gottern [command]Available Commands:
create Create the pattern
help Help about any command
offset Search for an offset
version Prints current Gottern versionFlags:
-h, --help help for GotternUse "Gottern [command] --help" for more information about a command.
```
### Create a patternCreate a pattern using the `create` flag with the size (`-l`) of the pattern to be created.
```bash
$ gottern create -h
Create the patternUsage:
Gottern create [flags]Flags:
-h, --help help for create
-l, --length int Lenght of the string to be created$ gottern create -l 200
Aa0Aa1Aa2Aa3Aa4A[...]g1Ag2Ag3Ag4Ag5Ag
```### Look for an offset
Search an offset using the `offset` flag with the query to perform (`-q`) of the pattern to be created. Use `-b` for big endian search.
```bash
$ gottern offset -h
Search for an offsetUsage:
Gottern offset [flags]Flags:
-b, --bigendian Search for Big Endian Offset
-h, --help help for offset
-q, --query string Query the following pattern. Minimum 4 bytes.
```Examples:
```bash
# ASCII
$ gottern offset -q 6Aj7
[*] 290
# Plain HEX
$ gottern offset -q 0x36416a37
[*] 290
# Little Endian HEX
$ gottern offset -q 376a4136
[*] 290
# Big Endian HEX
$ gottern offset -q 36416a37 -b
[*] 290
```***
## Benchmarks
Some benchmarks using [`hyperfine`](https://github.com/sharkdp/hyperfine).
### Create a Pattern
![](img/benchmark_create.png)
### Find an offset
![](img/benchmark_offset.png)