Data Center Security Testing Tool: Infection Monkey

2018-03-18T15:03:48
ID N0WHERE:103067
Type n0where
Reporter N0where
Modified 2018-03-18T15:03:48

Description

The Infection Monkey is an open source security tool for testing a data center’s resiliency to perimeter breaches and internal server infection. The Monkey uses various methods to self propagate across a data center and reports success to a centralized Command and Control(C&C) server.

The Infection Monkey is comprised of two parts:

  • Monkey – A tool which infects other machines and propagates to them
  • Monkey Island – A C&C server with a dedicated UI to visualize the Chaos Monkey’s progress inside the data center

Main Features

The Infection Monkey uses the following techniques and exploits to propagate to other machines.

  • Multiple propagation techniques:
    • Predefined passwords
    • Common logical exploits
    • Password stealing using mimikatz
  • Multiple exploit methods:
    • SSH
    • SMB
    • RDP
    • WMI
    • Shellshock
    • Conficker
    • SambaCry
    • Elastic Search (CVE-2015-1427)

Requirements

The C&C Server has been tested on Ubuntu 14.04,15.04 and 16.04. The Monkey itself has been tested on Windows XP, 7, 8.1 and 10. The Linux build has been tested on Ubuntu server (multiple versions).

Installation

For off-the-shelf use, download a Debian package from our website and follow the guide . Warning! The Debian package will uninstall the python library ‘bson’ because of an issue with pymongo. You can reinstall it later, but monkey island will probably not work.

To manually set up and the C&C server follow the instructions on Monkey Island readme . If you wish to compile the binaries yourself, follow the instructions under Building the Monkey from Source.

Start Infecting

After installing the Infection Monkey on a server of your choice, just browse https://your-server-ip:5000 and follow the instructions to start infecting.

How the Monkey works

  1. Wakeup connection to c&c, sends basic info of the current machine and the configuration the monkey uses to the c&c.
    1. First try direct connection to c&c.
    2. If direct connection fails, try connection through a tunnel, a tunnel is found according to specified parameter (the default tunnel) or by sending a multicast query and waiting for another monkey to answer.
    3. If no connection can be made to c&c, continue without it.
  2. If a firewall app is running on the machine (supports Windows Firewall for Win XP and Windows Advanced Firewall for Win 7+), try to add a rule to allow all our traffic.
  3. Startup of tunnel for other Monkeys (if connection to c&c works).
    1. Firewall is checked to allow listening sockets (if we failed to add a rule to Windows firewall for example, the tunnel will not be created)
    2. Will answer multicast requests from other Monkeys in search of a tunnel.
  4. Running exploitation sessions, will run x sessions according to configuration:
    1. Connect to c&c and get the latest configuration
    2. Scan ip ranges according to configuration.
    3. Try fingerprinting each host that answers, using the classes defined in the configuration (SMBFinger, SSHFinger, etc)
    4. Try exploitation on each host found, for each exploit class in configuration:
    5. check exploit class supports target host (can be disabled by configuration)
    6. each exploitation class will use the data acquired in fingerprinting, or during the exploit, to find the suitable Monkey executable for the host from the c&c.
      1. If c&c connection fails, and the source monkey’s executable is suitable, we use it.
      2. If a suitable executable isn’t found, exploitation will fail.
      3. Executables are cached in memory.
    7. will skip hosts that are already exploited in next run
    8. will skip hosts that failed during exploitation in next run (can be disabled by configuration)
  5. Close tunnel before exiting Wait for monkeys using the tunnel to unregister for it Cleanup Remove firewall rules if added

Data Center Security Testing Tool: Infection Monkey Download