interactsh icon indicating copy to clipboard operation
interactsh copied to clipboard

No ACAO header returned as specified in interactsh-server

Open m-1tZ opened this issue 3 years ago • 9 comments

Interactsh version:

1.0.7

Current Behavior:

No ACAO header returned when using the interactsh-server to self-host.

Expected Behavior:

ACAO header should be returned as was specified

Steps To Reproduce:

Yes, for example, the interactsh default server does answer to a HTTP request with:

$curl -I cglbd6215o8jpnuc8m80ay9db5bukd5uo.oast.site
 
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: oast.site
X-Interactsh-Version: 1.1.2
Date: Mon, 03 Apr 2023 11:21:12 GMT
Content-Length: 72

So does the interactsh-server in the self-hosted version. Is it possible to add the Access-Control-Allow-Origin: * to the response of those requests? This helps in detection for some attacks where the server answer need to be read cross-origin and match the response of the server like:

<html><head></head><body>ou5dkub5bd9ya08m8cunpj8o5126dblgc</body></html>

Normally, a cross-origin located website is not possible to access resources without the ACAO * header.

m-1tZ avatar Jan 21 '23 20:01 m-1tZ

I am facing this issue too. Any update?

zerodaywolf avatar Apr 02 '23 07:04 zerodaywolf

@m-1tZ @m-1tZ that's the default value and working as expected.

interactsh-server -h acao-url
Interactsh server - Go client to configure and host interactsh server.

Usage:
  ./interactsh-server [flags]

Flags:
   -acao-url string  origin url to send in acao header to use web-client) (default "*")
HTTP/2 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Origin: *
Content-Type: text/plain; charset=utf-8
Content-Length: 384
Date: Sun, 02 Apr 2023 10:33:58 GMT

do you have anything additional to share / reproduce this?

ehsandeep avatar Apr 02 '23 10:04 ehsandeep

Hi, as @zerodaywolf also mentioned, there is no ACAO * returned. Whether -acao-url specified or not. I'm using the latest version of interactsh-server on a VPS that only runs this service on a domain that solely has this service active on.

Interactsh-server service:

interactsh-server -domain x -ip x -listen-ip 0.0.0.0 -token "x" -up

Server answer:

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: x.com
X-Interactsh-Version: 1.1.2
Date: Sun, 02 Apr 2023 19:46:15 GMT
Content-Length: 72

m-1tZ avatar Apr 02 '23 19:04 m-1tZ

@m-1tZ this header is set for a specific endpoint, i.e /register and /poll

curl -I https://oast.fun/poll
HTTP/2 400 
access-control-allow-credentials: true
access-control-allow-headers: Content-Type, Authorization
access-control-allow-origin: *
content-type: application/json; charset=utf-8
x-content-type-options: nosniff
content-length: 37
date: Sun, 02 Apr 2023 19:59:59 GMT

ehsandeep avatar Apr 02 '23 20:04 ehsandeep

Ah, I got it. Is there any chance to add a ACAO * header to the actual OOB server (random.myserver.com)?

m-1tZ avatar Apr 03 '23 07:04 m-1tZ

Ah, I got it. Is there any chance to add a ACAO * header to the actual OOB server (random.myserver.com)?

Sure @m-1tZ, do you have an example of current behavior causing issues or use case that you can share?

ehsandeep avatar Apr 03 '23 08:04 ehsandeep

Yes, for example, the interactsh default server does answer to a HTTP request with:

$curl -I cglbd6215o8jpnuc8m80ay9db5bukd5uo.oast.site
 
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: oast.site
X-Interactsh-Version: 1.1.2
Date: Mon, 03 Apr 2023 11:21:12 GMT
Content-Length: 72

So does the interactsh-server in the self-hosted version. Is it possible to add the Access-Control-Allow-Origin: * to the response of those requests? This helps in detection for some attacks where the server answer need to be read cross-origin and match the response of the server like:

<html><head></head><body>ou5dkub5bd9ya08m8cunpj8o5126dblgc</body></html>

Normally, a cross-origin located website is not possible to access resources without the ACAO * header.

m-1tZ avatar Apr 03 '23 11:04 m-1tZ

+1 for this feature request. I was also debugging with the ACAO was not being returned, its not explicitly clear that this is only for poll & register endpoints.

ldionmarcil avatar Sep 07 '23 21:09 ldionmarcil

@ldionmarcil @m-1tZ should be fixed with the latest release!

curl -I oast.fun
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Server: oast.fun
X-Interactsh-Version: 1.1.7
Date: Mon, 18 Sep 2023 10:02:18 GMT
Content-Length: 650

ehsandeep avatar Sep 18 '23 10:09 ehsandeep