Author Topic: how to decode .swf files  (Read 31861 times)

0 Members and 1 Guest are viewing this topic.

February 26, 2009, 08:24:12 am
Reply #15

ocean

  • Special Access
  • Full Member

  • Offline
  • *

  • 49
    • ocean's Inseclab
How did you uncompress the file ?
Code: [Select]
import sys, zlib
from struct import *
 
header = "3sBL"
 
s = sys.stdin.read()
signature,version, filelength = unpack(header,s[0:calcsize(header)])
 
if signature != "CWS":
sys.stderr.write("not a compressed swf!\n");
exit();
 
d = zlib.decompress(s[calcsize(header):])
 
hd = pack(header,"FWS",version,filelength)
 
sys.stdout.write(hd+d)
 
sys.stderr.write("swf decompressed!\n" % len(d))
;D

August 04, 2012, 01:46:14 pm
Reply #16

dlipman

  • Special Access
  • Full Member

  • Offline
  • *

  • 60
    • Multi-AV Scanning Tool
SWF Investigator

Quote
Adobe SWF Investigator is a cross-platform, GUI-based, comprehensive set of tools, which enables quality engineers, developers and security researchers to quickly analyze SWF files to improve the quality and security of their applications.

From a static perspective, you can disassemble ActionScript 2 (AS2) and ActionScript 3 (AS3) SWFs, view SWF tags and make binary changes to SWF files. SWF Investigator also lets you view associated information, including local shared objects (LSOs) and per site settings.

From a dynamic perspective, you can call functions within the SWF, load the SWF in various contexts, communicate via local connections and send messages to Action Message Format (AMF) endpoints.

SWF Investigator contains an extensible fuzzer for SWF applications and AMF services, so you can search for common Web application attacks. This toolset also provides a variety of utilities including encoders and decoders for SWF data, as well as a basic AS3 compiler.

http://labs.adobe.com/downloads/swfinvestigator.html