command

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PatternCommand = &artillery.Command{
	Name:        "pattern",
	Description: "pattern generation / offset detection",
	SubCommands: []*artillery.Command{
		{
			Name:        "create",
			Description: "create an n-byte length pattern suitable for offset detection",
			Arguments: []*artillery.Argument{
				{
					Name:        "length",
					Description: "number of bytes to generate",
					Type:        artillery.Int,
				},
			},
			Options: []*artillery.Option{
				{
					Name:        "fixed",
					ShortName:   'f',
					Description: "fixed portion of pattern for extra large buffers",
					Type:        artillery.Int,
				},
				{
					Name:        "char",
					ShortName:   'c',
					Description: "character to use for fixed portion of pattern",
					Type:        artillery.String,
				},
			},
			OnExecute: generateBytes,
		},
		{
			Name:        "offset",
			Description: "report offset given the supplied pattern fragement",
			Arguments: []*artillery.Argument{
				{
					Name:        "pattern",
					Description: "pattern fragment from which to calculate the offset",
				},
			},
			Options: []*artillery.Option{
				{
					Name:        "fixed",
					ShortName:   'f',
					Description: "number of fixed bytes used in pattern creation",
					Type:        artillery.Int,
				},
			},
			OnExecute: calculateOffset,
		},
	},
}
View Source
var PayloadCommand = &artillery.Command{
	Name:        "payload",
	Description: "generates a shellcode payload for a buffer overflow",
	Arguments: []*artillery.Argument{
		{
			Name:        "offset",
			Description: "buffer offset where return address will be written",
			Type:        artillery.Int,
		},
		{
			Name:        "returnAddress",
			Description: "return address in highest-to-lowest hex format (eg. \\xed\\x32\\x44\\x55)",
		},
		{
			Name:        "shellcode",
			Description: "shellcode in hex string format (eg. \\xed\\x32\\x44\\x55\\xed\\x32\\x44\\x55)",
		},
	},
	Options: []*artillery.Option{
		{
			Name:        "nsb",
			ShortName:   'n',
			Description: "number of nopsled bytes to insert (defaults to half the remaining buffer space)",
			Type:        artillery.Int,
		},
		{
			Name:        "hex",
			ShortName:   'h',
			Description: "output in hex format for visualization purposes",
			Type:        artillery.Bool,
			Value:       true,
		},
	},
	OnExecute: makePayload,
}
View Source
var Version string
View Source
var VersionCommand = &artillery.Command{
	Name:        "version",
	Description: "display version information",
	OnExecute: func(n artillery.Namespace, p *artillery.Processor) error {
		fmt.Println(Version)
		return nil
	},
}

Functions

This section is empty.

Types

type Iter

type Iter struct {
	// contains filtered or unexported fields
}

func NewIter

func NewIter() *Iter

func (*Iter) Next

func (iter *Iter) Next() byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL