ActionScript 3 in Adobe Flash Player socket handling allows port probing

Credit: fukami
Risk: Medium
Local: No
Remote: Yes
CWE: CWE-264

CVSS Base Score: 5/10
Impact Subscore: 2.9/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: None
Availability impact: None

Design flaw in AS3 socket handling allows port probing # Summary Due to a design flaw in ActionScript 3 socket handling, compiled Flash movies are able to scan for open TCP ports on any host reachable from the host running the SWF, bypassing the Flash Player Security Sandbox Model and without the need to rebind DNS. # Technical background In AS3 Adobe introduced a new socket-related event called SecurityErrorEvent. This event is always thrown when a Flash Player tries to connect to a socket that it is not allowed to connect to by policy. The problem with the SecurityErrorEvent is that it's thrown immediately when a Flash Player tries to connect to a closed TCP port. If a service is listening on that port the Flash Player writes the string "<policy-file-request/>" and waits for response from the service. Nearly no TCP-service will respond to this request. We can assume the following: When trying to connect to a socket that the SWF is not allowed to and it doesn't get a SecurityErrorEvent within 2 seconds the port is most likely open. A new Flash player instance is used for every probed port because the Flash Player sends only one policy-file request per player per host per port. # Tested platforms Works on: * Windows XP SP2: Internet Explorer 6 / Flash Player * Windows XP SP2: Firefox / Flash Player * Windows XP SP2: IE 7.0.5730.11 Flash Player * Ubuntu Edgy: Firefox / Flash Player * Mac OSX 10.4.10: Safari 2.0.4 / Flash Player * Mac OSX 10.4.10: Safari 3.0.2 / Flash Player * Mac OSX 10.4.10: Firefox / Flash Player * Solaris 10 i86: Firefox / Flash Player Doesn't work as expected on: * Mac OSX 10.4.10: Opera 9.22 / Flash Player # Known limitations * The Scanner does not work on services that close the TCP- Connection immediately after they receive Bytes that they don`t "understand". The port is reported as closed because the SecurityErrorEvent is thrown when the TCP-Connection is closed. * The Scanner does not always work as expected when scanning hosts located in the internet (e.g. This maybe happens due to stateful inspection firewalls that close the connections or long TCP-response times. # Disclosure Timeline * 2007/07/23: Problem discovery * 2007/07/24: PoC available * 2007/07/25: Vendor notification * 2007/08/09: Public demonstration at CCCamp # Possible Fixes Flash-Player Side (Adobe) * TOTALLY REMOVE the SecurityErrorEvent (it`s useless, it`s just harder to find errors with socketservers without the event) * Remove the SecurityErrorEvent in the Release-Players and keep it in the debug players * Make the SecurityErrorEvent behave EXACTLY the same for opened an closed ports User Side * Disable Flash * Only allow Flash from trusted sites * Downgrade Player to Version 8 # Links * Flex 2 Socket: net/Socket.html * Flex 2 SecurityErrorEvent: langref/flash/events/SecurityErrorEvent.html * Flash Player 9 Security white paper: fp9_0_security * Settings Manager: documentation/en/flashplayer/help/settings_manager06.html # Live PoC scanner * # Source Code * (compile using Adobes Flex2 SDK) # Credits * David Neu david.neu (at) gmail (dot) com [email concealed] Problem-Discovery and PoC * fukami, SektionEins,

Vote for this issue:


Thanks for you vote!


Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.

(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024,


Back to Top