Live data from Hacker News

PHPMailer RCE

legalhackers.com

11–14 of 14 posts

Re: PHPMailer RCE

#11
Seems to come from the From email field: https://github.com/PHPMailer/PHPMailer/compare/v5.2.17...v5....

More details here: https://www.saotn.org/exploit-phps-mail-get-remote-code-exec...

PHP mail doc: http://php.net/manual/en/function.mail.php

A function that allows to pass arbitrary flags to a command line, what could go wrong... :)

    mail('nobody@example.com', 'the subject', 'the message', null, '-fwebmaster@example.com');

Re: PHPMailer RCE

#13
post #12

In case anyone needs this: A script for finding vulnerable versions of PHPMailer on a server: https://gist.github.com/cebe/d0f5631b432c520a2e6f6be8beddf11... Finds also really old versions like 2.0.4.

Find is a powerful tool:

    find /var/www -name 'class.phpmailer.php' -print -exec grep -ni '%s["'\''], $this->Sender' {} \;

Re: PHPMailer RCE

#14
post #13
post #12

In case anyone needs this: A script for finding vulnerable versions of PHPMailer on a server: https://gist.github.com/cebe/d0f5631b432c520a2e6f6be8beddf11... Finds also really old versions like 2.0.4.

Find is a powerful tool: find /var/www -name 'class.phpmailer.php' -print -exec grep -ni '%s["'\''], $this->Sender' {} \;

[deleted]
Post reply on HN