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

decrypting alcatel config #1

Open
H1-N1 opened this issue Sep 15, 2018 · 5 comments
Open

decrypting alcatel config #1

H1-N1 opened this issue Sep 15, 2018 · 5 comments

Comments

@H1-N1
Copy link

H1-N1 commented Sep 15, 2018

hi
when im googling for decrypting alcatel config file i was redirected to you github repo
can you help me wich tool i can use to do so
thx

@JamesIT
Copy link
Owner

JamesIT commented Sep 21, 2018 via email

@H1-N1
Copy link
Author

H1-N1 commented Sep 23, 2018

hi,
thx for your reply
is there any alternative for windows
i tried to use binwalk on windows without success ..

C:\python27\python.exe: can't open file 'binwalk': [Errno 2] No such file or directory

also can i modifi the config file then encrypt it with binwalk because i need toupdate my router config everyday remotely ...
thank you mr james

@H1-N1
Copy link
Author

H1-N1 commented Sep 23, 2018

hi , finaly awas able to decrypt the configuration but i can't figure out how to change the wifi password then upload it if you have any idea thx

@jamesmacwhite
Copy link

jamesmacwhite commented May 18, 2020

@H1-N1 Did you ever figure out a way to do this? I was looking at potentially "abusing" the backup and restore feature to override the SSH setting, as I want it enabled again for further exploration of the configuration on the OpenWrt side. EE themselves disabled it due to the hard coded root credentials as per the research and responsible disclosure from @JamesIT.

I was able to extract the contents of a configure.bin using binwalk, which reveals it is actually two gzip archives at two offsets. There doesn't appear to be any encryption other than compression.

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
45            0x2D            gzip compressed data, maximum compression,
from Unix, last modified: 2020-05-17 14:38:34
19224         0x4B18          gzip compressed data, maximum compression,
from Unix, last modified: 2020-05-17 14:38:30

The gzip archive at 0x2D, also contains a sysconfig.tar.gz within which when extracted reveals the config files stored at /etc/config on the 4GEE Home Router which I know is running OpenWrt. In particular, I'm interested in modifying the dropbear config /etc/config/dropbear and changing the enable flag to 1, so having SSH enabled again. Interestingly, EE could of easily blocked root logins with SSH while keeping SSH available for the admin user, but I guess the secret was out by then so they just shut access off entirely.

The question however is can you make changes and then repackage the configure.bin and upload it without bricking the device? I don't know what checks are done by the backup and restore feature. i.e. checksums, file length checks etc.

Equally, because the config file I want is within the 0x2D offset and then within a sysconfig.tar.gz, it needs several layers of extraction and then repackaging this seems the challenge, while maintaining the original file header so the backup and restore feature doesn't reject it.

Maybe you could generate your own backup.tar.gz, matching the directory structure expected and then hex edit that into the original configure.bin file? Seems dangerous though, possible bricking risk?

@jamesmacwhite
Copy link

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

3 participants