I’m starting with my malware lab but before you read maybe you are interested in REMnux a Linux Distribution for Reverse-Engineering Malware that offers many analysis tools.
My lab will consist in two virtual hosts, one of them will be the victim where all the malware will be executed and the other will act as a server offering “Internet” services to the victim. The hosts will be placed in the 192.168.10.0/24 network (Server 192.168.10.1 and Client 192.168.10.2)
The first service I’m going to configure is DNS and for this task I’ll use DJBDNS. Two years ago I started to hear about D.J Bernstein DNS which wasn’t affected by Dan Kaminsky‘s DNS flaw announce. I like security, so why not use tinydns for this task? The DNS server will be configured to answer queries for the malware.lab domain and it’ll act as a fake root name server.
You can install Tinydns using aptitude but I like to compile things
These are the steps I’ve followed.
- apt-get install build-essential
- useradd Gtinydns -s /bin/false
- useradd Gdnslog -s /bin/false
- mkdir -p /package
- chmod 1755 /package
- cd /package
- wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
- tar xvfz daemontools-0.76.tar.gz
- rm -f daemontools-0.76.tar.gz
- cd admin/daemontools-0.76/
- echo gcc -O2 -include /usr/include/errno.h > conf-cc (don´t forget this!)
- cd src/
- echo gcc -O2 -include /usr/include/errno.h > conf-cc (don´t forget this!)
- cd ..
- package/install
- cd /package
- wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
- tar xvfz ucspi-tcp-0.88.tar.gz
- rm ucspi-tcp-0.88.tar.gz
- cd ucspi-tcp-0.88/
- echo gcc -O2 -include /usr/include/errno.h > conf-cc (don´t forget this!)
- make
- make setup check
- cd /package
- wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
- tar xvfz djbdns-1.05.tar.gz
- rm djbdns-1.05.tar.gz
- echo gcc -O2 -include /usr/include/errno.h > conf-cc
- make
- make setup check
- reboot
- tinydns-conf Gtinydns Gdnslog /etc/tinydns 192.168.10.1
- ln -s /etc/tinydns /service/tinydns
- sleep 5
- svstat /service/tinydns
- cd /service/tinydns/root
- ./add-ns . 192.168.10.1 (this server will answer all DNS queries with the same address 192.168.10.1) If you have problems be sure you add this entry to the /etc/tinydns/root/data file ( +*.:192.168.10.1 )
- ./add-host server.malware.lab 192.168.10.1
- ./add-host client.malware.lab 192.168.10.2
- ./add-ns 10.168.192.in-addr.arpa 192.168.10.1 (It will resolve inverse queries)
- make
And that’s it (41 steps!), I have a DNS server running… If you need more information visit DJBDNS page.
DJBDNS has been designed to be secure and it’s very easy to manage it (at least compared with BIND)
See ya!
Hey dude,
Are you still active?
Drop me an email, I gather you can see it.
Wanted to keep in touch, I too am setting up some honepots and IDS stuff, virtual environment etc. Half done…
Just wanted to create a group and talk to others doing similar projects and learn together. Swap samples, etc.
Cheers,