Golang CTF framework and exploit development module

gopwn

Build Status Go Reference

Golang CTF framework and exploit development module

This module is strictly for educational purposes only. Usage of the methods and tools for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable laws. Developers assume no liability and are not responsible for any misuse or damage caused by this module.

⚠️ This is experimental and subject to breaking changes.

Usage

package main

import (
  "bytes"
  "fmt"

  "github.com/hupe1980/gopwn"
)

func main() {
  p, _ := gopwn.NewProcess([]string{"./ctfbinary"})
  p.SendLine(append(bytes.Repeat([]byte("A"), 200), gopwn.P32L(0xdeadbeef)...))
  out, _ := p.RecvLine()
  fmt.Println(string(out))
}

Packing Integers

//32Bit LittelEndian
b := gopwn.P32L(0xdeadbeef)
assert.Equal(t, []byte("\xef\xbe\xad\xde"), b) // true
i := gopwn.U32L([]byte("\xef\xbe\xad\xde"))
assert.Equal(t, uint32(0xdeadbeef), i) // true

Assembly and Disassembly

insn, _ := gopwn.AssembleI386("mov eax, 0")
fmt.Println(gopwn.HexString(insn))

Outputs:

b800000000
assembly, _ := gopwn.DisamI386([]byte("\xb8\x5d\x00\x00\x00"), 0)
fmt.Println(assembly)

Outputs:

0x0           b8 5d 00 00 00                mov eax, 0x5d

Misc Tools

Generate unique sequences to find offsets in your buffer causing a crash:

assert.Equal(t, []byte("aaaabaaacaaadaaa"), gopwn.Cyclic(16)) // true
assert.Equal(t, 4, gopwn.CyclicFind([]byte("baaa")) // true

Binary Analysis and Manipulation

elf, _ := gopwn.NewELF("./ctfbinary")
pe, _ := gopwn.NewPE("./ctfbinary.exe")
macho, _ := gopwn.NewMACHO("./ctfbinary")

Documentation

See godoc.

Examples

See more complete examples.

CLI

gopwn command-line interface

Usage:
  gopwn [command]

Available Commands:
  cave        Search for code caves
  checksec    Check binary security settings
  completion  Prints shell autocompletion scripts for gopwn
  cyclic      Generation of unique sequences
  help        Help about any command

Flags:
  -h, --help      help for gopwn
  -v, --version   version for gopwn

Use "gopwn [command] --help" for more information about a command.

Installing

You can install the pre-compiled binary in several different ways

deb/rpm/apk:

Download the .deb, .rpm or .apk from the releases page and install them with the appropriate tools.

manually:

Download the pre-compiled binaries from the releases page and copy to the desired location.

License

MIT

Owner
Frank Hübner
There is no compression algorithm for experience.
Frank Hübner
Similar Resources

A small and evil REST framework for Go

go-rest A small and evil REST framework for Go Reflection, Go structs, and JSON marshalling FTW! go get github.com/ungerik/go-rest import "github.com/

Dec 6, 2022

Mango is a modular web-application framework for Go, inspired by Rack, and PEP333.

Mango Mango is a modular web-application framework for Go, inspired by Rack and PEP333. Note: Not actively maintained. Overview Mango is most of all a

Nov 17, 2022

An ideally refined web framework for Go.

Air An ideally refined web framework for Go. High-performance? Fastest? Almost all web frameworks are using these words to tell people that they are t

Dec 15, 2022

Web framework for creating apps using Go in Google AppEngine

Welcome to app.go v3.0 app.go is a simple web framework for use in Google AppEngine. Just copy the app folder to your working folder and import it fro

Mar 21, 2021

Goldorak GO is a mini framework for the Go programming language. (unfinished dead code)

Goldorak Go =========== Goldorak GO ! Rétrolaser en action Goldorak GO !! Va accomplir ta mission Dans l'infini Des galaxies Poursuis ta lu

Apr 29, 2021

A high level web-framework for Go

go-start is a high level web-framework for Go, like Django for Python or Rails for Ruby. Installation: go get github.com/ungerik/go-start Documentatio

Dec 24, 2022

A lightweight RESTful web framework for Go

A lightweight RESTful web framework for Go

Goweb A lightweight RESTful web framework for Go. For examples and usage, please read the Goweb API Documentation Read our Articles Who uses Goweb? "U

Dec 12, 2022

Classy web framework for Go

Martini NOTE: The martini framework is no longer maintained. Martini is a powerful package for quickly writing modular web applications/services in Go

Dec 29, 2022

A Go framework for building JSON web services inspired by Dropwizard

Tiger Tonic A Go framework for building JSON web services inspired by Dropwizard. If HTML is your game, this will hurt a little. Like the Go language

Dec 9, 2022
Comments
  • go build error

    go build error

    go build github.com/knightsc/gapstone: build constraints exclude all Go files in C:\Users\admin\go\pkg\mod\github.com\knightsc\[email protected]+incompatible

    github.com/keystone-engine/keystone/bindings/go/keystone

    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm64_const.go:5:31: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm64_const.go:6:31: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm64_const.go:7:29: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm_const.go:5:29: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm_const.go:6:29: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\arm_const.go:7:27: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\evm_const.go:5:29: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\evm_const.go:6:29: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\evm_const.go:7:27: undefined: Error
    C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\hexagon_const.go:5:33: undefined: Error C:\Users\admin\go\pkg\mod\github.com\keystone-engine\[email protected]\bindings\go\keystone\hexagon_const.go:5:33: too many errors PS D:\go\gopwn>

Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.
Flamingo Framework and Core Library. Flamingo is a go based framework for pluggable web projects. It is used to build scalable and maintainable (web)applications.

Flamingo Framework Flamingo is a web framework based on Go. It is designed to build pluggable and maintainable web projects. It is production ready, f

Jan 5, 2023
Golanger Web Framework is a lightweight framework for writing web applications in Go.

/* Copyright 2013 Golanger.com. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except

Nov 14, 2022
Fast and Reliable Golang Web Framework
Fast and Reliable Golang Web Framework

Gramework The Good Framework Gramework long-term testing stand metrics screenshot made with Gramework Stats Dashboard and metrics middleware What is i

Dec 18, 2022
Eudore is the core of a golang lightweight web framework.

Eudore eudore是一个golang轻量级web框架核心,可以轻松扩展成一个技术栈专用框架,具有完整框架设计体系。 反馈和交流请加群组:QQ群373278915。 Features 易扩展:主要设计目标、核心全部解耦,接口即为逻辑。 简单:对象语义明确,框架代码量少复杂度低,无依赖库。 易用

Nov 7, 2022
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

Gin Web Framework Gin is a web framework written in Go (Golang). It features a martini-like API with performance that is up to 40 times faster thanks

Jan 2, 2023
a golang web mvc framework, like asp.net mvc.

goku goku is a Web Mvc Framework for golang, mostly like ASP.NET MVC. doc & api Installation To install goku, simply run go get github.com/QLeelulu/go

Dec 7, 2022
🍐 Elegant Golang REST API Framework
🍐 Elegant Golang REST API Framework

An Elegant Golang Web Framework Goyave is a progressive and accessible web application framework focused on REST APIs, aimed at making backend develop

Jan 4, 2023
The web framework for Golang
The web framework for Golang

uAdmin the Golang Web Framework Easy to use, blazing fast and secure. Originally open source by IntegrityNet Solutions and Services For Documentation:

Dec 24, 2022
A lightweight MVC framework for Go(Golang)

utron utron is a lightweight MVC framework in Go (Golang) for building fast, scalable and robust database-driven web applications. Features Postgres,

Dec 31, 2022
A simple blog framework built with GO. Uses HTML files and a JSON dict to give you more control over your content.

Go-Blog A simple template based blog framework. Instructions Built for GO version: 1 See the Documentation or Getting Started pages in the wiki. Notes

Sep 10, 2022