0

I am learning some basic concepts about XSS and now I want to see what's gonna happen if I copy all cookies related to one site and paste it in a clean browser tab (e.g. open a incognito tab or open another browser).

What's the proper way to do this? What tools do you guys use?


I've tried copying my own cookies with document.cookie and then open an incognito window, open the same website, then in the console tab document.cookie = 'the whole cookie string'.

But problems are:

  1. some subdomain cookies are not displayed by document.cookie.

  2. I can't send the copied cookies from the initial reuqest(I don't know whether if this will affect the result I am gonna see)

  3. I have to manually copy and add e.g. http only cookies.

Anyway, is there an all-in-one solution for this, instead of manually editing the cookies?

2 Answers 2

1

I never copy all cookies, I copy just the session cookie, and I use the developer tools of the browser for that.

If you want to copy all cookies, you may want to try EditThisCookie which can import and export all cookies as JSON.

1
  • I don't know which key-value pair would be enough for authentication/view private information, so I intend to copy all cookies... Thank you let me try the extension first. :)
    – Rick
    Jul 30, 2019 at 7:11
0

EditThisCookie extension allows copying cookies of the domain of current url/tab. It does not allow copying cookies of other domains that were loaded in the current tab.

So, for example if you are on tab "https://www.google.com", then in Developer Tool --> Application --> Cookies, you will see more than two frames in cookies section as highlighted in below screenshot:

enter image description here

If you need to copy/export all the cookies that were loaded for the current tab, then you can use StorageAce chrome extension, but make sure the "All Frames" toggle is on as shown below:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .