SlideShare ist ein Scribd-Unternehmen logo
1 von 21
whoami

Security researcher. Code monkey. Beer lover.

Head of Red Team Ops.

Primary security researcher

Study bot nets with a focus on alt. CnC schemes

Blog about stuff, sometimes.
https://the-it-ninja.blogspot.com/
https://www.linkedin.com/in/daniel-reilly-58b28171
What this talk is NOT about

Building Bots (There is plenty on this)

Protocol details (There are a lot of them)

Every CnC architecture
− Storm Style P2P (Overnet)

Exploiting anything (sorry!)

Designing a web interface
What this talk IS about

Designing Resilient CnC architectures

Using Python to build cool stuff

Virtuous vs. Malicious bot nets

Trust anchors (public/private keys/passwords)

Thinking about different ways to pass information.
Why R.Y.O.

Avoid Detection
− Keep your CnCs off blacklists by customizing their
fingerprint

Customize Attacks
− Design your Control Servers with an idea of the
objectives for your bots
− Only use communication methods that make
sense in your environment. Do not use IRC. Pretty
much ever.

Bypass Firewall Rules
− Most companies still rely on Blacklisting or
Botnet Taxonomy
A Bot net taxonomy model from North Western
University's CS department.

Attacking Behavior (Info stealing)

Rally Mechanisms (static or random)

Communication Protocols (DNS, HTTPS, etc.)

Observable bot net activities (Host, Network and
Global Correlated monitoring)

Evasion Techniques (Fast Flux)
http://www.cs.northwestern.edu/~ychen/classes/msit458
-s09/Botnets_defense.ppt
Architectural Goals

Resilient to take-down
− Multiple domains for DNS rally points.
− Fast Flux DNS server Ips for as many DNS
servers as you can manage to harvest
− Private GitHub accounts, SIP servers, etc.
− Test your server UI for command and SQL
injection
− Private Key sign commands and encrypted
responses
− Station To Station Encryption

Avoid detection
Layered/Distributed Architecture
Two examples of Distributed architecture. Web
servers are API points which talk to the
underlying DNS points
1. diagram 1 shows a bot master connecting via
Tor to the CnC web layer which manage 4 rally
points.
2. diagram 2 shows a recursive or “me-
centralized” network where the primary cnc
distributes commands to all other API points
which repeat this until an API point with no
rallypoints is reached.
Communication Channels

HTTPS (HTTPLib)
− Hides well in normal traffic
− Encrypted == Trusted (DPI mostly ignores it *see
note below)
− GitHub, Slack, Twitter, Custom Site, etc.
*As of IDP Release 5.0r2, Juniper IDP devices
support inspecting HTTPS traffic without the
servers private key
− Stego to obscure data transfers

SSH (Paramiko, SSHCommander)
− No client side piece (just an RSA key)
Where to put CnC Servers

“Borrowed” Servers (Outside the scope of this talk)
− Web shells
− Web App Exploits & Service Exploits

GitHub & other source code repos
− Almost no company blocks these sites
− Private accounts offer security
− Public accounts offer anonymity

Image/Video/File hosting sites
− S3 buckets, Dropboxes, Email Hosts, anywhere
you can store information can become part of your
CnC architecture
GitHub as a CnC platform

Generally Trusted

Great for virtuous botnets, okay for malicious
bots too.

A good start on this was done by Justin Seitz
in “Black Hat Python”.

To use the python library github3.py you need
to include it or wrap it in with your bot

Discovery exposes all bots associated with
that GitHub branch. Activity can be monitored
by anyone with bot credentials, even if they
can't decipher contents.
Who knows who this is?

What if 11B-X-1371 is a new method of CnC?
− Around 3000 still images compose the 2:00 video
− Audio Track can also hide data (not just the
Spectrographic images either).

YouTube, Vimeo, etc., all have posting APIs that
make them great locations to communicate with bots.

Traffic to these sites is high on a lot of networks

APT29 delivers HAMMERTOSS using
Steganography already!
Demo LOSTDOG
DNS Fast Flux (boto.route53)

Single Flux updates “A” Records (list of IP
associated) for a domain.
− Used to rapidly change the list of known servers
available to bots. Can be other bots or CnC points.
− Bypasses IP blocking
− Looks like a Load-Balancer unless you map it over
time

Double Flux also updates “NS” Records
− Use this to change a bots DNS rally points
− Double flux is ~twice as hard to detect and block

All the “cool kids” are doing it.
https://en.wikipedia.org/wiki/Fast_flux DNS Robtex Analysis of a Fast flux domain
How to build the CnC

Obfuscate communication channels
− HTTPS Encryption
− Steganography
− Onion routing
− Port Knocking

Language: Python
− Paramiko (SSH module)
− Github3
− Stepic (stego module)
− Py2Exe or PyInstaller to compile binaries
DNS For Comm (tunneling)

E.G. FeederBot, Morto (~2010)
− Use valid DNS TXT record requests
− Inject Shellcode directly into memory

Hard to block
− Combining Fast Flux with DNS tunneling creates a
resilient rally point layer
− All record types (MX, NS, A, TXT, C, etc) can be
used so blocking TXT is not an effective
prevention mechanism.

Drawbacks
− DNS servers can be compared to network settings
Python DNS Tunnel
HTTPS For Comm

HTTPS Used to communicate larger amounts
of data

Multiple parts of the CnC arch. rely on this
− Bot → Website data dumps
− Master → CnC command propagation
− CnC → Website Data retrievals

Larger bot commands
− Bot pulls new python modules from Github repo
− Allows for nearly limitless configurations of the
CnC arch.

How NOT to Build the CnC

RA1NX
− unauthenticated “pubcall” method
− PHP/IRC portals in general

Torpig
− Reverse Engineered Domain Flux algorithm in bot
− Hijacked botnet because of trusting bots.

Zemra Bot
− Intentionally backdoored

ICE IX, Citadel, or Zeus
− Exposed through Google Dorks
Push Instead of Pull

Good
− Bots passively listen for commands on an SSH
port
− Discovering a bot does not expose bot net size
− No knowledge of Bot Master to leak
− Good for CnC layer updating
− Talk given on doing this in javascript by Diogo
Mónica and Carlos Ribeiro

https://www.youtube.com/watch?v=6iM2jbheJ-0

Bad
− Relatively easy to block. Most networks block
Detecting private CnC Servers

HoneyNet YAPDNS for Fast Flux detection

https://github.com/honeynet/yapdns

Custom ClamAV/YARA Signatures

DetectPyDNSResponder:0:646e736c6962*444e5352
65636f72642e70617273650

iptables -I INPUT -p tcp ! -s <DNS_IP> --dport 53 -j
LOGIT

LOGIT chain checks ! -s <DNS_IP_2> and either
logs it as a primary DNS failure and jumps to
ACCEPT or as an attack and DROPs

Weitere ähnliche Inhalte

Was ist angesagt?

Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap OWASP Delhi
 
Keeping your rack cool
Keeping your rack cool Keeping your rack cool
Keeping your rack cool Pavel Odintsov
 
What can possibly go wrong? Why eSport needs an AntiDDoS Protection
What can possibly go wrong? Why eSport needs an AntiDDoS ProtectionWhat can possibly go wrong? Why eSport needs an AntiDDoS Protection
What can possibly go wrong? Why eSport needs an AntiDDoS ProtectionJakub Słociński
 
BGP FlowSpec experience and future developments
BGP FlowSpec experience and future developmentsBGP FlowSpec experience and future developments
BGP FlowSpec experience and future developmentsPavel Odintsov
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KernelThomas Graf
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionRedge Technologies
 
DevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoMDevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoMGuillaume Arnaud
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATThomas Graf
 
Protect your edge BGP security made simple
Protect your edge BGP security made simpleProtect your edge BGP security made simple
Protect your edge BGP security made simplePavel Odintsov
 
Ultra fast DDoS Detection with FastNetMon at Coloclue (AS 8283)
Ultra	fast	DDoS Detection	with	FastNetMon at	 Coloclue	(AS	8283)Ultra	fast	DDoS Detection	with	FastNetMon at	 Coloclue	(AS	8283)
Ultra fast DDoS Detection with FastNetMon at Coloclue (AS 8283)Pavel Odintsov
 
FastNetMonを試してみた
FastNetMonを試してみたFastNetMonを試してみた
FastNetMonを試してみたYutaka Ishizaki
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqRuben Tan
 
Ripe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigationRipe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigationPavel Odintsov
 
Using metasploit
Using metasploitUsing metasploit
Using metasploitCyberRad
 

Was ist angesagt? (20)

Jon Nield FastNetMon
Jon Nield FastNetMonJon Nield FastNetMon
Jon Nield FastNetMon
 
Recon with Nmap
Recon with Nmap Recon with Nmap
Recon with Nmap
 
Keeping your rack cool
Keeping your rack cool Keeping your rack cool
Keeping your rack cool
 
What can possibly go wrong? Why eSport needs an AntiDDoS Protection
What can possibly go wrong? Why eSport needs an AntiDDoS ProtectionWhat can possibly go wrong? Why eSport needs an AntiDDoS Protection
What can possibly go wrong? Why eSport needs an AntiDDoS Protection
 
BGP FlowSpec experience and future developments
BGP FlowSpec experience and future developmentsBGP FlowSpec experience and future developments
BGP FlowSpec experience and future developments
 
Nsq meetup-messaging
Nsq meetup-messagingNsq meetup-messaging
Nsq meetup-messaging
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
ExaProxy
ExaProxyExaProxy
ExaProxy
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
 
Snaps on open suse
Snaps on open suseSnaps on open suse
Snaps on open suse
 
redGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solutionredGuardian DP100 large scale DDoS mitigation solution
redGuardian DP100 large scale DDoS mitigation solution
 
DevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoMDevoxxFR 2016 - 3 degrees of MoM
DevoxxFR 2016 - 3 degrees of MoM
 
Open vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NATOpen vSwitch - Stateful Connection Tracking & Stateful NAT
Open vSwitch - Stateful Connection Tracking & Stateful NAT
 
Protect your edge BGP security made simple
Protect your edge BGP security made simpleProtect your edge BGP security made simple
Protect your edge BGP security made simple
 
Scapy talk
Scapy talkScapy talk
Scapy talk
 
Ultra fast DDoS Detection with FastNetMon at Coloclue (AS 8283)
Ultra	fast	DDoS Detection	with	FastNetMon at	 Coloclue	(AS	8283)Ultra	fast	DDoS Detection	with	FastNetMon at	 Coloclue	(AS	8283)
Ultra fast DDoS Detection with FastNetMon at Coloclue (AS 8283)
 
FastNetMonを試してみた
FastNetMonを試してみたFastNetMonを試してみた
FastNetMonを試してみた
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromqDistributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
 
Ripe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigationRipe71 FastNetMon open source DoS / DDoS mitigation
Ripe71 FastNetMon open source DoS / DDoS mitigation
 
Using metasploit
Using metasploitUsing metasploit
Using metasploit
 

Andere mochten auch

11 de septiembre - Día del Maestro.
11 de septiembre - Día del Maestro.11 de septiembre - Día del Maestro.
11 de septiembre - Día del Maestro.danipresta
 
WebDynPro for Java Common Error v5
WebDynPro for Java  Common Error v5WebDynPro for Java  Common Error v5
WebDynPro for Java Common Error v5Jodi Johnson
 
GADGET STUDIO sponsorship presentation
GADGET STUDIO sponsorship presentationGADGET STUDIO sponsorship presentation
GADGET STUDIO sponsorship presentationNickolay Turubar
 
Helping our insurance clients win, grow and manage clients
Helping our insurance clients win, grow and manage clientsHelping our insurance clients win, grow and manage clients
Helping our insurance clients win, grow and manage clientsMercuri International
 
Extrabacon's sploit core
Extrabacon's sploit coreExtrabacon's sploit core
Extrabacon's sploit coreDaniel Reilly
 
No estas deprimido sino distraído sebas 10 10
No estas deprimido sino distraído sebas 10 10No estas deprimido sino distraído sebas 10 10
No estas deprimido sino distraído sebas 10 10Sebastian Avila Badilla
 
Historia de la publicidad
Historia de la publicidadHistoria de la publicidad
Historia de la publicidadSebastian Ortiz
 
Productivity Measurement System
Productivity Measurement SystemProductivity Measurement System
Productivity Measurement SystemShahtaj Keerio
 
презентация Microsoft office power point 2007
презентация Microsoft office power point 2007презентация Microsoft office power point 2007
презентация Microsoft office power point 2007Adrian Savko
 
презентація
презентаціяпрезентація
презентаціяAdrian Savko
 
Виховна система школи як оптимальний простір життєтворчості
Виховна система школи як оптимальний простір життєтворчостіВиховна система школи як оптимальний простір життєтворчості
Виховна система школи як оптимальний простір життєтворчостіAdrian Savko
 
презентацияпроведення місячника
презентацияпроведення місячникапрезентацияпроведення місячника
презентацияпроведення місячникаAdrian Savko
 

Andere mochten auch (20)

Suelo
SueloSuelo
Suelo
 
11 de septiembre - Día del Maestro.
11 de septiembre - Día del Maestro.11 de septiembre - Día del Maestro.
11 de septiembre - Día del Maestro.
 
Suelo
SueloSuelo
Suelo
 
WebDynPro for Java Common Error v5
WebDynPro for Java  Common Error v5WebDynPro for Java  Common Error v5
WebDynPro for Java Common Error v5
 
Eduar perea ppp
Eduar perea pppEduar perea ppp
Eduar perea ppp
 
GADGET STUDIO sponsorship presentation
GADGET STUDIO sponsorship presentationGADGET STUDIO sponsorship presentation
GADGET STUDIO sponsorship presentation
 
Helping our insurance clients win, grow and manage clients
Helping our insurance clients win, grow and manage clientsHelping our insurance clients win, grow and manage clients
Helping our insurance clients win, grow and manage clients
 
Publicidad social
Publicidad socialPublicidad social
Publicidad social
 
Cuaderno virtual 801 (2)
Cuaderno virtual 801 (2)Cuaderno virtual 801 (2)
Cuaderno virtual 801 (2)
 
Extrabacon's sploit core
Extrabacon's sploit coreExtrabacon's sploit core
Extrabacon's sploit core
 
Cuaderno virtual 801 (2)
Cuaderno virtual 801 (2)Cuaderno virtual 801 (2)
Cuaderno virtual 801 (2)
 
No estas deprimido sino distraído sebas 10 10
No estas deprimido sino distraído sebas 10 10No estas deprimido sino distraído sebas 10 10
No estas deprimido sino distraído sebas 10 10
 
Historia de la publicidad
Historia de la publicidadHistoria de la publicidad
Historia de la publicidad
 
Etiologias del dano_cerebral
Etiologias del dano_cerebralEtiologias del dano_cerebral
Etiologias del dano_cerebral
 
Productivity Measurement System
Productivity Measurement SystemProductivity Measurement System
Productivity Measurement System
 
Tipos de transferencia de calor
Tipos de transferencia de calorTipos de transferencia de calor
Tipos de transferencia de calor
 
презентация Microsoft office power point 2007
презентация Microsoft office power point 2007презентация Microsoft office power point 2007
презентация Microsoft office power point 2007
 
презентація
презентаціяпрезентація
презентація
 
Виховна система школи як оптимальний простір життєтворчості
Виховна система школи як оптимальний простір життєтворчостіВиховна система школи як оптимальний простір життєтворчості
Виховна система школи як оптимальний простір життєтворчості
 
презентацияпроведення місячника
презентацияпроведення місячникапрезентацияпроведення місячника
презентацияпроведення місячника
 

Ähnlich wie Resilient CnC Architectures for Botnets

WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?SeanDuBois3
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat Security Conference
 
Tcp Anonymous Authenticated ID
Tcp Anonymous Authenticated IDTcp Anonymous Authenticated ID
Tcp Anonymous Authenticated IDJim MacLeod
 
FOSDEM 2020: How can we make WebRTC Easier?
FOSDEM 2020: How can we make WebRTC Easier?FOSDEM 2020: How can we make WebRTC Easier?
FOSDEM 2020: How can we make WebRTC Easier?SeanDuBois3
 
Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Alec Muffett
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with TeleportFaelix Ltd
 
Why and How to use Onion Networking - #EMFCamp2018
Why and How to use Onion Networking - #EMFCamp2018Why and How to use Onion Networking - #EMFCamp2018
Why and How to use Onion Networking - #EMFCamp2018Alec Muffett
 
Design Reviewing The Web
Design Reviewing The WebDesign Reviewing The Web
Design Reviewing The Webamiable_indian
 
Dmk Bo2 K7 Web
Dmk Bo2 K7 WebDmk Bo2 K7 Web
Dmk Bo2 K7 Webroyans
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationOlehLevytskyi1
 
Hacking Robotics(English Version)
Hacking Robotics(English Version)Hacking Robotics(English Version)
Hacking Robotics(English Version)Kensei Demura
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkShun Shiku
 
The Network Protocol Stack Revisited
The Network Protocol Stack RevisitedThe Network Protocol Stack Revisited
The Network Protocol Stack Revisitedinbroker
 
Tungsten Fabric Overview
Tungsten Fabric OverviewTungsten Fabric Overview
Tungsten Fabric OverviewMichelle Holley
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...PROIDEA
 

Ähnlich wie Resilient CnC Architectures for Botnets (20)

WebRTC, Whats in it for me?
WebRTC, Whats in it for me?WebRTC, Whats in it for me?
WebRTC, Whats in it for me?
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
 
BitTorrent on iOS
BitTorrent on iOSBitTorrent on iOS
BitTorrent on iOS
 
DevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSocketsDevCon 5 (July 2013) - WebSockets
DevCon 5 (July 2013) - WebSockets
 
Tcp Anonymous Authenticated ID
Tcp Anonymous Authenticated IDTcp Anonymous Authenticated ID
Tcp Anonymous Authenticated ID
 
class12_Networking2
class12_Networking2class12_Networking2
class12_Networking2
 
FOSDEM 2020: How can we make WebRTC Easier?
FOSDEM 2020: How can we make WebRTC Easier?FOSDEM 2020: How can we make WebRTC Easier?
FOSDEM 2020: How can we make WebRTC Easier?
 
Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5Setting Up .Onion Addresses for your Enterprise, v3.5
Setting Up .Onion Addresses for your Enterprise, v3.5
 
Bastion jump hosts with Teleport
Bastion jump hosts with TeleportBastion jump hosts with Teleport
Bastion jump hosts with Teleport
 
Why and How to use Onion Networking - #EMFCamp2018
Why and How to use Onion Networking - #EMFCamp2018Why and How to use Onion Networking - #EMFCamp2018
Why and How to use Onion Networking - #EMFCamp2018
 
Design Reviewing The Web
Design Reviewing The WebDesign Reviewing The Web
Design Reviewing The Web
 
Dmk Bo2 K7 Web
Dmk Bo2 K7 WebDmk Bo2 K7 Web
Dmk Bo2 K7 Web
 
Hunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentationHunting for APT in network logs workshop presentation
Hunting for APT in network logs workshop presentation
 
Hacking Robotics(English Version)
Hacking Robotics(English Version)Hacking Robotics(English Version)
Hacking Robotics(English Version)
 
Write Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle FrameworkWrite Smart Contracts with Truffle Framework
Write Smart Contracts with Truffle Framework
 
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on KamailioAstricon 10 (October 2013) - SIP over WebSocket on Kamailio
Astricon 10 (October 2013) - SIP over WebSocket on Kamailio
 
Deploy your own P2P network
Deploy your own P2P networkDeploy your own P2P network
Deploy your own P2P network
 
The Network Protocol Stack Revisited
The Network Protocol Stack RevisitedThe Network Protocol Stack Revisited
The Network Protocol Stack Revisited
 
Tungsten Fabric Overview
Tungsten Fabric OverviewTungsten Fabric Overview
Tungsten Fabric Overview
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...
 

Kürzlich hochgeladen

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Resilient CnC Architectures for Botnets

  • 1. whoami  Security researcher. Code monkey. Beer lover.  Head of Red Team Ops.  Primary security researcher  Study bot nets with a focus on alt. CnC schemes  Blog about stuff, sometimes. https://the-it-ninja.blogspot.com/ https://www.linkedin.com/in/daniel-reilly-58b28171
  • 2. What this talk is NOT about  Building Bots (There is plenty on this)  Protocol details (There are a lot of them)  Every CnC architecture − Storm Style P2P (Overnet)  Exploiting anything (sorry!)  Designing a web interface
  • 3. What this talk IS about  Designing Resilient CnC architectures  Using Python to build cool stuff  Virtuous vs. Malicious bot nets  Trust anchors (public/private keys/passwords)  Thinking about different ways to pass information.
  • 4. Why R.Y.O.  Avoid Detection − Keep your CnCs off blacklists by customizing their fingerprint  Customize Attacks − Design your Control Servers with an idea of the objectives for your bots − Only use communication methods that make sense in your environment. Do not use IRC. Pretty much ever.  Bypass Firewall Rules − Most companies still rely on Blacklisting or
  • 5. Botnet Taxonomy A Bot net taxonomy model from North Western University's CS department.  Attacking Behavior (Info stealing)  Rally Mechanisms (static or random)  Communication Protocols (DNS, HTTPS, etc.)  Observable bot net activities (Host, Network and Global Correlated monitoring)  Evasion Techniques (Fast Flux) http://www.cs.northwestern.edu/~ychen/classes/msit458 -s09/Botnets_defense.ppt
  • 6. Architectural Goals  Resilient to take-down − Multiple domains for DNS rally points. − Fast Flux DNS server Ips for as many DNS servers as you can manage to harvest − Private GitHub accounts, SIP servers, etc. − Test your server UI for command and SQL injection − Private Key sign commands and encrypted responses − Station To Station Encryption  Avoid detection
  • 7. Layered/Distributed Architecture Two examples of Distributed architecture. Web servers are API points which talk to the underlying DNS points 1. diagram 1 shows a bot master connecting via Tor to the CnC web layer which manage 4 rally points. 2. diagram 2 shows a recursive or “me- centralized” network where the primary cnc distributes commands to all other API points which repeat this until an API point with no rallypoints is reached.
  • 8. Communication Channels  HTTPS (HTTPLib) − Hides well in normal traffic − Encrypted == Trusted (DPI mostly ignores it *see note below) − GitHub, Slack, Twitter, Custom Site, etc. *As of IDP Release 5.0r2, Juniper IDP devices support inspecting HTTPS traffic without the servers private key − Stego to obscure data transfers  SSH (Paramiko, SSHCommander) − No client side piece (just an RSA key)
  • 9. Where to put CnC Servers  “Borrowed” Servers (Outside the scope of this talk) − Web shells − Web App Exploits & Service Exploits  GitHub & other source code repos − Almost no company blocks these sites − Private accounts offer security − Public accounts offer anonymity  Image/Video/File hosting sites − S3 buckets, Dropboxes, Email Hosts, anywhere you can store information can become part of your CnC architecture
  • 10. GitHub as a CnC platform  Generally Trusted  Great for virtuous botnets, okay for malicious bots too.  A good start on this was done by Justin Seitz in “Black Hat Python”.  To use the python library github3.py you need to include it or wrap it in with your bot  Discovery exposes all bots associated with that GitHub branch. Activity can be monitored by anyone with bot credentials, even if they can't decipher contents.
  • 11. Who knows who this is?  What if 11B-X-1371 is a new method of CnC? − Around 3000 still images compose the 2:00 video − Audio Track can also hide data (not just the Spectrographic images either).  YouTube, Vimeo, etc., all have posting APIs that make them great locations to communicate with bots.  Traffic to these sites is high on a lot of networks  APT29 delivers HAMMERTOSS using Steganography already! Demo LOSTDOG
  • 12. DNS Fast Flux (boto.route53)  Single Flux updates “A” Records (list of IP associated) for a domain. − Used to rapidly change the list of known servers available to bots. Can be other bots or CnC points. − Bypasses IP blocking − Looks like a Load-Balancer unless you map it over time  Double Flux also updates “NS” Records − Use this to change a bots DNS rally points − Double flux is ~twice as hard to detect and block  All the “cool kids” are doing it.
  • 13. https://en.wikipedia.org/wiki/Fast_flux DNS Robtex Analysis of a Fast flux domain
  • 14. How to build the CnC  Obfuscate communication channels − HTTPS Encryption − Steganography − Onion routing − Port Knocking  Language: Python − Paramiko (SSH module) − Github3 − Stepic (stego module) − Py2Exe or PyInstaller to compile binaries
  • 15. DNS For Comm (tunneling)  E.G. FeederBot, Morto (~2010) − Use valid DNS TXT record requests − Inject Shellcode directly into memory  Hard to block − Combining Fast Flux with DNS tunneling creates a resilient rally point layer − All record types (MX, NS, A, TXT, C, etc) can be used so blocking TXT is not an effective prevention mechanism.  Drawbacks − DNS servers can be compared to network settings
  • 16.
  • 18. HTTPS For Comm  HTTPS Used to communicate larger amounts of data  Multiple parts of the CnC arch. rely on this − Bot → Website data dumps − Master → CnC command propagation − CnC → Website Data retrievals  Larger bot commands − Bot pulls new python modules from Github repo − Allows for nearly limitless configurations of the CnC arch. 
  • 19. How NOT to Build the CnC  RA1NX − unauthenticated “pubcall” method − PHP/IRC portals in general  Torpig − Reverse Engineered Domain Flux algorithm in bot − Hijacked botnet because of trusting bots.  Zemra Bot − Intentionally backdoored  ICE IX, Citadel, or Zeus − Exposed through Google Dorks
  • 20. Push Instead of Pull  Good − Bots passively listen for commands on an SSH port − Discovering a bot does not expose bot net size − No knowledge of Bot Master to leak − Good for CnC layer updating − Talk given on doing this in javascript by Diogo Mónica and Carlos Ribeiro  https://www.youtube.com/watch?v=6iM2jbheJ-0  Bad − Relatively easy to block. Most networks block
  • 21. Detecting private CnC Servers  HoneyNet YAPDNS for Fast Flux detection  https://github.com/honeynet/yapdns  Custom ClamAV/YARA Signatures  DetectPyDNSResponder:0:646e736c6962*444e5352 65636f72642e70617273650  iptables -I INPUT -p tcp ! -s <DNS_IP> --dport 53 -j LOGIT  LOGIT chain checks ! -s <DNS_IP_2> and either logs it as a primary DNS failure and jumps to ACCEPT or as an attack and DROPs