Categorygithub.com/RSSU-Shellcode/SSCE
repositorypackage
0.0.0-20250106081144-2da3c40e8f6f
Repository: https://github.com/rssu-shellcode/ssce.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

SSCE

A simple shellcode encoder, build and erase decoder at runtime and erase shellcode after execution.

Usage

ssce -arch 64 -i shellcode.bin -o shellcode_x64.bin

Development

package main

import (
    "encoding/hex"
    "fmt"
    "os"

    "github.com/RSSU-Shellcode/SSCE"
)

func main() {
    encoder := ssce.NewEncoder(0)

    shellcode, err := os.ReadFile("shellcode.bin")
    checkError(err)

    opts := ssce.Options{
        NumIterator: 4,
        NumTailInst: 64,
        MinifyMode:  false,
        SaveContext: false,
        EraseInst:   false,
        NoIterator:  false,
        NoGarbage:   false,
    }

    shellcode, err = encoder.Encode(shellcode, 64, &opts)
    checkError(err)

    out := hex.EncodeToString(shellcode)
    fmt.Println(out)

    err = encoder.Close()
    checkError(err)
}

func checkError(err error) {
    if err != nil {
        fmt.Println(err)
        os.Exit(1)
    }
}