Skip to content

Commit e723cd6

Browse files
committed
Merge branch '4213-docs-exploiters-feature-pages_vuln' into develop
Issue #4213 PR #4247
2 parents 96fc9ff + 7b0c18f commit e723cd6

File tree

12 files changed

+325
-4
lines changed

12 files changed

+325
-4
lines changed

docs/content/features/credentials_collectors/_index.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ collectors to steal credentials. Any stolen credentials are then sent to the
2626
Monkey Island, where they become immediately available for any Agent to use.
2727

2828
After the reconnaissance phase, the Agent will begin the propagation phase and
29-
attempt to compromise other hosts on the network. Exploiters are Infection
30-
Monkey plugins that attempt to spread copies of the Agent throughout the
31-
network. Some exploiters can use the credentials stolen by credentials
29+
attempt to compromise other hosts on the network using [exploiters](
30+
/features/exploiters). Some exploiters can use the credentials stolen by credentials
3231
collectors to gain access to other systems on the network. First, the exploiter
3332
will query the Monkey Island to retrieve credentials that were configured by
3433
the user and any credentials that were stolen by credentials collectors. Next,
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Exploiters"
3+
chapter: true
4+
pre: "<i class='fas fa-ethernet'></i> "
5+
---
6+
7+
# Exploiters
8+
9+
Exploiters are Infection Monkey plugins that attempt to infect machines
10+
throughout the network by spreading copies of the Agent.
11+
12+
## Mimicking attackers
13+
14+
During the propagation phase of an attack, attackers exploit the
15+
vulnerabilities that were identified in the reconnaissance phase to compromise
16+
networked systems. By exploiting the identified vulnerabilities, attackers are
17+
able to gain unauthorized access to systems, escalate privileges, or execute
18+
malicious actions.
19+
20+
## How exploiters work
21+
22+
After the Infection Monkey Agent completes the reconnaissance phase, it begins
23+
the propagation phase. In this phase, the Agent attempts to spread itself to
24+
as many systems on the network as possible. It does this by using the enabled
25+
exploiters to achieve remote code execution (RCE) on a vulnerable system; this
26+
step is known as "exploitation". After exploitation, the Agent completes the
27+
propagation phase by copying itself to the compromised system and launching a
28+
new Agent process.
29+
30+
Infection Monkey has several exploiters that mimic real-world attack vectors.
31+
Some exploiters are based on vulnerabilities while others use brute-force
32+
tactics to gain access. The majority of exploiters pose little or no risk to
33+
the performance or availability of targeted systems. Exploiters that are known
34+
to adversely impact production workloads are clearly marked as "unsafe" in the
35+
Monkey Island.
36+
37+
![Plugin marked as unsafe](/images/island/plugins-page/unsafe-plugin.png
38+
"Plugin marked as unsafe")
39+
40+
## Techniques
41+
42+
Infection Monkey offers the following exploiters:
43+
44+
{{% children /%}}
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Hadoop Exploiter"
3+
draft: false
4+
description: "Exploits Hadoop servers"
5+
tags: ["exploiter", "hadoop", "yarn"]
6+
pre: "<i class='fa fa-feather-pointed'></i> "
7+
---
8+
9+
## Apache Hadoop
10+
11+
[Apache Hadoop](https://hadoop.apache.org/) is a widely-used framework for
12+
distributed storage and processing of large data sets. Hadoop YARN is a
13+
component of the Hadoop ecosystem which is used for job scheduling/monitoring
14+
and cluster resource management.
15+
16+
## Exploitation
17+
18+
Hadoop servers with YARN are susceptible to RCE (remote
19+
code execution) attacks. The [Hadoop YARN ResourceManager REST API](
20+
https://apache.github.io/hadoop/hadoop-yarn/hadoop-yarn-site/WebServicesIntro.html
21+
) enables users to submit a new application with launch context, which allows
22+
arbitrary commands to be executed once the application is submitted
23+
successfully. By default, Hadoop YARN opens the RPC service to the public,
24+
giving attackers the ability to execute arbitrary commands and control the
25+
target server.
26+
27+
Infection Monkey's Hadoop exploiter works by submitting a new application to
28+
YARN. This application's launch context includes a custom command to download
29+
and execute the Agent on the compromised machine.
30+
31+
![Hadoop Configuration](
32+
/images/island/configuration-page/hadoop-exploiter-configuration.png
33+
"Hadoop Configuration")
34+
35+
## Mitigation
36+
37+
1. Hadoop recommends [updating security related settings appropriately](
38+
https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/SecureMode.html#Configuration
39+
). In this case, enabling Kerberos authentication is particularly valuable.
40+
41+
1. Allow only trusted connections to the Hadoop RPC service port.
42+
43+
## See also
44+
- [Hadoop exploiter reference documentation](/reference/exploiters/hadoop)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Log4Shell Exploiter"
3+
draft: false
4+
description: "Exploits the Log4Shell vulnerability"
5+
tags: ["exploiter", "log4shell", "log4j", "cve-2021-44228"]
6+
pre: "<i class='fa fa-mug-hot'></i> "
7+
---
8+
9+
{{% notice info %}}
10+
The Log4Shell exploiter exploits [CVE-2021-44228](
11+
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228).
12+
{{% /notice %}}
13+
14+
## Apache Log4j
15+
16+
[Apache Log4j](https://logging.apache.org/log4j/) is an open-source Java
17+
logging framework that is used to log messages within software, including
18+
information like error messages and user inputs in a program. Due to its
19+
widespread adoption, thousands of software packages and applications use
20+
Log4j, making them all vulnerable to Log4Shell.
21+
22+
## Exploitation
23+
24+
Some versions of Apache Log4j have a logging feature called "Message Lookup
25+
Substitution" enabled by default. This allows replacing certain special strings
26+
by dynamically-generated strings at the time of logging. If log messages or log
27+
message parameters can be controlled by an attacker, arbitrary code can be
28+
executed. This vulnerability was nicknamed
29+
"[Log4Shell](https://en.wikipedia.org/wiki/Log4Shell)".
30+
31+
Infection Monkey's Log4Shell exploiter takes advantage of this vulnerability
32+
to propagate to a victim machine.
33+
34+
![Log4Shell Configuration](
35+
/images/island/configuration-page/log4shell-exploiter-configuration.png
36+
"Log4Shell Configuration")
37+
38+
### Services exploited
39+
40+
Infection Monkey will attempt to exploit the Log4Shell vulnerability in the
41+
following services:
42+
43+
- Apache Solr
44+
- Apache Tomcat
45+
- Logstash
46+
47+
**Note**: Even if none of these services are running in your environment,
48+
running the Log4Shell exploiter can be a good way to test your IDS/IPS or EDR
49+
solutions. These solutions should detect that Infection Monkey is attempting to
50+
exploit the Log4Shell vulnerability and raise an appropriate alert.
51+
52+
## Mitigation
53+
54+
Learn more about this vulnerability and potential mitigations [here](
55+
https://logging.apache.org/log4j/2.x/security.html#CVE-2021-44228).
56+
57+
## See also
58+
- [Log4Shell exploiter reference
59+
documentation](/reference/exploiters/log4shell)
60+
- [Infection Monkey's Log4Shell blog
61+
post](https://www.akamai.com/blog/security/infection-monkey-new-log4shell-simulation)
62+
- [Quantifying Log4Shell: Vulnerability on a Massive
63+
scale](https://www.akamai.com/blog/security/quantifying-log4shell-vulnerability-on-a-massive-scale)
64+
- [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228).
+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: "SNMP Exploiter"
3+
draft: false
4+
description: "Exploits the SNMP vulnerability"
5+
tags: ["exploiter", "snmp", "cve-2020-15862"]
6+
pre: "<i class='fa fa-network-wired'></i> "
7+
---
8+
9+
{{% notice info %}}
10+
The SNMP exploiter exploits [CVE-2020-15862](
11+
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-15862).
12+
{{% /notice %}}
13+
14+
## SNMP
15+
16+
[SNMP (Simple Network Management Protocol)](
17+
https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol) is an
18+
application-layer protocol used to monitor and manage devices connected over
19+
an IP network such as routers, switches, firewalls, load balancers, servers,
20+
cameras, printers, and wireless devices. An SNMP-managed network consists of
21+
management stations, each having its own local database with information about
22+
the network, know as the MIB (Management Information Base). EXTEND MIB is a
23+
specific part of the MIB that allows administrators to extend functionality by
24+
defining custom MIB objects linked to shell commands or scripts. An SNMP
25+
community string is a form of authentication used to manage access to network
26+
devices and to specify what type of operations can be performed. It is
27+
essentially a plaintext password providing access to network devices'
28+
configurations.
29+
30+
## Exploitation
31+
32+
On some Linux systems, NET-SNMP-EXTEND-MIB is supported by default. This allows
33+
non-root users with access to a read-write community string to run arbitrary
34+
commands on the victim as root.
35+
36+
In versions 1 and 2c of the SNMP protocol, the only means of authentication is
37+
the community string. In these versions of SNMP, community strings are sent as
38+
plaintext in all requests. Version 3 adds user-based authentication and
39+
encryption to the SNMP protocol.
40+
41+
Infection Monkey's SNMP exploiter uses version 2c of the SNMP protocol. It
42+
executes brute-force attacks against SNMP servers by using usernames and
43+
passwords provided by the user (see [configuration](/usage/configuration) for
44+
instructions) as SNMP community strings.
45+
46+
![SNMP Configuration](
47+
/images/island/configuration-page/snmp-exploiter-configuration.png
48+
"SNMP Configuration")
49+
50+
## Mitigation
51+
52+
1. Use SNMPv3 with the authPriv security level, if possible.
53+
54+
1. Treat community strings as passwords.
55+
56+
1. Enable the read-only build option (NETSNMP_NO_WRITE_SUPPORT).
57+
58+
1. Configure SNMP to use read-only community strings.
59+
60+
1. Apply security updates to your Net-SNMP installation.
61+
62+
1. Limit access over SNMP to trusted hosts.
63+
64+
Note that even with only read access, an SNMP server can still expose crucial
65+
information about the network.
66+
67+
## See also
68+
- [SNMP exploiter reference documentation](/reference/exploiters/snmp)
69+
- [The L in Linux Stands for Lateral
70+
Movement](https://www.akamai.com/blog/security-research/linux-lateral-movement-more-than-ssh)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: "Zerologon Exploiter"
3+
draft: false
4+
description: "Exploits the Zerologon vulnerability"
5+
tags: ["exploiter", "zerologon", "cve-2020-1472"]
6+
pre: "<i class='fa fa-right-to-bracket'></i> "
7+
---
8+
9+
{{% notice warning %}}
10+
This exploiter is [unsafe for production](#a-note-on-safety)!
11+
{{% /notice %}}
12+
13+
{{% notice info %}}
14+
The Zerologon exploiter exploits [CVE-2020-1472](
15+
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-1472).
16+
{{% /notice %}}
17+
18+
## Netlogon Remote Protocol
19+
20+
The [Netlogon Remote Protocol (MS-NRPC)](
21+
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-nrpc) is a
22+
Windows Server process that authenticates users and other services within a
23+
domain. If the Netlogon service is interrupted, the functionality of the domain
24+
controller, whose responsibilities include user authentication, authorization,
25+
and account management, is severely affected.
26+
27+
## Exploitation
28+
29+
Due to a flaw in the cryptographic authentication scheme of Netlogon, an
30+
attacker can bypass authentication and gain administrator-level privileges to
31+
an unpatched machine, including a domain controller, effectively granting the
32+
attacker control over the entire domain.
33+
34+
Infection Monkey's Zerologon exploiter takes advantage of this vulnerability to
35+
steal credentials from the domain controller, which are then used to propagate
36+
to the machine using one of the brute force exploiters (for example, the SMB
37+
exploiter).
38+
39+
![Zerologon Configuration](
40+
/images/island/configuration-page/zerologon-exploiter-configuration.png
41+
"Zerologon Configuration")
42+
43+
## Mitigation
44+
45+
To download the relevant security update and read more, click [here](
46+
https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2020-1472).
47+
48+
## A note on safety
49+
50+
This exploiter is not safe for production or other sensitive environments.
51+
During successful exploitation, the Zerologon exploiter:
52+
53+
* Will temporarily change the target domain controller's password.
54+
* May break the target domain controller's communication with other systems in
55+
the network, affecting functionality.
56+
* May change the administrator's password.
57+
* Will *attempt* to revert all changes.
58+
59+
While the Zerologon exploiter is usually successful in reverting its changes
60+
and restoring the original passwords, it sometimes fails. Restoring passwords
61+
manually after the Zerologon exploiter has run is nontrivial. For information
62+
on restoring the original passwords, see [manually restoring your password](
63+
#manually-restoring-your-password).
64+
65+
To minimize the risk posed by this exploiter, it is recommended that this
66+
exploiter be run _only_ against VMs with a recent snapshot and _only_ in
67+
testing or staging environments.
68+
69+
## Manually restoring your password
70+
71+
This exploiter attempts to restore the original passwords after exploitation.
72+
It is usually successful, but it sometimes fails. If this exploiter has changed
73+
a password but was unable to restore the original, you can try the following
74+
methods to restore the original password.
75+
76+
### Restore the VM from a recent snapshot
77+
78+
If the affected system is a virtual machine, the simplest way to restore it to
79+
a working state is to revert to a recent snapshot.
80+
81+
### Restore the administrator's password
82+
83+
If you are unable to log in as the administrator, you can follow the
84+
instructions
85+
[here](https://www.top-password.com/knowledge/reset-windows-server-2019-password.html)
86+
to regain access to the system.
87+
88+
### Use Reset-ComputerMachinePassword
89+
90+
If you are able to log in as the administrator, you can use the
91+
[Reset-ComputerMachinePassword](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/reset-computermachinepassword?view=powershell-5.1)
92+
powershell command to restore the domain controller's password.
93+
94+
### Try a Zerologon password restoration tool
95+
If all other approaches fail, you can try the tools and steps found
96+
[here](https://github.com/risksense/zerologon).
97+
98+
## See also
99+
- [Zerologon exploiter reference
100+
documentation](/reference/exploiters/zerologon)

docs/content/reference/exploiters/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ tags: ["reference", "exploit"]
77

88
# Exploiters
99

10-
The Infection Monkey uses various remote code execution (RCE) exploiters. To our best knowledge, most of these pose no risk to performance or services on victim machines. This documentation serves as a quick introduction to the exploiters currently implemented and the vulnerabilities they use:
10+
Exploiters enable Infection Monkey to propagate itself.
1111

1212
{{% children /%}}
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)