-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support: Why does Event "Populate from..." trigger CSRF black-holed? #8204
Comments
This has become a big issue for us as |
Not really. I did some tests on recent version and I was not able to trigger it. Just wondering, is this only on that interface or can you trigger it at some other places? |
@adulau -- really appreciate your attention on this!!
|
Just tested with 2.5.155 -- issue persists. If this is not a MISP bug, then please help us understand how to diagnose to isolate root cause for the CSRF as this is a show stopper for a production deployment we have planned for this Monday. As always, thanks a ton for all your help!! |
I can also trigger it with [Publish]. |
Any data can be pasted into Freetext Import window, it doesn't impact the outcome. Use "1.2.3.4" is/as required |
Note that unlike previous spurious CSRF errors, these are constant and repeatable. Tested with multiple browsers - same repeatable outcomes. Most clicks to get to failed state are 1, 2, 3 (in seconds) |
I'm new to CSRF detection but perhaps someone can guide me here... Thanks in advance!! I've started adding debug prints to
However...
Does anyone have any hints as to why with
|
Hello,
|
Hi @righel -- Thanks for assisting!! I also cannot reproduce this on a standalone Ubuntu VM running an off-the-shelf MISP 2.4.156. We see this in our MISP RH8.4 docker container in our enterprise environment. What I find "interesting" is what appears to be the same HTML My day is just starting. I will dig in some more, and get back to you with the info you suggested looking at, and any more details I may see. THANKS. |
|
Related to item 3 above, here's the
|
Assuming Redis is your php sessions backend, some debugging to check if the session is somehow destroyed:
Is the bug reproducible on all users roles? Admin/Org admin/User ? |
Following your hunch, @github-germ you could apply the below patch to this file: MISP/app/View/Elements/genericElements/SideMenu/side_menu.ctp Lines 135 to 142 in 086529a
patch:
This should prevent the creation of the |
Re' the patch... That does remove the When I read the function
|
Thanks for your continued time and help!
|
Sorry, got confused and thought the
NOTE: this is for debugging purposes, but should not be a fix, if it actually prevents the bug from happening, which I'm not very confident it will. |
Patch.... I understand this is experimental. Here's the URL for the
|
Re' session cookie and
|
Check this out. I experimented with the following URL in the browser, entered an IP, and guess what? It worked. Notice I removed the |
The originator of the
A simple query string parameter should not cause issues, unless it's triggering some kind of WAF but even in that case the outcome should be different. |
Thanks for more details. Correct: browser hard-refresh reloaded that change in Puzzling diffs:
After doing some more comparison probing for things that work and those that don't ... THIS MIGHT BE RELATED TO ROOT CAUSE... Our
Based on this it does appear that the 5 sec revision of the cookie session token triggered by Do you think our For example, does the browser sending the Hmmm, I do see these corresponding rows in the db
|
Maybe I can try a test to disable the following in
OK, yes, that stopped the CSRF!!! So, this proves that the cookie token revision causes the false CSRF trigger. Now, I realize |
When I test same on my MISP 2.4.156 in a local VM that is not using
|
Indeed when MISP/app/Controller/AppController.php Line 1075 in 87a9d8b
So what's probably happening is:
Then this code gets executed:
Now I have a proper setup where I can reproduce the bug, I'll keep investigating and come back with some results later/tomorrow. Thanks for taking the time to share your findings. |
Excellent!!!! Thanks again for sticking with me on this journey. |
I always hated that annoying 'checkLocks'. clutters up logs, Web Developer debug. measurements, etc. 'Successful authentication using MyLogins External authentication key | HTTP method: GETTarget: /events/checkLocks/nnnnnnn/nnnnn' yada....yada....yada...Wash-rinse-repeat... |
;-) |
Yeah I hate it too, makes debugging frustrating at best. |
- it's annoying and causes headaches - as discussed in #8204
Added a setting to disable it, look for |
Also, for the issue identified by @righel, perhaps enabling |
I will now test this change and report back. THANKS!!! Btw, setting |
!! |
@righel Your support on this one has been world-class. Thank you VERY much!! And @iglocska thanks for jumping in. I imagine this will be included in 2.4.157 once that is officially released. Our Production OPs policy will require some exception bureaucracy on our end to deploy a patch. Might .157 be offered soon? |
2.5.157 released! You guys are the best. Case closed. THANKS AGAIN. |
I got a similar issue. I've open a suggestion in cakephp to improve the error message |
Support Questions
When adding a new event and then attempting
Populate from...
with a freetext list of IPs, the browser responds withSee
error.log
this triggers below:How can we make this work?
Thanks!
MISP version
2.4.153
Operating System
RedHat
Operating System version
8.4
PHP version
7.4
Browser
Chrome
Browser version
No response
Relevant log output
Extra attachments
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: