Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add credentials collectors explanation pages #4240

Merged
merged 15 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ theme = "learn"
# Order sections in menu by "weight" or "title". Default to "weight"
ordersectionsby = "weight"
# Provide a list of custom css files to load relative from the `static/` folder in the site root.
custom_css = ["css/labels.css", "css/shadow-around-images.css", "css/table-of-contents.css", "css/tooltip.css"]
custom_css = ["css/chapters.css", "css/labels.css", "css/shadow-around-images.css", "css/table-of-contents.css", "css/tooltip.css"]

[outputs]
home = ["HTML", "RSS", "JSON"]
Expand Down
43 changes: 43 additions & 0 deletions docs/content/features/credentials_collectors/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "Credentials Collectors"
chapter: true
pre: "<i class='fas fa-key'></i> "
---

# Credentials Collectors

Credentials Collectors attempt to steal credentials from systems that the
Infection Monkey Agent has infected.

## Mimicking attackers

In real-world network attacks, malicious actors often attempt to extract
credentials from compromised systems. Stolen credentials enable attackers to
penetrate deeper into the environment in many ways, such as lateral movement,
privilege escalation, data theft, and persistence. To mimic this behavior,
Infection Monkey has multiple plugins, called "credentials collectors", that
steal credentials from compromised hosts.

## How credentials collectors work

When an Infection Monkey Agent is started, it begins the reconnaissance phase
of its attack. The first step in this phase is to use all enabled credentials
collectors to steal credentials. Any stolen credentials are then sent to the
Monkey Island, where they become immediately available for any Agent to use.

After the reconnaissance phase, the Agent will begin the propagation phase and
attempt to compromise other hosts on the network. Exploiters are Infection
Monkey plugins that attempt to spread copies of the Agent throughout the
network. Some exploiters can use the credentials stolen by credentials
collectors to gain access to other systems on the network. First, the exploiter
will query the Monkey Island to retrieve credentials that were configured by
the user and any credentials that were stolen by credentials collectors. Next,
the exploiters will use the stolen credentials to attempt to authenticate with
a target system. If authentication is successful, the exploiter will execute
the Agent on the target system, spreading the infection throughout the network.
Comment on lines +23 to +37
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still unsure if we should go into this much detail. I suggest we have a separate page explaining the different phases of execution which we could link to wherever required (probably each plugin type's explanation?). This isn't something that's specific to credentials collectors so it doesn't feel right to me here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that it should be on separate pages, which is why I left notes in #4213 and #4215 to extract it. However, this is information users need to understand. It needs to be somewhere, and if we get interrupted in between now and when we complete #4213 and #4215, at least it's here.


## Techniques
To read more about the techniques Infection Monkey can use to steal
credentials, click the links below:

{{% children /%}}
19 changes: 19 additions & 0 deletions docs/content/features/credentials_collectors/chrome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "Chrome Credentials Collector"
draft: false
description: "Collects credentials from Chrome-based browsers"
tags: ["credentials collector", "chrome", "linux", "windows"]
pre: "<i class='fa fa-chrome'></i> "
---

## Description

By default, Chromium-based browsers store saved usernames and passwords in a
recoverable format. Stealing browser credentials can enable access to sensitive
personal and business accounts leading to data exfiltration, identity theft,
financial loss, etc. Users often reuse credentials across accounts which can
support lateral movement and persistence.

The Chrome Credentials Collector steals saved credentials from Chromium-based
browsers. On Linux, it targets Google Chrome and Chromium. On Windows, it
targets Google Chrome and Microsoft Edge.
22 changes: 22 additions & 0 deletions docs/content/features/credentials_collectors/mimikatz.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: "Mimikatz Credentials Collector"
draft: false
description: "Collects credentials from Windows Credential Manager"
tags: ["credentials collector", "mimikatz", "windows"]
pre: "<i class='fa fa-cat'></i> "
---

## Description

[Mimikatz](https://github.com/gentilkiwi/mimikatz) is an open-source tool
widely used by attackers to extract credentials, including plaintext passwords,
hashes, PINs, and Kerberos tickets, from memory. The extracted credentials can
then be used to escalate privileges or move laterally through a network.

Infection Monkey's Mimikatz Credentials Collector uses
[pypykatz](https://github.com/skelsec/pypykatz), a pure-Python implementation
of [mimikatz](https://github.com/gentilkiwi/mimikatz).

![Mimikatz
Configuration](/images/island/configuration-page/mimikatz-credentials-collector-configuration.png
"Mimikatz configuration")
36 changes: 36 additions & 0 deletions docs/content/features/credentials_collectors/ssh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "SSH Credentials Collector"
draft: false
description: "Collects SSH keys from Linux users"
tags: ["credentials collector", "ssh", "linux"]
pre: "<i class='fa fa-terminal'></i> "
---

## Description

SSH public/private key pairs are credentials that allow users to remotely
access systems using the [Secure Shell Protocol
(SSH)](https://en.wikipedia.org/wiki/Secure_Shell). Stealing them could enable
an attacker to:

- Gain access to sensitive systems
- Steal data
- Move laterally through the network
- Escalate their privileges
- Establish a persistent presence

While SSH key pairs can be encrypted to mitigate this risk, many users skip this
step and trade security for convenience. This leaves the SSH keys vulnerable to
theft. Infection Monkey's SSH Credentials Collector seeks out and steals
unprotected SSH key pairs. After compromising a Linux host, the SSH Credentials
Collector will locate the `$HOME/.ssh` directory for each user and attempt to
steal unencrypted SSH key pairs from it.

The SSH Credentials Collector will attempt to steal any key pair matching all
of the following criteria:

- The key pair is stored in `$HOME/.ssh` for any user on the system.
- The key pair is readable by the user running the Infection Monkey Agent.
- The key pair is not encrypted.
- The key pair is stored in one of the supported formats (RSA, DSA, EC, or
ECDSA).
4 changes: 4 additions & 0 deletions docs/static/css/chapters.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#chapter h2 ~ p {
text-align: left;
font-size: 17px;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ target_operating_systems:
- windows
title: Mimikatz Credentials Collector
version: 2.0.0
description: Collects credentials from Windows Credential Manager using Mimikatz.
description: Collects credentials from memory on Windows hosts using Mimikatz.
safe: true
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ compatible_infection_monkey_version: development
plugins:
Credentials_Collector:
Mimikatz:
- description: Collects credentials from Windows Credential Manager using Mimikatz.
- description: Collects credentials from memory on Windows hosts using Mimikatz.
name: Mimikatz
resource_path: Mimikatz-credentials_collector-v1.0.2.tar
safe: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"resource_path": "Mimikatz-credentials_collector-v1.0.2.tar",
# SHA of PLUGIN_ARCHIVE
"sha256": "315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3",
"description": "Collects credentials from Windows Credential Manager using Mimikatz.",
"description": "Collects credentials from memory on Windows hosts using Mimikatz.",
"version": "1.0.2",
"safe": True,
}
Expand Down