tracking

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: BSD-3-Clause Imports: 20 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// Name of this module
	Name = "tracker"

	// Description of this module
	Description = "Uniquely track clients via unique identifiers, while harvesting for web credentials and sessions"

	// Author of this module
	Author = "Muraena Team"
)

Variables

View Source
var DisabledExtensions = strings.Split(strings.ToLower(blockExtension), ",")
View Source
var DisabledMedia = strings.Split(strings.ToLower(blockMedia), ",")

Functions

func GetRealAddr added in v1.21.1

func GetRealAddr(r *http.Request) net.IP

GetRealAddr returns the IP address from an http.Request

func InnerSubstring

func InnerSubstring(str string, prefix string, suffix string) string

InnerSubstring returns the string contained between prefix and suffix

Types

type LandingType added in v1.21.1

type LandingType int
const (
	LandingPath LandingType = iota
	LandingQuery
)

type Trace

type Trace struct {
	*Tracker
	ID string
}

Trace object structure

func (*Trace) ExtractCredentials

func (t *Trace) ExtractCredentials(body string, request *http.Request) (found bool, err error)

ExtractCredentials extracts credentials from a request body and stores within a VictimCredentials object

func (*Trace) ExtractCredentialsFromResponseHeaders added in v1.21.1

func (t *Trace) ExtractCredentialsFromResponseHeaders(response *http.Response) (found bool, err error)

ExtractCredentialsFromResponseHeaders extracts tracking credentials from response headers. It returns true if credentials are found, false otherwise.

func (*Trace) HijackSession

func (t *Trace) HijackSession(request *http.Request) (err error)

HijackSession If the request URL matches those defined in authSession in the config, then pass the cookies in the CookieJar to necrobrowser to hijack the session

func (*Trace) IsValid

func (t *Trace) IsValid() bool

IsValid validates the tracking value

type Tracker

type Tracker struct {
	session.SessionModule

	Enabled        bool
	Type           LandingType
	Identifier     string
	Header         string
	LandingHeader  string
	ValidatorRegex *regexp.Regexp
	TrackerLength  int
}

Tracker module

func Load

func Load(s *session.Session) (m *Tracker, err error)

Load configures the module by initializing its main structure and variables

func (*Tracker) Author

func (module *Tracker) Author() string

Author returns the module author

func (*Tracker) Description

func (module *Tracker) Description() string

Description returns the module description

func (*Tracker) ExportSession added in v1.21.1

func (module *Tracker) ExportSession(id string)

ExportSession prints the list of victims

func (*Tracker) GetVictim

func (module *Tracker) GetVictim(t *Trace) (v *db.Victim, err error)

func (*Tracker) IsEnabled

func (module *Tracker) IsEnabled() bool

IsEnabled returns a boolead to indicate if the module is enabled or not

func (*Tracker) Name

func (module *Tracker) Name() string

Name returns the module name

func (*Tracker) Prompt added in v0.1.2

func (module *Tracker) Prompt()

Prompt prints module status based on the provided parameters

func (*Tracker) PushCookie added in v1.21.1

func (module *Tracker) PushCookie(victim *db.Victim, cookie db.VictimCookie)

PushCookie stores a Cookie in the database. If the cookie exists, it will be overridden

func (*Tracker) PushVictim added in v1.21.1

func (module *Tracker) PushVictim(v *db.Victim)

PushVictim stores a Victim in the database

func (*Tracker) ShowCredentials

func (module *Tracker) ShowCredentials()

ShowCredentials prints the credentials in the CLI

func (*Tracker) ShowVictims

func (module *Tracker) ShowVictims()

ShowVictims prints the list of victims

func (*Tracker) TrackRequest

func (module *Tracker) TrackRequest(request *http.Request) (t *Trace)

TrackRequest tracks an HTTP RequestTemplate

func (*Tracker) TrackResponse

func (module *Tracker) TrackResponse(response *http.Response) (t *Trace)

TrackResponse tracks an HTTP Response func (module *Tracker) TrackResponse(response *http.Response) (victim *db.Victim) {

Jump to

Keyboard shortcuts

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