ssh_probe

package
v0.0.0-...-f0a4a60 Latest Latest
Warning

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

Go to latest
Published: May 9, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Copyright © 2020 GUILLAUME FOURNIER

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatadogLogs

type DatadogLogs struct {
	EventChan chan interface{}
	// contains filtered or unexported fields
}

DatadogLogs Datadog logs forwarder

func (*DatadogLogs) Start

func (dl *DatadogLogs) Start(agentURL string) error

Start sets up communication with the Datadog agent

func (*DatadogLogs) Stop

func (dl *DatadogLogs) Stop() error

Stop stops the logs forwarder

type SSHProbe

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

SSHProbe is the main structure of the ssh probe project

func NewSSHProbe

func NewSSHProbe(profiles string, accessControlEventsLevel model.Action, disableGlobalScope bool, agentURL string) (*SSHProbe, error)

NewSSHProbe parses the provided profiles and creates a new ssh-probe instance

func (*SSHProbe) CacheInode

func (sshp *SSHProbe) CacheInode(path string) (uint64, error)

CacheInode caches the inode of the provided path

func (*SSHProbe) Forward

func (sshp *SSHProbe) Forward(event interface{})

Forward forwards an event to Datadog

func (*SSHProbe) GetProfile

func (sshp *SSHProbe) GetProfile(cookie uint32) *model.Profile

GetProfile returns a profile by its cookie

func (*SSHProbe) HandleKillRequests

func (sshp *SSHProbe) HandleKillRequests(Cpu int, data []byte, perfMap *manager.PerfMap, m *manager.Manager)

HandleKillRequests handles process kill requests from the kernel

func (*SSHProbe) HandleNotifications

func (sshp *SSHProbe) HandleNotifications(Cpu int, data []byte, perfMap *manager.PerfMap, m *manager.Manager)

HandleNotifications handls a new notification from the kernel

func (*SSHProbe) HandleOTPRequests

func (sshp *SSHProbe) HandleOTPRequests(Cpu int, data []byte, perfMap *manager.PerfMap, m *manager.Manager)

HandleOTPRequests handles OTP requests from ssh-probe-auth

func (*SSHProbe) LostHandler

func (sshp *SSHProbe) LostHandler(CPU int, count uint64, perfMap *manager.PerfMap, manager *manager.Manager)

LostHandler logs lost samples from perf ring buffers

func (*SSHProbe) ResolveInode

func (sshp *SSHProbe) ResolveInode(ino uint64) (string, bool)

ResolveInode returns the path of the provided inode

func (*SSHProbe) Start

func (sshp *SSHProbe) Start() error

Start ssh-probe

func (*SSHProbe) Stop

func (sshp *SSHProbe) Stop() error

Stop ssh-probe

Jump to

Keyboard shortcuts

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