-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add FortiOS rootfs.gz decrypt functionality #510
Add FortiOS rootfs.gz decrypt functionality #510
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #510 +/- ##
==========================================
- Coverage 73.64% 73.45% -0.20%
==========================================
Files 275 275
Lines 22872 22943 +71
==========================================
+ Hits 16845 16853 +8
- Misses 6027 6090 +63
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I've fixed the decryption to work with the existing pycryptodome dependency. It seems to all work alright on my end, but if you could give it a quick test-spin, this should be good to go! Would be cool if we could dynamically extract the encryption key. I was working on some Ivanti appliances with the loop-AES encryption, which also have hardcoded keys in the kernel. I haven't looked at the FortiOS kernel yet, but the Ivanti's have a symbol pointing to the key, making recovery of it fairly trivial. Perhaps it's similar for FortiOS, or a pattern match could suffice. Way too much work for relatively little gain, though. But perhaps fun to explore some day 😄 |
Would it be an idea to split this PR in 3 not-to-be-squashed commits, 1 for the robustness improvements in |
449dc99
to
243244b
Compare
243244b
to
9c64916
Compare
Split it over 4 to also separate the FortiManager out. |
This PR adds rudimentary support for decrypting
rootfs.gz
files on FortiOS 7.4.1 and up.