blacklanternsecurity / writehat

A pentest reporting tool written in Python. Free yourself from Microsoft Word.
GNU General Public License v3.0
1.27k stars 225 forks source link

Cookies: stricter settings and conflicts with other apps #116

Open unixerius opened 3 months ago

unixerius commented 3 months ago

Good day!

I'm running a PoC with both WriteHat and SysReptor, to compare their feature sets, user friendliness, etc. They are both hosted on the same Docker host for the duration of this PoC. In testing I noticed that logging in to one of these would automatically invalidate my current session in the other tool, and vice versa.

After some messing around with BurpSuite and some web searches I'm reminded that this happens in accordance with RFC6265 (HTTP state management).

I realise this is a "me" problem, not a "you" problem. Your code operates according to the RFC and your Docker deployment process means the code won't even be aware of the actual FQDN and Origin (proto://fqdn:port) it will be reached upon.

For me, my solution should be to ensure that the NGinx proxy is set up with a separate virtualhost / FQDN for each of the ingresses towards these two tools.

That being said, there is a feature request I have for you. :)

Would you potentially consider setting the following flags for both your CSRFtoken and your SessionID cookies?