ozwaldorf / FIOS-G1100

All the current information on reverse engineering the FIOS-G1100 Quantum Gateway router
59 stars 6 forks source link

Decrypting G3100 config #12

Open superswan opened 10 months ago

superswan commented 10 months ago

Hello, I was wondering if there is any information on decrypting the config for a G3100, the config file is exported as .cfg and not a bin, not sure if it has a different file structure and/or encrypted differently.

Traceback (most recent call last):
  File "/home/debbie/decrypt.py", line 59, in <module>
    main()
  File "/home/debbie/decrypt.py", line 45, in main
    json_data = decrypt(data_in)
                ^^^^^^^^^^^^^^^^
  File "/home/debbie/decrypt.py", line 23, in decrypt
    cipher = AES.new(KEY, AES.MODE_CBC, iv)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/AES.py", line 228, in new
    return _create_cipher(sys.modules[__name__], key, mode, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/__init__.py", line 79, in _create_cipher
    return modes[mode](factory, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/debbie/venv/lib/python3.11/site-packages/Crypto/Cipher/_mode_cbc.py", line 287, in _create_cbc_cipher
    raise ValueError("Incorrect IV length (it must be %d bytes long)" %
ValueError: Incorrect IV length (it must be 16 bytes long)
Rubyheart commented 8 months ago

I'm having a similar issue with a G3100.