-
Notifications
You must be signed in to change notification settings - Fork 14k
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 an exploit module for FortiManager (CVE-2024-47575) #19648
base: master
Are you sure you want to change the base?
Conversation
…is then matcheds up with ClientSerialNumber and ClientPlatform, which is clearer IMHO. Also, we explicitly create a Rex TCP socket, so these param names no longer collide with what a mixin would use
|
||
print_status('Registering device...') | ||
|
||
req1 = "get auth\r\nserialno=#{serial_number}\r\nplatform=#{platform}\r\nhostname=localhost\r\n\r\n\x00" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using a heredoc here will improve readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of improving the readability of this, but I would like to be more explicit about the placement of the \r\n
delimitators, and a heredoc makes this awkward, for example:
req1 = %Q{get auth\r
serialno=#{serialno}\r
platform=#{platform}\r
hostname=localhost\r
\r
\0}
Perhaps a happy medium is something like this:
req1 = [
'get auth',
"serialno=#{serialno}",
"platform=#{platform}",
'hostname=localhost',
"\r\n\x00"
].join("\r\n")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, looks better I think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to throw in votes; I'm in favor of the original as it's more explicit and it's not too hard to grok 😄
…onal, and we dont specify a default, we can omit the nil default value.
… framework choose them for us.
…owkr close the socket after we get a session, and will wait up to WfsDelay for that to happen. This lets us remove the other timeout we had, and teh user can always adjust WfsDelay if needed. (Thanks Spencer)
This (draft) pull request adds an exploit module for CVE-2024-47575, an unauth RCE in Fortinet FortiManager, due to missing authentication for critical function(s).
For a full technical analysis of the vuln/exploit, please see our AttackerKB Rapid7 Analysis:
To-Do
Looks like watchTowr have published a cert/key pair which can probably be used as a default, Found a suitable cert/key pair to use by default, and then we can have a config option so the user can specify a custom cert/key pair if they prefer.CheckCode::Detected
.Example
Target was FortiManager
7.6.0
.