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

trying to export firefox local storage #418

Open
3 of 5 tasks
kodawah opened this issue Sep 1, 2024 · 1 comment
Open
3 of 5 tasks

trying to export firefox local storage #418

kodawah opened this issue Sep 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kodawah
Copy link

kodawah commented Sep 1, 2024

Describe the bug

I'm trying to export local storage output exclusively from Firefox. If I run the tool, I get most of the other csv but not that one. There is no error or cli option to select only the local storage output. I tried creating a small tool to generate it myself (attached) but I couldn't get it to work. Any feedback is appreciated.

Log Output

$ ./hack-browser-data 
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Brave
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser="Microsoft Edge"
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Chromium
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser="Chrome Beta"
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Opera
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=OperaGX
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Chrome
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Vivaldi
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=CocCoc
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Yandex
level=WARN source=browser.go:47 msg="find browser failed, profile folder does not exist" browser=Arc
level=WARN source=browser.go:98 msg="find browser success" browser=firefox-v8dv3l08.default-release
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=bookmark.go:127 msg="scan bookmark error" err="sql: Scan error on column index 4, name \"title\": converting NULL to string is unsupported"
level=ERROR source=browserdata.go:26 msg="parse error" source_data=password err="decode ASN1 data failed"
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_extension.csv
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_password.csv
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_bookmark.csv
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_history.csv
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_download.csv
level=WARN source=browserdata.go:56 msg="export success" filename=firefox_aaaaaaaa_default_release_cookie.csv

Expected vs Actual Behavior

I wanted local storage data vs nothing happened.

Desktop (please complete the following information):

Select the operating system(s) you are using:

  • Windows

  • macOS

  • Linux

  • OS Version+Architecture: Darwin macbook.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:17:33 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6031 arm64

  • Browser Name+Version: Firefox 129.0.1 (64-bit)

Additional Details

  • I ran hack-browser-data with administrator/root privileges.

Checklist

Screenshots/Videos

My sample tool I tried composing, fails with 2024/09/02 01:30:19 query metadata error: SQL logic error: no such table: metaData (1)

package main

import (
	"log"
	"os"

	"github.com/moond4rk/hackbrowserdata/browser/firefox"
	"github.com/moond4rk/hackbrowserdata/browserdata"
	"github.com/moond4rk/hackbrowserdata/types"
)

func main() {
	dataTypes := []types.DataType{types.FirefoxLocalStorage}
	bd := browserdata.New(dataTypes)

	homeDir, err := os.UserHomeDir()
	if err != nil {
		log.Fatalln(err)
	}
	profilePath := homeDir + "/Library/Application Support/Firefox/Profiles/"
	ff, err := firefox.New(profilePath, dataTypes)
	if err != nil {
		log.Fatalln(err)
	}

	key, err := ff[0].GetMasterKey()
	if err != nil {
		log.Fatalln(err)
	}
	err = bd.Recovery(key)
	if err != nil {
		log.Fatalln(err)
	}

	log.Printf("%q", bd)
	bd.Output(".", "firefox", "")
}

(if you spot something wrong with my tool please let me know and I'll address it)

@kodawah kodawah added the bug Something isn't working label Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@kodawah and others