Skip to content
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

[Bug]: Inability to Decrypt Cookies in Octo Browser #20

Open
igorank opened this issue Feb 5, 2024 · 5 comments
Open

[Bug]: Inability to Decrypt Cookies in Octo Browser #20

igorank opened this issue Feb 5, 2024 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@igorank
Copy link

igorank commented Feb 5, 2024

What happened?

Hello @thewh1teagle, once again, thank you very much for adding Octo Browser to the software, but in this issue, I would like to make some recommendations regarding fixes.

Firstly, the octo_browser(domains: Option<Vec<&str>>) function besides the domains argument must necessarily contain additional arguments: cookies_path, key_path because Octo Browser generates a new folder (under a random name) in the directory C:\Users\username\AppData\Roaming\Octo Browser\tmp every time the profile is launched, where browser files, including cookies and others, are located. Therefore, calling find_chrome_based_paths() in the octo_browser() function doesn't make sense.

Secondly, for some reason, attempting to decrypt cookies with the "encrypted_key" key, which is located in the "Local State" file, results in the error "can't decrypt using key." Although the "encrypted_key" keys of Octo Browser and Google Chrome seem to be identical. The values of "encrypted_value" in the table also seem to be encrypted with the same algorithm as in Google Chrome. In general, everything seems to be the same, but for some reason, it is not possible to decrypt the cookie using the aforementioned key.

Below, I am attaching two files, "Cookies" and "Local State," which Octo Browser uses. Perhaps, in your free time, you could take a look and figure out what's going on, why it's not possible to decrypt the cookie values.

Local State.txt
Cookies.txt

P.S.: I changed the file extension for the "Cookies" file to .txt because GitHub does not allow uploading files with extensions like .sqlite3, etc.

Steps to reproduce

  1. Open Octo Browser (Chromium based).
  2. Attempt to decrypt the cookies using the "encrypted_key" key from the "Local State" file.
  3. Observe the error message: "can't decrypt using key."
  4. Note that the "encrypted_key" keys of Octo Browser and Google Chrome appear identical, and the values of "encrypted_value" in the "Cookies" file seem to be encrypted with the same algorithm as in Google Chrome.
  5. Despite the similarities, the cookies cannot be decrypted using the provided key.

What browsers are you seeing the problem on?

Chromium

Relevant log output

No response

@igorank igorank added the bug Something isn't working label Feb 5, 2024
@ShayBox
Copy link
Contributor

ShayBox commented Feb 28, 2024

I'm not completely sure, but I believe this is related to an issue that was reported to me, I found #16 which lead me to this.

range end index 3 out of range for slice of length 0 https://github.com/thewh1teagle/rookie/blob/main/rookie-rs/src/browser/chromium.rs#L98

This user is on Windows and only has Edge and hasn't installed any other browsers.

@thewh1teagle
Copy link
Owner

thewh1teagle commented Mar 15, 2024

How can I reproduce on octo browser?
Do I need to pay for the browser?

@igorank
Copy link
Author

igorank commented Mar 26, 2024

How can I reproduce on octo browser? Do I need to pay for the browser?

I can provide you with a temporary login and password to access the Octo browser. Could you please tell me where I can send this information to you?

@thewh1teagle
Copy link
Owner

How can I reproduce on octo browser? Do I need to pay for the browser?

I can provide you with a temporary login and password to access the Octo browser. Could you please tell me where I can send this information to you?

You can send me in telegram
https://t.me/thewh1teagle

@thewh1teagle
Copy link
Owner

thewh1teagle commented Apr 5, 2024

Update:
I checked octobrowser on windows.
It finds the key and the database, there is encryoted_value field as usual but looks like it fails to decrypt it (also in linux like encryption) so looks like they use custom encryption

I think that the only way to find out how to decrypt it, is to reverse engineer it.

@thewh1teagle thewh1teagle added help wanted Extra attention is needed enhancement New feature or request and removed bug Something isn't working labels Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants