Skip to content

Instantly share code, notes, and snippets.

@h3ku h3ku/Compile.txt
Last active Mar 27, 2018

What would you like to do?
Hook fail asserts to prevent false positives with AFL
go build -buildmode=c-shared -o main.go
Then just LD_PRELOAD the generated .so
package main
import (
func main() {}
//export __assert_fail
func __assert_fail() {
lib, err := dl.Open("libc", 0)
if err != nil {
defer lib.Close()
var exit_func func()
lib.Sym("exit", &exit_func)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.