Giter VIP home page Giter VIP logo

guardicore / monkey Goto Github PK

View Code? Open in Web Editor NEW
6.5K 243.0 759.0 74.76 MB

Infection Monkey - An open-source adversary emulation platform

Home Page: https://www.guardicore.com/infectionmonkey/

License: GNU General Public License v3.0

Python 74.59% Batchfile 0.10% CSS 4.40% HTML 0.04% JavaScript 7.80% Shell 1.50% PowerShell 1.19% HCL 1.95% Starlark 0.01% SCSS 0.85% TypeScript 7.50% Dockerfile 0.04% Java 0.01% Makefile 0.02%
penetration-testing security-tools security-automation infection-monkey adversary-emulation

monkey's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monkey's Issues

Support subnet in config

The monkey should be able to scan a specific subnet (or several subnets) by listing the subnet in the config, and not by specific IPs

Detect and display cross-segment traffic between specific subnets

The user should be able to easily specify subnet pairs which shouldn't be accessible from one another.
The monkey should be able to detect whether or not they are accessible (given it's on one of the networks).
The monkey island should display all irregularities on the report.

UI - Color code the telemetry log

We should color code the telemetry as it's very noisy. Status reports (state, tunnel, system_info_collection), scan attempts, exploit attempts.

Maybe green/yellow/red.

Implement Oracle WebLogic Vulnerability

Expected Behavior

We'd like to implement an exploit for the Oracle WebLogic vulnerability (CVE-2017-10271).

List of URLs we should cover

  • /wls-wsat/CoordinatorPortType
  • /wls-wsat/CoordinatorPortType11
  • /wls-wsat/ParticipantPortType
  • /wls-wsat/ParticipantPortType11
  • /wls-wsat/RegistrationPortTypeRPC
  • /wls-wsat/RegistrationPortTypeRPC11
  • /wls-wsat/RegistrationRequesterPortType
  • /wls-wsat/RegistrationRequesterPortType11

Exploit logic should be similar to the Shellshock module.

TypeError: _cast_by_example

Expected Behavior

Not raise a TypeError

Actual Behavior

Raises a TypeError

Steps to Reproduce the Problem

  1. Call _cast_by_example with a value which isn't None and example as a tuple with a minimum length of 1.
>>> _cast_by_example('value', ('example',))
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "<input>", line 14, in _cast_by_example
TypeError: 'NoneType' object is not iterable

The problem is in this line:

if value is None or value == tuple(None):

The issue is calling tuple(None):

>>> tuple(None)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: 'NoneType' object is not iterable

Potential Fix

The problem line is almost exactly the same as this line (four lines below the problem line):

if value is None or value == [None]:

After looking at that, it seems like a potential fix would be either:

if value is None or value == (None,):
# or
if value is None or value == tuple([None]):

Both of these produce a tuple with one element which is None.

>>> (None,)
(None,)
>>> tuple([None])
(None,)

I didn't send a PR since I wasn't exactly sure if this would be correct and if so, which one of these would be preferred.

UI: mark newly added hosts

When viewing the admin page, mark in some way new monkeys that were just added so it will be easier to notice

Exploit: Identify host dissapearance in the middle of the connection

When hpvm session expires (i.e. max timeout), ot when a real machine brutally disappears in the middle of the attack, monkey should skip this victim after a while and not stuck in a loop.

Example of the loop:
2015-08-31 00:15:23,292 [3788:DEBUG] exploit.new_smb_connection.385: SMB connect
ion to <VictimHost 200.200.200.8> on port 445 failed, trying port 139 ([Errno 10
060] A connection attempt failed because the connected party did not properly re
spond after a period of time, or established connection failed because connected
host has failed to respond (200.200.200.8:445))
2015-08-31 00:15:48,875 [3788:DEBUG] exploit.new_smb_connection.391: SMB connect
ion to <VictimHost 200.200.200.8> on port 139 failed as well ([Errno 10060] A co
nnection attempt failed because the connected party did not properly respond aft
er a period of time, or established connection failed because connected host has
failed to respond (200.200.200.8:139))
2015-08-31 00:16:10,450 [3788:DEBUG] exploit.new_smb_connection.385: SMB connect
ion to <VictimHost 200.200.200.8> on port 445 failed, trying port 139 ([Errno 10
060] A connection attempt failed because the connected party did not properly re
spond after a period of time, or established connection failed because connected
host has failed to respond (200.200.200.8:445))

Failed to start Monkey Island Mongo Service

At first monkey-island.service wouldn't start but fixed it by removing bson

sudo pip uninstall bson
sudo pip uninstall pymongo
sudo pip install pymongo

But isn't starting also and I have no idea how to fix it

● monkey-island.service - Monkey Island Service
   Loaded: loaded (/lib/systemd/system/monkey-island.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-05-17 21:47:00 CEST; 5min ago
 Main PID: 5428 (start_server.sh)
    Tasks: 4 (limit: 4915)
   Memory: 19.8M
      CPU: 403ms
   CGroup: /system.slice/monkey-island.service
           ├─5428 /bin/bash /var/monkey_island/ubuntu/systemd/start_server.sh
           └─5429 python main.py

May 17 21:47:00 Broadband systemd[1]: Started Monkey Island Service.

● monkey-mongo.service - Monkey Island Mongo Service
   Loaded: loaded (/lib/systemd/system/monkey-mongo.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2017-05-17 21:47:02 CEST; 5min ago
  Process: 5501 ExecStop=/var/monkey_island/bin/mongodb/bin/mongod --shutdown (code=exited, status=127)
  Process: 5500 ExecStart=/var/monkey_island/bin/mongodb/bin/mongod --quiet --dbpath /var/monkey_island/db (code=exited, status=127)
 Main PID: 5500 (code=exited, status=127)
      CPU: 3ms

May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Control process exited, code=exited status=127
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Unit entered failed state.
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Failed with result 'exit-code'.
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Service hold-off time over, scheduling restart.
May 17 21:47:02 Broadband systemd[1]: Stopped Monkey Island Mongo Service.
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Start request repeated too quickly.
May 17 21:47:02 Broadband systemd[1]: Failed to start Monkey Island Mongo Service.
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Unit entered failed state.
May 17 21:47:02 Broadband systemd[1]: monkey-mongo.service: Failed with result 'exit-code'.

Exploit: Set max_retries when copying monkey to the victim

In slow/problematic environments, like we experienced with NSX11 setup, host (many times its the hpvm) might repeatedly abort the smb copy of the monkey (which is 5MB+ file). In that case monkey stays in an endless loop of copy retries.

SSHExploiter False Alarm

Hi,
It seems that the Monkey agent detects services and hosts that do not exist on the network, related only to the SSHExploiter:

image

How can I provide more info?

Thanks,
Dvir

Upgrade 32bit monkey on 64bit windows

Currently, the monkey can't tell if the target windows machine is 32bit or 64bit, so the 32bit version is used for both.
There are several problems with this. In order to solve the issue, the monkey should upgrade to 64bit after it's started

UI: add tunnel lines

add lines to show which monkey tunneled through which, for helping diagnose the exploitation route

Monkey - Windows 64 builds fail when using ShellShock module

Windows 64 builds fail when using Shellshock, with the following error
2016-09-05 13:52:31,088 [11988:ERROR] monkey.start.173: Exception while attacking <VictimHost 10.0.1.160> using ShellShockExploiter: Gevent is required for grequests.

This doesn't happen in other builds.

Export Island's data

The Monkey Island's DB has a lot of data useful for debugging and for general analysis. Exporting the data should be easy, and accessible through the island's interface

Messy installation process

Hey guys,
I'm trying to wrap my head around the installation process:
Currently, your git readme file refers to the Setup page in the Wiki.
The setup page refers to the blog, where there is completely no installation steps.
The only installation steps i've found are in the monkey\monkey_island\readme.txt, and they are messy.

  1. I suggest to get all the info in one place.
  2. I recommend on creating an installation script for Debian and Ubuntu (using bash).
  3. Explaining more on the folders hierarchy as it is unclear.

Thank you very much, can't wait to try it.
Dviros.

"run.sh"_not_present

Expected Behavior

https://github.com/guardicore/monkey/tree/master/monkey_island says => run run.sh (located under /linux)

Actual Behavior

There is no "run.sh"

Steps to Reproduce the Problem

:~/monkey/monkey_island/linux# ls -alh
total 28K
drwxr-xr-x 3 root root 4.0K Feb 8 18:57 .
drwxr-xr-x 6 root root 4.0K Feb 9 20:11 ..
-rw-r--r-- 1 root root 102 Feb 8 18:57 clear_db.sh
-rw-r--r-- 1 root root 303 Feb 8 18:57 create_certificate.sh
-rw-r--r-- 1 root root 265 Feb 8 18:57 install.sh
-rw-r--r-- 1 root root 265 Feb 8 18:57 monkey.sh
drwxr-xr-x 3 root root 4.0K Feb 8 18:57 ubuntu

Specifications

  • Version: Kali 2018.1
  • Platform:
  • Subsystem:

Add kill triggers

Add multiple kill triggers to allow stopping the Monkey's operation.

  1. Add a crossplatform "kill file" that if found, prevents the Monkey from running in any configuration.
  2. Add a "safe list" in the C&C server to be checked by the Monkey before every attack attempt, if the machine is found in the list, no attack.
  3. The monkey will also check it's not on the safe list upon starting up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.