Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bypassing NextGen Security: Crazy C&C Channels

TweekFawkes
October 10, 2017

Bypassing NextGen Security: Crazy C&C Channels

Bypassing Next-Gen Security w/ Crazy C&C Channels

TweekFawkes

October 10, 2017
Tweet

More Decks by TweekFawkes

Other Decks in Technology

Transcript

  1. Bryce Kunz - Cloud Exploitation Expert AWS, Azure, Docker, K8s,

    DC/OS, Mesos, etc… & Red Team Lead Whois Bryce Kunz @TweekFawkes DHS NSA Cloud
  2. Blocks: - IP Addresses - Ports Firewall 123.123.123.123 80/TCP -

    Execute Commands Malware Firewall Connect Back
  3. Layers Any IoT Web Service: - Serverless Services - AWS

    Lambda, etc... - MQTTS, etc... IP Address Port 1.1.1.1 443
  4. Web Proxy Blocks: - Domain Names - BlackList - Reputation

    Based - Attacker’s Buy Good Rep Domains bad.guy.com - Execute Commands Connect Back Malware Web Proxy
  5. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port 1.1.1.1 443 Domain name example.com
  6. IPS Blocks: - Signatures (e.g. strings) - Previously Known Bad

    “root#” - Execute Commands Connect Back Malware IPS
  7. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port Protocol App, API, REST 1.1.1.1 443 HTTP <msg>c2</msg> Domain name example.com
  8. Malware Analysis Blocks: - Files (in Transit) - Runs Files

    in Sandbox bad.guy.com - Execute Commands Connect Back Malware AMP
  9. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port Protocol App, API, REST 1.1.1.1 443 HTTP Files Domain name example.com
  10. Transaction Logging Enables: - Logging of Traffic MetaData - Aggregation

    of MetaData (e.g. into Splunk) - Anomalies (e.g. rare Certificates) “root#” - Execute Commands Connect Back Malware BroIDS
  11. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port Encryption Protocol App, API, REST 1.1.1.1 443 TLS & Certs HTTP <msg>c2</msg> Domain name example.com
  12. TLS/SSL Decryption Enables: - Inspection of TLS/SSL Traffic - Ability

    to inspect encrypted traffic “root#” - Execute Commands Connect Back Malware Web Proxy
  13. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port Encryption Protocol App, API, REST 1.1.1.1 443 TLS & Certs HTTP <msg>c2</msg> Domain name example.com
  14. Next-Gen Firewalls Features: - Application Awareness - Allow Only web-browsing

    bad.guy.com - Execute Commands Connect Back Malware Next-Gen Firewall
  15. Empire With Modified URIs - /totes/not/bad.php Empire v2.1 - Execute

    Commands Connect Back Windows Target Next-Gen Firewall
  16. Pupy Out of the box... pupy - Execute Commands Connect

    Back Windows Target Next-Gen Firewall
  17. Multiple Commands if command == “cmd=”: (execute the command) elif

    command == “download=”: (download a file)
  18. Sleep if command == “cmd=”: (execute the command) elif command

    == “download=”: (download a file) else: (sleep...)
  19. Design c2 via Twitter (so meta!) Twitter Operations 3) Execute

    Commands 2) Read Tweet 1) Post Tweet Target Next-Gen Firewall
  20. Design c2 via Gmail Gmail Gdog - Execute Commands 2)

    Read Em ail 1) Post Email Gdog Next-Gen Firewall
  21. Espionage C2 via the Gmail Gcat (Older version) used by

    allegedly Russian cyber threat actors
  22. c2 via Instagram Design Instagram Operator - Execute Commands Read

    Com m ent Post Comment Malware Next-Gen Firewall LP Bit.Ly/.... Evil.com 302
  23. Very Well Known Options So Bored! - TCP -> Back

    Orifice, everything... - UDP -> Donald D…, everything... - HTTP -> everything... - HTTPS -> everything.... - DNS -> DnsCat2, many... - Domain Fronting -> latest trend, many….
  24. Matrix Of The Known Interesting Any IoT Web Service: -

    Serverless Services - AWS Lambda, etc... - MQTTS, etc... IoT Web Service Read / W rite Malware Next-Gen Firewall
  25. Trends: APIs/REST Anything Web with an API/REST: - Slack ->

    “SlackShell” - Discord -> “Dyper” - Telegram -> “RATAttack” Trusted Web - Execute Commands Read / W rite Malware Next-Gen Firewall
  26. Trends: Web* Anything Web with a Twist: - WebDav ->

    “WebDavC2” - WebSockets -> “ZombieWeb” - QUIC, HTTP/2 -> “H1-QUIC”, etc... Trusted Web - Execute Commands Read / W rite Malware Next-Gen Firewall
  27. Any IoT Web Service: - Serverless Services - AWS Lambda,

    etc... - MQTTS, etc... IP Address Port Encryption Protocol App, API, REST 1.1.1.1 443 TLS & Certs HTTP <msg>c2</msg> Domain name example.com
  28. C2 Over... - AWS Lambda, Google Cloud Functions, etc… -

    Valid Certs, High Rep. Domains, Proxy through to Attacker’s Servers Serverless Prediction #1
  29. Exfil Over... - IFTTT, Zapier, Cloud Elements, etc… - Wash

    Connections through 3rd party web services… (less focus than tor) - Valid Certs, High Rep. Domains, Proxy through to Attacker’s Servers WebHooks Prediction #2
  30. IoT Prediction #3 C2 Over... - APIs, MQTTS, SQS, etc…

    - Blend in with Comms to Web Services & Message Queues
  31. Conclusion Trusted Web Services… - are currently being (ab)used for

    c2 - And will increasingly be (ab)used for c2 to bypass security devices
  32. Conclusion We need next-gen network technologies that will…. - Parse

    and Log web services/api/rest requests - Retrospective Analysis, etc… - Send to Central Logging Systems (e.g. splunk)
  33. Conclusion Once parsed and logged, we need systems to... -

    Analyze requests for anomalies (ML?) - Who sends base64 messages over twitter other than a bot?