lzr

package module
v0.0.0-...-e6546eb Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

README

LZR-v6

Derived from github.com/stanford-esrg/lzr, under development and test

Building

Install and set up ZMap. If also performing full L7 handshakes, set up ZGrab.

Set up $GOPATH (see https://golang.org/doc/code.html).

$ go get github.com/MonusW/lzr-v6
$ cd $GOPATH/src/github.com/MonusW/lzr-v6

LZR intercepts connections which ZMap opens; in order to ensure that the kernel does not interfere with LZR, LZR requires a source-ip to be specified for which the kernel drops all RSTs for traffic targeted to the source-ip. The chosen source-ip—which both ZMap and LZR will use—should be passed in as a parameter to make, so the appropriate iptables rule can be set.

$ make all source-ip=256.256.256.256/32

Usage

To enable IPv6 support just add a -6 flag

sudo ./lzr -6 ...

See README-origin.md, for detailed usage.

Documentation

Overview

Copyright 2020 The Board of Trustees of The Leland Stanford Junior University

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.

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

View Source
var (
	ACK     string = "ack"
	SYN_ACK string = "sa"
	DATA    string = "data"
)
View Source
var SHARD_COUNT = 4096

Functions

func AddHandshake

func AddHandshake(name string, h Handshake)

func ConstructIncomingRoutine

func ConstructIncomingRoutine(workers int) chan *packet_metadata

func ConstructPacketStateMap

func ConstructPacketStateMap(opts *options) pState

keeps state by storing the packet that was received * and within the packet stores the expected response. * storing received as to what was sent b/c want to know * perhaps need to wait some more

func ConstructPcapRoutine

func ConstructPcapRoutine(workers int) chan *packet_metadata

func ConstructRetransmitQueue

func ConstructRetransmitQueue(workers int) chan *packet_metadata

TimeoutQueueStuff TODO:need to move

func ConstructTimeoutQueue

func ConstructTimeoutQueue(workers int) chan *packet_metadata

TimeoutQueueStuff TODO:need to move

func ConstructWritingQueue

func ConstructWritingQueue(workers int) chan packet_metadata

func DebugOn

func DebugOn() bool

func FeedZGrab

func FeedZGrab() bool

func ForceAllHandshakes

func ForceAllHandshakes() bool

func GetAllHandshakes

func GetAllHandshakes() []string

func GetFingerprints

func GetFingerprints() map[string]int

func HandlePcap

func HandlePcap(opts *options, packet *packet_metadata, ipMeta *pState, timeoutQueue chan *packet_metadata,
	retransmitQueue chan *packet_metadata, writingQueue chan packet_metadata)

func HandleTimeout

func HandleTimeout(opts *options, packet *packet_metadata, ipMeta *pState,
	timeoutQueue chan *packet_metadata, retransmitQueue chan *packet_metadata,
	writingQueue chan packet_metadata)

func HyperACKtiveFiltering

func HyperACKtiveFiltering() bool

func InitFile

func InitFile(fname string) *output_file

func InitParams

func InitParams()

func NewpState

func NewpState() pState

Creates a new concurrent map.

func Parse

func Parse() (*options, bool)

func PollTimeoutRoutine

func PollTimeoutRoutine(ipMeta *pState, timeoutQueue chan *packet_metadata, retransmitQueue chan *packet_metadata,
	workers int, timeoutT int, timeoutR int) chan *packet_metadata

func PushDOnly

func PushDOnly() bool

func ReadLayers

func ReadLayers(iplayerInfo *iplayer_info, tcp *layers.TCP, eth *layers.Ethernet) *packet_metadata

func ReadZMap

func ReadZMap() bool

func SendAck

func SendAck(opts *options, synack *packet_metadata, ipMeta *pState,
	timeoutQueue chan *packet_metadata, retransmitQueue chan *packet_metadata,
	writingQueue chan packet_metadata, toACK bool, toPUSH bool, expectedResponse string)

func SendSyn

func SendSyn(packet *packet_metadata, ipMeta *pState,
	timeoutQueue chan *packet_metadata)

func Summarize

func Summarize(t time.Duration)

Types

type Handshake

type Handshake interface {

	//get Data to send in first packet
	GetData(dst string) []byte
	//verify the protocol from response
	Verify(data string) string
}

func GetHandshake

func GetHandshake(name string) (Handshake, bool)

Jump to

Keyboard shortcuts

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