Skip to content

Commit 539c2dd

Browse files
committed
Merge branch 'dev'
2 parents 2dddf7f + a7fe48c commit 539c2dd

File tree

15 files changed

+156
-115
lines changed

15 files changed

+156
-115
lines changed

.github/docker/client/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Base
2-
FROM golang:1.20.4-alpine AS builder
2+
FROM golang:1.20.5-alpine AS builder
33
RUN apk add --no-cache git build-base gcc musl-dev
44
WORKDIR /app
55
COPY . /app
66
RUN go mod download
77
RUN go build ./cmd/interactsh-client
88

99
# Release
10-
FROM alpine:3.18.0
10+
FROM alpine:3.18.2
1111
RUN apk -U upgrade --no-cache \
1212
&& apk add --no-cache bind-tools ca-certificates
1313
COPY --from=builder /app/interactsh-client /usr/local/bin/

.github/docker/server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Base
2-
FROM golang:1.20.4-alpine AS builder
2+
FROM golang:1.20.5-alpine AS builder
33
RUN apk add --no-cache git build-base gcc musl-dev
44
WORKDIR /app
55
COPY . /app
@@ -8,7 +8,7 @@ RUN go build ./cmd/interactsh-server
88

99

1010
# Release
11-
FROM alpine:3.18.0
11+
FROM alpine:3.18.2
1212
RUN apk -U upgrade --no-cache \
1313
&& apk add --no-cache bind-tools ca-certificates python3 libffi curl \
1414
&& apk add --no-cache --virtual .build-deps python3-dev py3-pip py3-wheel libffi-dev build-base \

.github/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
categories:
6+
- title: 🎉 Features
7+
labels:
8+
- "Type: Enhancement"
9+
- title: 🐞 Bugs
10+
labels:
11+
- "Type: Bug"
12+
- title: 🔨 Maintenance
13+
labels:
14+
- "Type: Maintenance"
15+
- title: Other Changes
16+
labels:
17+
- "*"

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [ubuntu-latest-16-cores, windows-latest-8-cores, macOS-latest]
16+
os: [ubuntu-latest, windows-latest, macOS-latest]
1717
steps:
1818
- name: Set up Go
1919
uses: actions/setup-go@v4

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
analyze:
1414
name: Analyze
15-
runs-on: ubuntu-latest-16-cores
15+
runs-on: ubuntu-latest
1616
permissions:
1717
actions: read
1818
contents: read

.github/workflows/lint-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
lint:
1212
name: Lint Test
13-
runs-on: ubuntu-latest-16-cores
13+
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout code
1616
uses: actions/checkout@v3
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
go-version: 1.20.x
2121
- name: Run golangci-lint
22-
uses: golangci/golangci-lint-action@v3.4.0
22+
uses: golangci/golangci-lint-action@v3.6.0
2323
with:
2424
version: latest
2525
args: --timeout 5m

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ UPDATE:
8181
-duc, -disable-update-check disable automatic interactsh-client update check
8282

8383
OUTPUT:
84-
-o string output file to write interaction data
85-
-json write output in JSONL(ines) format
86-
-v display verbose interaction
84+
-o string output file to write interaction data
85+
-json write output in JSONL(ines) format
86+
-ps, -payload-store enable storing generated interactsh payload to file
87+
-psf, -payload-store-file string store generated interactsh payloads to given file (default "interactsh_payload.txt")
88+
-v display verbose interaction
8789

8890
DEBUG:
8991
-version show version of the project

cmd/interactsh-client/main.go

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"os/signal"
88
"path/filepath"
99
"regexp"
10+
"strings"
1011
"time"
1112

1213
jsoniter "github.com/json-iterator/go"
@@ -70,6 +71,9 @@ func main() {
7071
flagSet.CreateGroup("output", "Output",
7172
flagSet.StringVar(&cliOptions.Output, "o", "", "output file to write interaction data"),
7273
flagSet.BoolVar(&cliOptions.JSON, "json", false, "write output in JSONL(ines) format"),
74+
flagSet.BoolVarP(&cliOptions.StorePayload, "payload-store", "ps", false, "write generated interactsh payload to file"),
75+
flagSet.StringVarP(&cliOptions.StorePayloadFile, "payload-store-file", "psf", settings.StorePayloadFileDefault, "store generated interactsh payloads to given file"),
76+
7377
flagSet.BoolVar(&cliOptions.Verbose, "v", false, "display verbose interaction"),
7478
)
7579

@@ -138,9 +142,17 @@ func main() {
138142
gologger.Fatal().Msgf("Could not create client: %s\n", err)
139143
}
140144

145+
interactshURLs := generatePayloadURL(cliOptions.NumberOfPayloads, client)
146+
141147
gologger.Info().Msgf("Listing %d payload for OOB Testing\n", cliOptions.NumberOfPayloads)
142-
for i := 0; i < cliOptions.NumberOfPayloads; i++ {
143-
gologger.Info().Msgf("%s\n", client.URL())
148+
for _, interactshURL := range interactshURLs {
149+
gologger.Info().Msgf("%s\n", interactshURL)
150+
}
151+
152+
if cliOptions.StorePayload && cliOptions.StorePayloadFile != "" {
153+
if err := os.WriteFile(cliOptions.StorePayloadFile, []byte(strings.Join(interactshURLs, "\n")), 0644); err != nil {
154+
gologger.Fatal().Msgf("Could not write to payload output file: %s\n", err)
155+
}
144156
}
145157

146158
// show all interactions
@@ -257,6 +269,14 @@ func main() {
257269
}
258270
}
259271

272+
func generatePayloadURL(numberOfPayloads int, client *client.Client) []string {
273+
interactshURLs := make([]string, numberOfPayloads)
274+
for i := 0; i < numberOfPayloads; i++ {
275+
interactshURLs[i] = client.URL()
276+
}
277+
return interactshURLs
278+
}
279+
260280
func writeOutput(outputFile *os.File, builder *bytes.Buffer) {
261281
if outputFile != nil {
262282
_, _ = outputFile.Write(builder.Bytes())

cmd/interactsh-server/main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,15 @@ func main() {
142142

143143
if cliOptions.IPAddress == "" && cliOptions.ListenIP == "0.0.0.0" {
144144
publicIP, _ := getPublicIP()
145-
gologger.Info().Msgf("Public IP: %s\n", publicIP)
146145
outboundIP, _ := iputil.GetSourceIP("scanme.sh")
146+
147+
if publicIP == "" && outboundIP == nil {
148+
gologger.Fatal().Msgf("Could not determine public IP address\n")
149+
}
150+
if publicIP == "" && outboundIP != nil {
151+
publicIP = outboundIP.String()
152+
}
153+
gologger.Info().Msgf("Public IP: %s\n", publicIP)
147154
gologger.Info().Msgf("Outbound IP: %s\n", outboundIP)
148155
// it's essential to be able to bind to cliOptions.DnsPort on any of the two ips
149156
bindableIP, err := iputil.GetBindableAddress(cliOptions.DnsPort, publicIP, outboundIP.String())

deploy/deploy.yaml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
become: true
33
vars:
44
container_name: "interactsh"
5-
container_tag: "v1.1.2"
5+
container_tag: "v1.1.5"
66
container_image: "projectdiscovery/interactsh-server:{{container_tag}}"
77
container_command: "-dr -d {{domain_name}} -metrics"
88
certmagic_host_path: "/root/.local/share/certmagic"
@@ -12,7 +12,9 @@
1212
name: aptitude
1313
state: latest
1414
update_cache: true
15-
tags: apt
15+
tags:
16+
- apt
17+
- setup
1618

1719
- name: Install required system packages
1820
apt:
@@ -28,32 +30,42 @@
2830
- gnupg
2931
state: latest
3032
update_cache: true
31-
tags: apt
33+
tags:
34+
- apt
35+
- setup
3236

3337

3438
- name: Add Docker GPG apt Key
3539
apt_key:
3640
url: https://download.docker.com/linux/{{ ansible_distribution | lower }}/gpg
3741
state: present
38-
tags: docker
42+
tags:
43+
- docker
44+
- setup
3945

4046
- name: Add Docker Repository
4147
apt_repository:
4248
repo: deb https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
4349
state: present
44-
tags: docker
50+
tags:
51+
- docker
52+
- setup
4553

4654
- name: Update apt and install docker-ce
4755
apt:
4856
name: docker-ce
4957
state: latest
5058
update_cache: true
51-
tags: docker
59+
tags:
60+
- docker
61+
- setup
5262

5363
- name: Install Docker Module for Python
5464
pip:
5565
name: docker
56-
tags: docker
66+
tags:
67+
- docker
68+
- setup
5769

5870
- name: Make sure certmagic directory is created
5971
file:
@@ -67,7 +79,9 @@
6779
community.docker.docker_image:
6880
name: "{{ container_image }}"
6981
source: pull
70-
tags: deploy
82+
tags:
83+
- deploy
84+
- pull
7185

7286
- name: Launch interactsh docker container
7387
community.docker.docker_container:
@@ -77,9 +91,11 @@
7791
memory: "4g"
7892
memory_swap: "-1"
7993
network_mode: host
80-
restart: true
94+
restart: true # always restart the container
8195
restart_policy: "unless-stopped"
8296
volumes:
8397
- "{{certmagic_host_path}}:{{certmagic_host_path}}"
8498
state: started
85-
tags: deploy
99+
tags:
100+
- deploy
101+
- test

go.mod

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,29 @@ require (
66
git.mills.io/prologic/smtpd v0.0.0-20210710122116-a525b76c287a
77
github.com/Mzack9999/ldapserver v1.0.2-0.20211229000134-b44a0d6ad0dd
88
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
9-
github.com/caddyserver/certmagic v0.17.2
9+
github.com/caddyserver/certmagic v0.18.2
1010
github.com/docker/go-units v0.5.0
1111
github.com/goburrow/cache v0.1.4
1212
github.com/google/uuid v1.3.0
1313
github.com/json-iterator/go v1.1.12
1414
github.com/libdns/libdns v0.2.1
1515
github.com/mackerelio/go-osstat v0.2.4
16-
github.com/miekg/dns v1.1.54
16+
github.com/miekg/dns v1.1.55
1717
github.com/pkg/errors v0.9.1
1818
github.com/projectdiscovery/asnmap v1.0.4
19-
github.com/projectdiscovery/goflags v0.1.8
19+
github.com/projectdiscovery/goflags v0.1.10
2020
github.com/projectdiscovery/gologger v1.1.10
21-
github.com/projectdiscovery/retryabledns v1.0.24
22-
github.com/projectdiscovery/retryablehttp-go v1.0.16
23-
github.com/projectdiscovery/utils v0.0.32
21+
github.com/projectdiscovery/retryabledns v1.0.30
22+
github.com/projectdiscovery/retryablehttp-go v1.0.18
23+
github.com/projectdiscovery/utils v0.0.39
2424
github.com/remeh/sizedwaitgroup v1.0.0
2525
github.com/rs/xid v1.5.0
26-
github.com/stretchr/testify v1.8.3
26+
github.com/stretchr/testify v1.8.4
2727
github.com/syndtr/goleveldb v1.0.0
2828
go.uber.org/multierr v1.11.0
2929
go.uber.org/ratelimit v0.2.0
3030
go.uber.org/zap v1.24.0
31-
goftp.io/server/v2 v2.0.0
31+
goftp.io/server/v2 v2.0.1
3232
gopkg.in/corvus-ch/zbase32.v1 v1.0.0
3333
gopkg.in/yaml.v3 v3.0.1
3434
)
@@ -54,16 +54,17 @@ require (
5454
github.com/google/go-github/v30 v30.1.0 // indirect
5555
github.com/google/go-querystring v1.1.0 // indirect
5656
github.com/gorilla/css v1.0.0 // indirect
57-
github.com/klauspost/cpuid/v2 v2.1.1 // indirect
57+
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
58+
github.com/kr/pretty v0.3.1 // indirect
5859
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
5960
github.com/lor00x/goldap v0.0.0-20180618054307-a546dffdd1a3 // indirect
6061
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
6162
github.com/mattn/go-colorable v0.1.13 // indirect
6263
github.com/mattn/go-isatty v0.0.17 // indirect
6364
github.com/mattn/go-runewidth v0.0.14 // indirect
64-
github.com/mholt/acmez v1.0.4 // indirect
65+
github.com/mholt/acmez v1.2.0 // indirect
6566
github.com/mholt/archiver v3.1.1+incompatible // indirect
66-
github.com/microcosm-cc/bluemonday v1.0.23 // indirect
67+
github.com/microcosm-cc/bluemonday v1.0.24 // indirect
6768
github.com/minio/selfupdate v0.6.0 // indirect
6869
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6970
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -81,15 +82,15 @@ require (
8182
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
8283
github.com/yuin/goldmark v1.5.4 // indirect
8384
github.com/yuin/goldmark-emoji v1.0.1 // indirect
84-
go.uber.org/atomic v1.10.0 // indirect
85-
golang.org/x/crypto v0.7.0 // indirect
85+
go.uber.org/atomic v1.11.0 // indirect
86+
golang.org/x/crypto v0.10.0 // indirect
8687
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect
87-
golang.org/x/mod v0.9.0 // indirect
88-
golang.org/x/net v0.10.0 // indirect
89-
golang.org/x/oauth2 v0.8.0 // indirect
90-
golang.org/x/sys v0.8.0 // indirect
91-
golang.org/x/text v0.9.0 // indirect
92-
golang.org/x/tools v0.7.0 // indirect
88+
golang.org/x/mod v0.11.0 // indirect
89+
golang.org/x/net v0.11.0 // indirect
90+
golang.org/x/oauth2 v0.9.0 // indirect
91+
golang.org/x/sys v0.9.0 // indirect
92+
golang.org/x/text v0.10.0 // indirect
93+
golang.org/x/tools v0.10.0 // indirect
9394
google.golang.org/appengine v1.6.7 // indirect
9495
google.golang.org/protobuf v1.28.1 // indirect
9596
gopkg.in/djherbis/times.v1 v1.3.0 // indirect

0 commit comments

Comments
 (0)