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

Support current AVM Authentication method #18

Open
MatthiasFraass opened this issue Dec 19, 2024 · 1 comment
Open

Support current AVM Authentication method #18

MatthiasFraass opened this issue Dec 19, 2024 · 1 comment

Comments

@MatthiasFraass
Copy link

On my Fritzbox 7530AX, I suddenly get login errors with fritzbox_smarthome_exporter.
I am highly interested in getting fritzbox_smarthome_exporter to work again, as a lot of smart devices are AVM products.

I suspect it has to do with the upgrade to FritzOS 8.0 - from the day on that the update was installed, I only get:
"Login failed: unable to solve login challenge: challenge not solved, got '0000000000000000' as session id, check login data"

Diving deeper, it seems that AVM has introduced a new method and seems to discontinue the old one (I suspect).
See https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AVM_Technical_Note_-_Session_ID_english_2021-05-03.pdf

The underlying fritzctl only supports the older MD5 login method, not PBKDF2/HMac.
bpicode/fritzctl seems to have been discontinued, so I guess that's why you are using a fork.

So I went a little deeper and developed a prototype for a PBKDF2-based challenge/response login method working in golang. I can successfully login with it and obtain a valid SID.
It should work with any Fritzbox > 7.24 which should be good for everyone at this time.

As GoLang is not my first language, I have a bit of trouble integrating it into fritzctl.
I could try a fork but it would take a while for me to integrate it with fritzbox_smarthome_exporter.

What can we do about it?

@MatthiasFraass
Copy link
Author

I created a working new version :)
https://github.com/MatthiasFraass/fritzctl

You have to do 3 things to get it working:

	if fbURL.RequestURI() != "/" {
		options = append(options, fritz.AuthEndpoint(fbURL.RequestURI()))
	}

Maybe I do a clean fork tomorrow, but so far it's working :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant