FTP - Passive mode
Command channel
Data channel
Port 21
Random port
Random port
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
A simple example of vulnerable code
Slide 12
Slide 12 text
1. PHP establishes an FTP connection
$contents =
fi
le_get_contents($f);
2. FakeFTP gives a port with a payload for passive
mode
3. Receiving a payload from socket and save to
$contents
4. PHP comes to the FTP again. FakeFTP says ok, let's
save your
fi
le using passive mode
fi
le_put_contents($f, $contents);
5. As a socket for passive mode puts the internal
FastCGI port. The payload makes RCE
Slide 13
Slide 13 text
Into the Wild
CVE-2021-3129
https://www.ambionics.io/blog/laravel-debug-rce