Monitor Leaked Cookies for Your Domain (beta)
Access to this feature is not enabled for all accounts by default. Please contact your Customer Success Manager if you are interested in enabling it on your account.
Flare’s Leaked Cookies API allows for searching in cookies matching your domains found in stealer logs. Integrators may use this API to identify and invalidate sessions before they are taken over.
This will guide will explain how to use the Leaked Cookies API to monitor for newly found cookies and invalidate their session.
Prequisites
- Cookie monitoring must be enabled for your tenant. This feature must be activated by Flare Support.
- Access to a mechanism by which you may verify a cookie’s validity.
- Access to a mechanism by which you may invalidate a cookie.
Steps
Fetch one page of results
Use the cookies/_search
endpoint to fetch one page of results.
If the returned page of results is empty, this means that all cookies were viewed.
Verify and Invalidate
Loop over the response’s items to verify the cookie’s validity and invalidate the cookie.
Ratelimit and go to step 1
Wait one second to avoid going over the API rate limit. Then, go back to step 1 to fetch the next page.
Full Project Template
Flare maintains a full project example on Github:
It can serve as a starting point to implement automated session revocation in your organization.
End-to-End API Example
This is an end-to-end example in Python.
Was this page helpful?