
En el primer post de honey expliqué como configurarlo y correrlo. En este me dedicaré a explicar las partes del archivo de configuración de modo que se puedan crear redes simples pero bien simuladas. Se pueden crear muchos escenarios complejos con esta herramienta, incluyendo el uso de rutas y diferentes tipos de dispositivos de red. Básicamente la estructura de un archivo de configuración de honeyd consiste en:
1. Personality (debe coincidir con el nombre exacto de un fingerprint del archivo de nmap (base de fingerprints usado para correr honeyd).
2. Puertos TCP y UDP
3. Acción por defecto de los puertos (default action, en el caso de que el puerto no sea especificado no debería responder)
4. Binds, para asignar la ip específica a una personalidad determinada.
Este es un archivo de configuración de ejemplo:
create template
set template personality "AIX 4.0 - 4.2"
add template tcp port 80 "sh scripts/web.sh"
add template tcp port 22 LISTEN
add template tcp port 23 proxy 192.168.110.10:23
add template udp port 100 LISTEN
set template default tcp action reset
set template default udp action reset
create template2
set template personality "Linux 2.2.14"
add template tcp port 80 LISTEN
add template tcp port 21 LISTEN
add template tcp port 22 proxy 192.168.110.5:22
add template udp port
set template2 default tcp action reset
set template2 default udp action reset
bind 10.0.0.1 template
bind 10.0.0.12 template2
bind 10.0.0.32 template
1. Personality: Los nombres template y template2 son simplemente etiquetas para nuestras personalidades. Como escribí anteriormente es importante asegurarse de que el nombre de la personalidad coincida con algún nombre exacto de un fingerprint en el archivo de fingerprints usado al correr honeyd.
2. Puertos TCP y UDP: Esto es muy importante para hacer la red mas realística. Hay varias formas de simular puertos:
a. Especificando el estado (ej: LISTEN o FILTERED)
b. Usando scripts (ej: sh scripts/web.sh, este script simula un web server) Pueden encontrarse algunos scripts en la página de honedy (www.honeyd.org) que pueden utilizarse para simular diferentes servicios.
c. Proxiando el puerto a una máquina física (ej: proxy 192.168.110.5:22). En este caso si nos conectamos al puerto en la red simulada en realidad nos estaríamos conectando al puerto de la máquina especificada luego de la palabra proxy.
3. Default action al puerto: Especificando esto nos aseguramos que ningún puerto que no se especifique en la lista no responda. Es necesario poner el comportamiento esperado por defecto como en el ejemplo.
4. Bindings: Con esto tenemos la posibilidad de asignar las ip a las diferentes personalidades usando la misma personalidad en diferentes ips.
También es posible reducir las comunicaciones a uno o muchos puertos usando la opción ‘tarpit’ para hacerlo más realista:
ej: add template tcp port 25 tarpit LISTEN
It is possible to create several complex scenarios with this tool, including the use of routers and many kind of devices. Basically the structure of the configuration file consist in:
1. Personality (it should match with the name of any available fingerprint in a nmap configuration file used to run honeyd).
2. TCP and UDP ports
3. Default action for the ports (in case that the port wasn’t specified, it should not respond)
4. Bindings to the specific ip addresses of our simulated network
This is an example configuration file:
create template
set template personality "AIX 4.0 - 4.2"
add template tcp port 80 "sh scripts/web.sh"
add template tcp port 22 LISTEN
add template tcp port 23 proxy 192.168.110.10:23
add template udp port 100 LISTEN
set template default tcp action reset
set template default udp action reset
create template2
set template personality "Linux 2.2.14"
add template tcp port 80 LISTEN
add template tcp port 21 LISTEN
add template tcp port 22 proxy 192.168.110.5:22
add template udp port
set template2 default tcp action reset
set template2 default udp action reset
bind 10.0.0.1 template
bind 10.0.0.12 template2
bind 10.0.0.32 template
1. Personality: The names template and template2 are just labels for our personalities. As I wrote before it is important to make sure that the name of the personality matches with any available name in the nmap fingerprints file used to run honeyd.
2. TCP and UDP ports: This is very important to make this more realistic. There are many ways to simulate ports:
a. Specifying the state (e.g. LISTEN or FILTERED).
b. Using scripts (e.g. sh scripts/web.sh, this script simulates a web server.) Some scripts can be found in the honeyd page (www.honeyd.org) that can be used to simulate many services.
c. By proxying the port to a physical box (e.g. proxy 192.168.110.5:22). In this case if we connect to the port in the simulated network we will be actually connecting to the computer specified after the word proxy.
3. Default action to the port: By specifying this we make sure that the ports not entered in the list will not respond. It is necessary only to put the default action like in the example.
4. Bindings: The great thing of this is that we can reuse the personalities many times in different ips in our simulated network. For example, we can have template and template2 and have many hosts as we can in the whole network, many of them will be the same but we can reuse them.
It is also possible to slow down communications in any or all ports by using the ‘tarpit’ option:
e.g: add template tcp port 25 tarpit LISTEN