O'Reilly logo

Mastering Modern Web Penetration Testing by Prakhar Prasad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating Web backdoor payload with Metasploit

Metasploit provides different kinds of payloads that can be used to get extended post exploitation functionality through a file-based backdoor. For this section I'll assume that the reader has discovered a vulnerability on a server that allows file uploads without any kind of whitelisting. Assuming a LAMP server is on 162.243.85.82 and Metasploit is running on a computer with a NAT'ed internal IP of 192.168.4.211.

First of all, we'll generate a PHP Meterpreter bind payload, which will drop us with a basic PHP Meterpreter shell. The tool of the trade is msfvenom. Msfvenom is the de-facto tool in the Metasploit framework to create and encode various payloads. Msfvenom surpasses the older tools for generating ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required