Skip to content

Commit 4da329c

Browse files
Merge pull request #1317 from projectdiscovery/dev
interactsh v1.3.0
2 parents 0eb8a06 + 22b56b1 commit 4da329c

30 files changed

Lines changed: 1277 additions & 435 deletions

File tree

.github/workflows/stale.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 💤 Stale
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Weekly
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
actions: write
12+
contents: write # only for delete-branch option
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/stale@v10
17+
with:
18+
days-before-stale: 90
19+
days-before-close: 7
20+
stale-issue-label: "Status: Stale"
21+
stale-pr-label: "Status: Stale"
22+
stale-issue-message: >
23+
This issue has been automatically marked as stale because it has not
24+
had recent activity. It will be closed in 7 days if no further
25+
activity occurs. Thank you for your contributions!
26+
stale-pr-message: >
27+
This pull request has been automatically marked as stale due to
28+
inactivity. It will be closed in 7 days if no further activity
29+
occurs. Please update if you wish to keep it open.
30+
close-issue-message: >
31+
This issue has been automatically closed due to inactivity. If you
32+
think this is a mistake or would like to continue the discussion,
33+
please comment or feel free to reopen it.
34+
close-pr-message: >
35+
This pull request has been automatically closed due to inactivity.
36+
If you think this is a mistake or would like to continue working on
37+
it, please comment or feel free to reopen it.
38+
close-issue-label: "Status: Abandoned"
39+
close-pr-label: "Status: Abandoned"
40+
exempt-issue-labels: "Status: Abandoned"
41+
exempt-pr-labels: "Status: Abandoned"

README.md

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
# Features
2929

3030
- DNS/HTTP(S)/SMTP(S)/LDAP Interaction
31+
- IPv4 and IPv6 support
3132
- CLI / Web / Burp / ZAP / Docker client
3233
- AES encryption with zero logging
3334
- Automatic ACME based Wildcard TLS w/ Auto Renewal
@@ -65,8 +66,8 @@ CONFIG:
6566
-t, -token string authentication token to connect protected interactsh server
6667
-pi, -poll-interval int poll interval in seconds to pull interaction data (default 5)
6768
-nf, -no-http-fallback disable http fallback registration
68-
-cidl, -correlation-id-length int length of the correlation id preamble (default 20)
69-
-cidn, -correlation-id-nonce-length int length of the correlation id nonce (default 13)
69+
-cidl, -correlation-id-length int length of the correlation id preamble (min 3, default 20)
70+
-cidn, -correlation-id-nonce-length int length of the correlation id nonce (min 3, default 13)
7071
-sf, -session-file string store/read from session file
7172

7273
FILTER:
@@ -118,7 +119,7 @@ You can configure your PDCP_API_KEY in two ways:
118119
This will generate a unique payload that can be used for OOB testing with minimal interaction information in the output.
119120

120121
```console
121-
interactsh-client
122+
$ interactsh-client
122123
123124
_ __ __ __
124125
(_)___ / /____ _________ ______/ /______/ /_
@@ -144,7 +145,7 @@ interactsh-client
144145
`interactsh-client` with `-sf, -session-file` flag can be used store/read the current session information from user defined file which is useful to resume the same session to poll the interactions even after the client gets stopped or closed.
145146
146147
```console
147-
interactsh-client -sf interact.session
148+
$ interactsh-client -sf interact.session
148149
149150
_ __ __ __
150151
(_)___ / /____ _________ ______/ /______/ /_
@@ -171,7 +172,7 @@ interactsh-client -sf interact.session
171172
Running the `interactsh-client` in **verbose mode** (v) to see the whole request and response, along with an output file to analyze afterwards.
172173

173174
```console
174-
interactsh-client -v -o interactsh-logs.txt
175+
$ interactsh-client -v -o interactsh-logs.txt
175176
176177
_ __ __ __
177178
(_)___ / /____ _________ ______/ /______/ /_
@@ -262,7 +263,7 @@ docker run projectdiscovery/interactsh-client:latest
262263
```
263264
264265
```console
265-
docker run projectdiscovery/interactsh-client:latest
266+
$ docker run projectdiscovery/interactsh-client:latest
266267

267268
_ __ __ __
268269
(_)___ / /____ _________ ______/ /______/ /_
@@ -349,17 +350,18 @@ Usage:
349350
Flags:
350351
INPUT:
351352
-d, -domain string[] single/multiple configured domain to use for server
352-
-ip string public ip address to use for interactsh server
353+
-ip string[] public ip address(es) to use for interactsh server (comma-separated,supports both IPv4 & IPv6)
353354
-lip, -listen-ip string public ip address to listen on (default "0.0.0.0")
354355
-e, -eviction int number of days to persist interaction data in memory (default 30)
355356
-ne, -no-eviction disable periodic data eviction from memory
357+
-es, -eviction-strategy string eviction strategy for interactions (sliding, fixed) (default "sliding")
356358
-a, -auth enable authentication to server using random generated token
357359
-t, -token string enable authentication to server using given token
358360
-acao-url string origin url to send in acao header to use web-client) (default "*")
359361
-sa, -skip-acme skip acme registration (certificate checks/handshake + TLS protocols will be disabled)
360362
-se, -scan-everywhere scan canary token everywhere
361-
-cidl, -correlation-id-length int length of the correlation id preamble (default 20)
362-
-cidn, -correlation-id-nonce-length int length of the correlation id nonce (default 13)
363+
-cidl, -correlation-id-length int length of the correlation id preamble (min 3, default 20)
364+
-cidn, -correlation-id-nonce-length int length of the correlation id nonce (min 3, default 13)
363365
-cert string custom certificate path
364366
-privkey string custom private key path
365367
-oih, -origin-ip-header string HTTP header containing origin ip (interactsh behind a reverse proxy)
@@ -370,6 +372,7 @@ CONFIG:
370372
-dr, -dynamic-resp enable setting up arbitrary response data
371373
-cr, -custom-records string custom dns records YAML file for DNS server
372374
-hi, -http-index string custom index file for http server
375+
-dhr, -default-http-response string file to serve for all http requests (takes priority over other options)
373376
-hd, -http-directory string directory with files to serve with http server
374377
-ds, -disk disk based storage
375378
-dsp, -disk-path string disk storage path
@@ -456,7 +459,7 @@ A number of needed flags are configured automatically to run `interactsh-server`
456459
## Running Interactsh Server
457460
458461
```console
459-
interactsh-server -domain interact.sh
462+
$ interactsh-server -domain interact.sh
460463
461464
_ __ __ __
462465
(_)___ / /____ _________ ______/ /______/ /_
@@ -481,7 +484,7 @@ interactsh-server -domain interact.sh
481484
Multiple domain names can be given in the same way as above to run the same interactsh server across multiple **configured domains**.
482485
483486
```console
484-
interactsh-server -d oast.pro,oast.me
487+
$ interactsh-server -d oast.pro,oast.me
485488

486489
_ __ __ __
487490
(_)___ / /____ _________ ______/ /______/ /_
@@ -503,6 +506,34 @@ interactsh-server -d oast.pro,oast.me
503506
[DNS] Listening on UDP 46.101.25.250:53
504507
```
505508
509+
## Interactsh Server with IPv4 and IPv6
510+
511+
Interactsh server supports both IPv4 and IPv6 addresses. You can specify multiple IP addresses using the `-ip` flag, and the server will respond with the appropriate A (IPv4) or AAAA (IPv6) records in DNS responses.
512+
513+
```console
514+
$ interactsh-server -d oast.pro -ip 192.0.2.1,2001:db8::1
515+
516+
_ __ __ __
517+
(_)___ / /____ _________ ______/ /______/ /_
518+
/ / __ \/ __/ _ \/ ___/ __ '/ ___/ __/ ___/ __ \
519+
/ / / / / /_/ __/ / / /_/ / /__/ /_(__ ) / / /
520+
/_/_/ /_/\__/\___/_/ \__,_/\___/\__/____/_/ /_/ 1.0.5
521+
522+
projectdiscovery.io
523+
524+
[INF] Configured IP addresses: 192.0.2.1, 2001:db8::1
525+
[INF] Listening with the following services:
526+
[HTTPS] Listening on TCP 46.101.25.250:443
527+
[HTTP] Listening on TCP 46.101.25.250:80
528+
[SMTPS] Listening on TCP 46.101.25.250:587
529+
[LDAP] Listening on TCP 46.101.25.250:389
530+
[SMTP] Listening on TCP 46.101.25.250:25
531+
[DNS] Listening on TCP 46.101.25.250:53
532+
[DNS] Listening on UDP 46.101.25.250:53
533+
```
534+
535+
The server will automatically detect and categorize IPv4 and IPv6 addresses, returning appropriate DNS records based on the query type.
536+
506537
<table>
507538
<td>
508539
@@ -572,7 +603,7 @@ stream {
572603
**Configured Domains**
573604
574605
```console
575-
interactsh-server -d oast.pro,oast.me
606+
$ interactsh-server -d oast.pro,oast.me
576607

577608
_ __ __ __
578609
(_)___ / /____ _________ ______/ /______/ /_
@@ -598,7 +629,7 @@ interactsh-server -d oast.pro,oast.me
598629
599630
Index page for http server can be customized while running custom interactsh server using `-http-index` flag.
600631
601-
```console
632+
```bash
602633
interactsh-server -d hackwithautomation.com -http-index banner.html
603634
```
604635
@@ -613,7 +644,7 @@ Interactsh http server optionally enables file hosting to help in security testi
613644
614645
To use this feature, `-http-directory` flag can be used which accepts diretory as input and files are served under `/s/` directory.
615646
616-
```console
647+
```bash
617648
interactsh-server -d hackwithautomation.com -http-directory ./paylods
618649
```
619650
@@ -631,7 +662,7 @@ The following query parameter names are supported - `body`, `header`, `status` a
631662
- **delay** (response time)
632663
633664
```console
634-
curl -i 'https://hackwithautomation.com/x?status=307&body=this+is+example+body&delay=1&header=header1:value1&header=header1:value12'
665+
$ curl -i 'https://hackwithautomation.com/x?status=307&body=this+is+example+body&delay=1&header=header1:value1&header=header1:value12'
635666
636667
HTTP/2 307
637668
header1: value1
@@ -656,7 +687,7 @@ this is example body
656687
To enable `wildcard` interaction for configured Interactsh domain `wildcard` flag can be used with implicit authentication protection via the `auth` flag if the `token` flag is omitted.
657688
658689
```console
659-
interactsh-server -domain hackwithautomation.com -wildcard
690+
$ interactsh-server -domain hackwithautomation.com -wildcard
660691
661692
_ __ __ __
662693
(_)___ / /____ _________ ______/ /______/ /_
@@ -682,7 +713,7 @@ interactsh-server -domain hackwithautomation.com -wildcard
682713
As default, Interactsh server support LDAP interaction for the payload included in [search query](https://ldapwiki.com/wiki/LDAP%20Query%20Examples), additionally `ldap` flag can be used for complete logging.
683714
684715
```console
685-
interactsh-server -domain hackwithautomation.com -sa -ldap
716+
$ interactsh-server -domain hackwithautomation.com -sa -ldap
686717
687718
_ __ __ __
688719
(_)___ / /____ _________ ______/ /______/ /_
@@ -707,7 +738,7 @@ The length of the interactsh payload is **33** by default, consisting of **20**
707738
708739
709740
```console
710-
interactsh-server -d hackwithautomation.com -cidl 4 -cidn 6
741+
$ interactsh-server -d hackwithautomation.com -cidl 4 -cidn 6
711742
712743
_ __ __ __
713744
(_)___ / /____ _________ ______/ /______/ /_
@@ -731,7 +762,7 @@ interactsh-server -d hackwithautomation.com -cidl 4 -cidn 6
731762
**Note:** It is important and required to use same length on both side (**client** and **server**), otherwise co-relation will not work.
732763
733764
```console
734-
interactsh-client -s hackwithautomation.com -cidl 4 -cidn 6
765+
$ interactsh-client -s hackwithautomation.com -cidl 4 -cidn 6
735766
736767
_ __ __ __
737768
(_)___ / /____ _________ ______/ /______/ /_
@@ -753,7 +784,7 @@ The [certmagic](https://github.com/caddyserver/certmagic) library is used by def
753784
754785
755786
```console
756-
interactsh-server -d hackwithautomation.com -cert hackwithautomation.com.crt -privkey hackwithautomation.com.key
787+
$ interactsh-server -d hackwithautomation.com -cert hackwithautomation.com.crt -privkey hackwithautomation.com.key
757788
758789
_ __ __ __
759790
(_)___ / /____ _________ ______/ /______/ /_
@@ -810,14 +841,14 @@ $ sudo interactsh-server -smb -skip-acme -debug -domain localhost
810841
### Responder
811842
[Responder](https://github.com/lgandx/Responder) is wrapped in a docker container exposing various service ports via docker port forwarding. The interactions are retrieved by monitoring the shared log file `Responder-Session.log` in the temp folder. To use it on a self-hosted instance, it's necessary first to build the docker container and tag it as `interactsh`(docker daemon must be configured correctly and with port forwarding capabilities):
812843
813-
```console
844+
```bash
814845
docker build . -t interactsh
815846
```
816847
817848
Then run the service with:
818849
819-
```console
820-
$ sudo interactsh-server -responder -d localhost
850+
```bash
851+
sudo interactsh-server -responder -d localhost
821852
```
822853
823854
On default settings, the daemon listens on the following ports:

cmd/benchmark-server/duration-testing/bench.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ func startClient(idx int) {
109109
log.Printf("client %d failed to send http request\n", idx)
110110
} else if resp != nil {
111111
_, _ = io.Copy(io.Discard, resp.Body)
112-
resp.Body.Close()
112+
if err := resp.Body.Close(); err != nil {
113+
log.Printf("Error closing response body: %v\n", err)
114+
}
113115
log.Printf("Client %d sent HTTP request: %d\n", idx, resp.StatusCode)
114116
}
115117

0 commit comments

Comments
 (0)