WIP CraftCMS FTP Template exploit #19772
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Drafting this for now as I couldn't get it working but wanted to post what I had so far.
Using the
FTPServer
mixin I was trying to recreate the same functionality that thepyftpdlib
FTP server provides in the PoC when hosting the payload for the vulnerable application to download and then run.When the PoC triggers the vulnerability and the application reaches out to the FTP Server, four anonymous authentication sessions are established and in the fourth one the
EPSV
andRETR
commands are issued by the client and the file transfer is initiated and the file gets downloaded successfully.PoC FTP Logs
When the metasploit module triggers the vulnerability and the application reaches out to the metasploit FTP Server, only three anonymous authentication sessions are established. They seem to be almost identical to the first three that occur when testing the PoC however the fourth one where the file transfer occurs doesn't seem to be initiated by the client, so there's no file transfer and thus no RCE atm.
Module attempt FTP Logs
Obviously I'm missing something. When I return I'll enable some more logging on the target and dig deeper into the pcaps I have but thought I would post incase any team member or contributor had any comments or concerns.