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

update TTPs for AWS Services #11

Merged
merged 35 commits into from
Oct 12, 2024

Conversation

SaschaDietsch
Copy link
Contributor

@SaschaDietsch SaschaDietsch commented Jun 15, 2024

The purpose of this PR is to add possible MITRE ATT&CK TTPs, which are reasonably possible, but have not been verified by external sources, such as research or in the wild observations

@SaschaDietsch SaschaDietsch marked this pull request as draft June 15, 2024 15:32
@SaschaDietsch
Copy link
Contributor Author

I'm open for suggestions. :)

@SaschaDietsch SaschaDietsch marked this pull request as ready for review August 31, 2024 14:17
Copy link
Owner

@adanalvarez adanalvarez left a comment

Choose a reason for hiding this comment

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

I’m reviewing here approximately 70 files (I'll add more reviews in the next few days). The amount of work done here is incredible, THANKS a lot! This adds significant value, as the unverified sub-techniques provide a broader perspective on potential attacks involving specific API calls.

I’ve included some comments on certain techniques that, although they might match attack patterns, I believe could cause confusion due to the nature of the technique and how MITRE describes them. In some cases, I think it may be better to limit the number of techniques to avoid confusion, but that’s just my opinion.

Comment on lines 23 to 24
"technique": "T1056.004 - Credential API Hooking",
"reason": "Attackers may hook into the API key creation process to intercept and use these credentials for unauthorized access."
Copy link
Owner

Choose a reason for hiding this comment

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

I belive this sub-technique is only windows focused and might cause confusion adding it here. Even if an attacker can intercept traffic to this API I wouldn't consider it hooking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, will remove it. I had it included because "Unlike Keylogging, this technique focuses specifically on API functions that include parameters that reveal user credentials."

events/AppSync/CreateApiKey.json Outdated Show resolved Hide resolved
Comment on lines +35 to +36
"technique": "T1027 - Obfuscated Files or Information",
"reason": "The API call might be used to modify or obfuscate logs and configurations to avoid detection."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique is about making "an executable or file difficult to discover or analyze by encrypting, encoding, or otherwise obfuscating its contents on the system or in transit"

As this are not files from an operative system, I'm not sure if this applies.

Copy link
Contributor Author

@SaschaDietsch SaschaDietsch Sep 5, 2024

Choose a reason for hiding this comment

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

I am unsure why MITRE named it "Obfuscated Files or Information" and then did not have a reference on obfuscated information. The best I could find is

Portions of files can also be encoded to hide the plain-text strings that would otherwise help defenders with discovery. [2] Payloads may also be split into separate, seemingly benign files that only reveal malicious functionality when reassembled. [3]

I admit it may not be the best match, but I thought to give it a try.

Copy link
Owner

Choose a reason for hiding this comment

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

In some way, I can see adding obfuscated code in the configuration or creating an endpoint for doing this. I see it too complex for an attack but is true that can happen.

Comment on lines +21 to +22
"technique": "T1027 - Obfuscated Files or Information",
"reason": "Attackers may use knowledge of logging configurations to craft their actions in ways that avoid triggering specific logging mechanisms."
Copy link
Owner

Choose a reason for hiding this comment

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

As in the previous comment about this technique, I think it is focused on files on a files system. I think even knowing the configuration, this technique won't happen as the files won't be in a filesystem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See my previous comment. If you think it should be removed I'll do it.

Copy link
Owner

Choose a reason for hiding this comment

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

I think I see your point, maybe knowing the configuration, you'll act in a way that logs won't contain enough information to be useful and this might be considered obfuscation. I have no strong opinion on removing or not, my comments in general are to raise questions on techniques that I have more problems seeing the relationship and because of this, I wonder if this is going to help or might generate confusion.

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 do appreciate your insights & comments. I do not have a strong opinion on it either.

Comment on lines 20 to 22
{
"technique": "T1106 - Native API",
"reason": "The creation of a CloudFront function involves direct interaction with AWS APIs, potentially leveraging native functionalities."
Copy link
Owner

Choose a reason for hiding this comment

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

I think the native API technique focueses only on native OS application programming interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right on that. My thought process was that inside AWS this is the native API. Maybe the framework needs to have something similar for cloud and container environments.

Copy link
Owner

Choose a reason for hiding this comment

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

I agree, I think there might be a lack of cloud-related techniques in MITRE framework but I think it is also because MITRE only has techniques that come from real-word observations, and cloud attacks are still "basic". So as with most of my other comments, I'm not saying is bad but it might generate confusion based on MITRE techniques description and scope.

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 will remove it for now. If it is still needed we can bring it back.

Comment on lines +25 to +26
"technique": "T1040 - Network Sniffing",
"reason": "By analyzing flow logs, attackers can infer traffic patterns and potentially sensitive information about network communications"
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure if this can be classified as network sniffing. But maybe in some scenarios by looking at the traffic and its IPs an attacker can know the webs/services being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not only that. One could also see what kind of activity is being done with the service. If you type in a command via hand over SSH it is transmitted not that fast compared to when a script is doing it. Such things are possible with a bit of traditional machine learning.

Comment on lines 16 to 27
{
"technique": "T1496 - Resource Hijacking",
"reason": "By understanding the available images, an attacker could hijack resources by creating instances using these images for malicious activities such as cryptocurrency mining."
},
{
"technique": "T1027 - Obfuscated Files or Information",
"reason": "Attackers can use knowledge about available images to obfuscate their activities by using less monitored or unusual images"
},
{
"technique": "T1562 - Impair Defenses",
"reason": "By identifying specific images that might have security tools, attackers can choose to avoid those images or disable the security tools present in them"
},
Copy link
Owner

Choose a reason for hiding this comment

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

I think even if the describeImages can provide some information for attackers to do any of these techniques, I don't see them as strictly related.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Point taken. I will remove those.

Comment on lines +33 to +34
"technique": "T1202 - Indirect Command Execution",
"reason": "By using DescribeImages, attackers can identify images that may allow them to indirectly execute commands through specific software or configurations present in the images"
Copy link
Owner

Choose a reason for hiding this comment

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

I don't see how the information provided by DescribeImages can allow for indirect command execution. At least, I see it as very difficult as the information provided by the API is limited.

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 will remove it. My thoughts were that one could select an AMI image where you have something like a command interpreter already exposed which one could use for command execution.

Comment on lines 53 to 54
"technique": "Using DescribeImages helps attackers discover available cloud services, their configurations, and associated resources.",
"reason": "Attackers can use DescribeImages to identify and exploit vulnerabilities in the software dependencies and development tools used within specific images, leading to a supply chain compromise"
Copy link
Owner

Choose a reason for hiding this comment

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

The technique here is the reason from the previous tehcnique

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was a copy/Paste error. Next push will fix this. It should have been T1195 - Supply Chain Compromise.

Comment on lines 21 to 22
"technique": "T1078 - Valid Accounts",
"reason": "Information obtained from DescribeInstances can help an adversary identify valid user accounts and their associated permissions, especially if they are looking for accounts with elevated privileges."
Copy link
Owner

Choose a reason for hiding this comment

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

I think the Valid Accounts technique focuses on the use of valid accounts. In this case, DescribeInstances does not help to get or use Valid accounts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Point taken. Removed.

and remove other erros - Part 1
@SaschaDietsch
Copy link
Contributor Author

I do think that is most cases you are right and i will delete the offending techniques. For me this is all a learning experience. Therefore I am glad about the feedback.

Comment on lines 25 to 26
"technique": "T1078 - Valid Accounts",
"reason": "Accessing key pairs allows attackers to use valid credentials to authenticate and access systems, leading to potential unauthorized use of valid accounts."
Copy link
Owner

Choose a reason for hiding this comment

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

DescribeKeyPairs only gives you the fingerprint but nothing valuable that can be used for accessing the ec2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I will remove that.

Comment on lines 21 to 22
"technique": "T1530 - Data from Cloud Storage Object",
"reason": "If key pairs are stored in cloud storage, an attacker could retrieve these key pairs, potentially leading to unauthorized access."
Copy link
Owner

Choose a reason for hiding this comment

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

DescribeKeyPairs only gives information that can't be used for authentication https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_KeyPairInfo.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Removed.

Comment on lines 25 to 26
"technique": "T1213 - Data from Information Repositories",
"reason": "DescribeRegions provides metadata about regions, which can be seen as a form of information repository. Attackers may gather this data to understand the environment better."
Copy link
Owner

Choose a reason for hiding this comment

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

I0m not sure I can see a region as a repository. I think a region is much more than a repository of information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that I have written it in a poor way. My thought was that the regional metadata which is returned is an information repository.

Comment on lines 29 to 30
"technique": "T1106 - Native API",
"reason": "Utilizing native AWS APIs to gather configuration data is a method for defense evasion, blending in with regular activity."
Copy link
Owner

Choose a reason for hiding this comment

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

T1106 refers to native IOS API so I believe this might cause confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can see your point. My thought process that the API that AWS exposes is the native OS API for the cloud environment one is in.

Comment on lines 33 to 34
"technique": "T1190 - Exploit Public-Facing Application",
"reason": ""
Copy link
Owner

Choose a reason for hiding this comment

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

I think you can gather information for later exploiting but with the describe you won't be able to exploit any app.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also I forgot to put in an explanation. My explanation I forgot to put in was

If security group rules expose public-facing applications or resources, adversaries may identify these applications as targets for exploitation. The DescribeSecurityGroups API call helps identify such applications by revealing permissive rules.

I will remove it.

Comment on lines 49 to 50
"technique": "T1531 - Account Access Removal",
"reason": "Modifying snapshot permissions could be used to remove legitimate access, disrupting recovery efforts, and aiding in defense evasion."
Copy link
Owner

Choose a reason for hiding this comment

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

I don't see a way to prevent access to accounts to AWS. Even to this snapshot.

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'll remove it for now.

Comment on lines 21 to 22
"technique": "T1133 - External Remote Services",
"reason": "Instances can be accessed and controlled remotely, facilitating initial access and persistent control over the cloud environment through remote services."
Copy link
Owner

Choose a reason for hiding this comment

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

Do you mean like, creating an EC2 that is a VPN and because of this getting persistence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. an EC2 that is acting as a kind of VPN.

Comment on lines 25 to 26
"technique": "T1053 - Scheduled Task/Job",
"reason": "Attackers could set up scheduled tasks or jobs on the EC2 instance to maintain persistence after gaining access."
Copy link
Owner

Choose a reason for hiding this comment

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

I see this as something that will happen once an attacker has access to the EC2 and in this case all techniques related to the OS of the EC2 will be valid. So I don't see this one related to this API call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Point taken. I will remove it.

Comment on lines 33 to 34
"technique": "T1105 - Ingress Tool Transfer",
"reason": "Attackers may transfer additional tools to the EC2 instance to facilitate further actions."
Copy link
Owner

Choose a reason for hiding this comment

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

Similar to T1053, I see this as something that happens after but not related to this API call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Point taken. I will remove it.

},
{
"technique": "T1027 - Obfuscated Files or Information",
"reason": "Adversaries might obfuscate the data within snapshots to avoid detection during transfer. This can involve encrypting the contents of a snapshot or otherwise making the data less recognizable to automated defense mechanisms"
Copy link
Owner

Choose a reason for hiding this comment

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

The way you see this is all information is stored in an e2 and then exfiltrated via a snapshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. That is the way I thought.

},
{
"technique": "T1556 - Modify Authentication Process",
"reason": "The AWS CreateService API call can be used to create tasks that modify authentication processes within a cloud environment."
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure how the CreateService can help with this. If it is because the ECS has more privileges than the current user then I would go for a privilege scalation technique. If it is doing the change via the ECS just because of its IP, then probably the proxy that is already added here is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you think about creating a task that proxies or monitors user uthentication requests?

Comment on lines 33 to 34
"technique": "T1203 - Exploitation for Client Execution",
"reason": "Task definitions might be crafted to exploit vulnerabilities within the container runtime or application, leading to execution"
Copy link
Owner

Choose a reason for hiding this comment

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

I think this technique is only aboud exploiting code for RCE

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Point taken. I will remove it.

Comment on lines 25 to 26
"technique": "T1531 - Account Access Removal",
"reason": "Deleting an EFS file system cuts off access to the data for all users and systems that rely on it. This action effectively removes the ability to access critical resources, potentially disrupting operations."
Copy link
Owner

Choose a reason for hiding this comment

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

I think the other mentioned techniques cover the deletion of data. In this case, I think AWS accounts will still be able to access just that the EFS won't be there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I will remove that.

Comment on lines 25 to 26
"technique": "T1496 - Resource Hijacking",
"reason": "Deleting mount targets can free up resources, potentially redirecting them to other malicious activities or hindering legitimate use, indirectly impacting operations."
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure about this one. I don't see how DeleteMountTarget can be abused for resource hijacking.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It had something to do with quotas. After some thought I am going to remove that.

Comment on lines +29 to +30
"technique": "T1003 - OS Credential Dumping",
"reason": "Modifying access policies might allow attackers to gain access to sensitive areas of the system where they can extract credentials."
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure how the AssociateAccessPolicy can help attackers with OS credential dumping.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Add a access policy that allows executing into pods and then grabbing their OS credentials would be one way to do it.

Comment on lines 19 to 20
"technique": "T1531 - Account Access Removal",
"reason": "Removing targets from EventBridge rules can prevent specific users or roles from being notified or triggered, effectively removing their access to critical information or actions."
Copy link
Owner

Choose a reason for hiding this comment

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

Agree with the reason but this matches the impaired defenses. The accounts are still able to log in, the problem is that they won't receive a notification.

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 will remove it.

Comment on lines 17 to 18
"technique": "T1106 - Native API",
"reason": "Using the AWS Glue API to create development endpoints can facilitate malicious actions within the AWS environment by leveraging legitimate service functionalities."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique only applies to OS API not to API in general.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 25 to 30
"technique": "T1136 - Create Account",
"reason": "Attackers can create new accounts with permissions to create and use development endpoints, facilitating unauthorized access and persistence in the environment."
},
{
"technique": "T1053 - Scheduled Task/Job",
"reason": "cheduling jobs on the development endpoint ensures that malicious payloads or scripts are executed at specific times, aiding in persistence and automated execution."
Copy link
Owner

Choose a reason for hiding this comment

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

Not sure about these 2, CreateDevEndpoint does not help in the creation of new accounts and neither it can help to schedule tasks or jobs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I will remove those two.

Comment on lines 29 to 35
"technique": "T1106 - Native API",
"reason": "The development endpoint update might utilize native APIs for malicious purposes, including privilege escalation or evasion."
},
{
"technique": "T1053 - Scheduled Task/Job",
"reason": "UpdateDevEndpoint could be used to create or modify scheduled tasks that ensure malicious scripts are run periodically."
},
Copy link
Owner

Choose a reason for hiding this comment

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

Native API it is only for OS API. The scheduled Tasks job technique . I'm not sure I understand how this endpoint might help with this.

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'll remove those two for now.

Comment on lines 25 to 26
"technique": "T1484 - Domain or Tenant Policy Modification",
"reason": "Adversaries can change job definitions to alter the behavior of the Glue job, affecting the overall data processing policies and workflows within the AWS environment."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique seems to much related with AD or Trust policies between domain, for this reason I'm not sure this one matches here.

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 am also a byte unsure. I will remove it for now.

Comment on lines 17 to 18
"technique": "T1070 - Indicator Removal",
"reason": "Adversaries can create filters that suppress alerts for file deletion activities, allowing them to remove indicators of their presence without triggering alarms."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is Impair Defenses. As the action does not allow removing anything but impacts the defenses ( triggering alerts)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, will remove that. I will add T1562.001 - Impair Defenses: Disable or Modify Tools as a subtechnique instead.

"unverifiedMitreAttackTechniques": [
{
"technique": "T1531 - Account Access Removal",
"reason": "Deleting GuardDuty member accounts can prevent legitimate users from accessing the service, thus disrupting monitoring and security alerts."
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "Deleting GuardDuty member accounts can prevent legitimate users from accessing the service, thus disrupting monitoring and security alerts."
"reason": "Deleting GuardDuty member accounts can prevent legitimate accounts from getting data from member accounts, thus disrupting monitoring and security alerts."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggestion is applied in next commit.

"unverifiedMitreAttackTechniques": [
{
"technique": "T1485 - Data Destruction",
"reason": "Although not directly data destruction, it disrupts the availability of security logs which could be considered an impact on the integrity and availability of logging data."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is what Impair defense covers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I will remove that.

},
{
"technique": "T1531 - Account Access Removal",
"reason": "Deleting the publishing destination can prevent security personnel from receiving critical alerts, effectively limiting their ability to respond to threats. This action reduces the ability to monitor and manage GuardDuty findings, thereby diminishing the security team's control over the environment."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is also part of Impair defenses, because users can still access the AWS account

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 will remove that too.

},
{
"technique": "T1485 - Data Destruction",
"reason": "By disassociating the account, attackers may intend to evade detection and subsequently destroy data within the compromised account without triggering alerts in the central monitoring account."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this and Data Manipulation is just part of what can happen after, but the event itself help as mentioned in the reason to evade detection so it Impair defenses.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

"unverifiedMitreAttackTechniques": [
{
"technique": "T1070 - Indicator Removal",
"reason": "Updating inline policies can help adversaries evade detection by altering the permissions without creating new, noticeable accounts."
Copy link
Owner

Choose a reason for hiding this comment

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

Also, it is not clear to me how adding a policy you might be removing evidence of their presence. I can see Impair defenses by maybe adding a policy that denies access.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 30 to 31
"technique": "Adversaries may use PutUserPolicy to remove access rights for legitimate users, causing disruption.",
"reason": "If an adversary can modify policies to grant administrative privileges, they effectively escalate their privileges."
Copy link
Owner

Choose a reason for hiding this comment

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

This seems like privilege escalation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was T1068 - Exploitation for Privilege Escalation. Fixed in next commit.

"unverifiedMitreAttackTechniques": [
{
"technique": "T1070 - Indicator Removal",
"reason": "Modifying the policy's default version can be used to evade detection by altering the policies that would trigger alarms or logs."
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "Modifying the policy's default version can be used to evade detection by altering the policies that would trigger alarms or logs."
"reason": "Modifying the policy's default version can be used to evade detection by setting the policy version that was in place before the attack."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggestion added in next commit.

"unverifiedMitreAttackTechniques": [
{
"technique": "T1070. - Indicator Removal",
"reason": "Disabling keys can be a tactic to remove indicators of compromise, preventing detection and forensic analysis."
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "Disabling keys can be a tactic to remove indicators of compromise, preventing detection and forensic analysis."
"reason": "Disabling keys can be a tactic to remove indicators of compromise, because keys need to be disabled before deletion, preventing detection and forensic analysis."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added suggestion to next commit.

},
{
"technique": "T1036 - Masquerading",
"reason": "T1036.005] - Masquerading"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "T1036.005] - Masquerading"
"reason": "Attackers can allow access from an account they control to assume a valid role that is used in the organization making the access appear legitimate"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops that was a copy/Paste error. Thank you for the suggestion!

},
{
"technique": "T1496 - Resource Hijacking",
"reason": "Attackers could use the symmetric data key to encrypt legitimate resources, thereby disrupting normal operations and potentially leading to financial or operational impacts."
Copy link
Owner

Choose a reason for hiding this comment

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

I believe resource hijacking is about using resources from the company, that have an elevated cost in your favor, like cryptocurrency mining, use of AI, or email services. But in this case, you are not using expensive resources that benefit you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I will remove this. I had "Modify Cloud Compute infrastructure" as a potential replacement in mind, but my confidence in that technqiue is low.

},
{
"technique": "T1531 - Account Access Removal",
"reason": "An adversary may remove access to encrypted data by scheduling the deletion of the KMS key, which is crucial for decryption."
Copy link
Owner

Choose a reason for hiding this comment

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

I agree but the account itself continues to have access to the system, just the data is not there ( because of Disk Wipe )

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 would have counted that under access removal because it is cryptoshredded, but I will delete it.

events/KMS/ScheduleKeyDeletion.json Outdated Show resolved Hide resolved
},
{
"technique": "T1070 - Indicator Removal",
"reason": "Using AddPermission to adjust access rights can help hide malicious activities by removing or altering indicators of compromise."
Copy link
Owner

Choose a reason for hiding this comment

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

I don't see it as strictly related, especially that here you allow somebody else to execute the lambda.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

},
{
"technique": "T1040 - Credential Access via API",
"reason": "Granting permissions can facilitate the capture or misuse of credentials if permissions are set incorrectly, allowing access to sensitive functions."
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not really sure about this one, also T1040 is Network Sniffing https://attack.mitre.org/techniques/T1040/

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 do not know what went in my head. I'll remove it.

},
{
"technique": "T1190 - Exploit Public-Facing Application",
"reason": "If the Lambda function is triggered via a public-facing API, it can be exploited to gain initial access or execute code."
Copy link
Owner

Choose a reason for hiding this comment

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

I agree with this but seems more related to the invoke than the creation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 42 to 43
"technique": "T1027 - Obfuscated Files or Information",
"reason": "Attackers might use obfuscation techniques in Lambda functions to hide malicious activities."
Copy link
Owner

Choose a reason for hiding this comment

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

The same I tought Exploit Public-Facing Application seems more invoke, I think obfuscate Files or Information seems more CreateFunction as is there when you can create a lambda with obfuscated malicious actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Swapped them.

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 hhave also included serverless execution as a new technique.

},
{
"technique": "T1106 - Native API",
"reason": "Use of the AWS API directly is an example of leveraging native APIs to perform tasks, in this case, updating Lambda functions."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique is only for OS application programming interface (API)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

},
{
"technique": "T1106 - Native API",
"reason": "Directly updating the Lambda function code allows adversaries to exploit native APIs to execute their payloads."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique is only for OS application programming interface (API)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

},
{
"technique": "T1106 - Native API",
"reason": "Attackers use AWS API calls like UpdateFunctionConfiguration to directly interact with and manipulate Lambda functions to achieve their goals."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique is only for OS application programming interface (API)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 23 to 24
"technique": "T1566 - Phishing",
"reason": "Instances may host phishing websites to harvest credentials from targeted users."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this will be Resource Hijacking as it will be using the service for something malicious

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. I will remove it.

Comment on lines +19 to +20
"technique": "T1583 - Acquire Infrastructure",
"reason": "CreateInstances can be used by adversaries to acquire infrastructure for future operations by provisioning new instances."
Copy link
Owner

Choose a reason for hiding this comment

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

Interesting, I'm not sure if Resource Development techniques should be part of this.
On the one hand this might be the starting of a new attack, on the other this feels like such an initial tactic does not match an attack that already has initial compromise.

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 leave it up to you whether Resource Development techniques should be part of this or not.

Comment on lines 21 to 22
"technique": "T1071 - Application Layer Protocol",
"reason": "Using the API call to communicate and manage accounts in the organization can evade detection mechanisms focused on other layers."
Copy link
Owner

Choose a reason for hiding this comment

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

I think this is a bit confusing. Because in the end all API calls can be considered Application Layer Protocol.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 25 to 26
"technique": "T1102 - Web Service",
"reason": "Utilizing AWS Organizations API as a web service to manage accounts can help in evading direct detection of unauthorized activities."
Copy link
Owner

Choose a reason for hiding this comment

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

Similar to Application Layer Protocol, all APIs can be executed from the AWS Console.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 17 to 18
"technique": "T1078 - Valid Accounts",
"reason": "Creating a new DB security group could be used to establish persistence by allowing access to specific IP ranges or users who control the security group, effectively allowing continuous access."
Copy link
Owner

Choose a reason for hiding this comment

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

I don't see the relationship with the Valid Account

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 45 to 46
"technique": "T1491 - Defacement",
"reason": "The deletion of a global database cluster could serve as a form of defacement, especially if the cluster supports a public-facing application, causing reputational damage."
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think we can call this defacement because there is no crafted message. From the technique "Reasons for Defacement include delivering messaging, intimidation, or claiming (possibly false) credit for an intrusion"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 25 to 26
"technique": "T1106 - Native API",
"reason": "The use of native APIs, such as ModifyActivityStream, can allow an adversary to modify system configurations to evade detection or gain persistence."
Copy link
Owner

Choose a reason for hiding this comment

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

This technique is only for OS API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

},
{
"technique": "T1070 - Indicator Removal",
"reason": "By disabling the audit stream, an adversary could attempt to hide or remove traces of malicious activity by preventing the collection of activity logs."
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "By disabling the audit stream, an adversary could attempt to hide or remove traces of malicious activity by preventing the collection of activity logs."
"reason": "Attackers might reconfigure the audit policy state to the original state to avoid an investigation."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggestion implemented in next commit.

Comment on lines 25 to 26
"technique": "T1552 - Unsecured Credentials",
"reason": "If the database snapshots contain unsecured credentials, such as plaintext passwords or API keys, exporting the snapshot to S3 could allow an adversary to access these credentials, which could then be used to further compromise the environment or exfiltrate additional data."
Copy link
Owner

Choose a reason for hiding this comment

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

I agree but I don't see the StartExportTask extrictly related to unsecured credentials.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 37 to 38
"technique": "T1556 - Credentials from Password Stores",
"reason": "If the database snapshots contain password hashes or other credential stores, exporting the snapshot to S3 could allow an adversary to collect and crack these credentials for further exploitation."
Copy link
Owner

Choose a reason for hiding this comment

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

Similar to Unsecured Credentials, I don't see this related. I agree that after a copy you can probably access and extract sensitive data ( maybe credentials ) but I find it difficult to match with the StartExportTask

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 37 to 38
"technique": "T1027 - Obfuscated Files or Information",
"reason": "By using specific query strings, attackers might identify resources where information or files are stored in a manner that obfuscates their true nature, aiding in evasion of detection."
Copy link
Owner

Choose a reason for hiding this comment

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

This is not clear to me. I think the technique is about attackers ofuscating information, in this case if attackers identidy obfuscated information this woudn't be a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 29 to 30
"technique": "T1087 - Account Discovery",
"reason": "The creation of a hosted zone provides attackers with insights into the cloud account structure, domain settings, and associated resources, aiding in further discovery and reconnaissance efforts."
Copy link
Owner

Choose a reason for hiding this comment

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

It is not clear to me how creating a new hosted zone, will give insights into the cloud account structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 33 to 34
"technique": "T1590 - Gather Victim Network Information",
"reason": "By setting up a hosted zone and monitoring DNS traffic, attackers can gather information about the victim's network, such as domain structure and internal configurations."
Copy link
Owner

Choose a reason for hiding this comment

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

It is not clear to me how creating a new hosted zone, will allow this. It would be weird for normal traffic to go to a new hosted zone if there are no additional actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 41 to 42
"technique": "T1119 - Automated Collection",
"reason": "Hosted zones can be configured to automatically redirect or collect DNS queries from targeted systems, facilitating the collection of sensitive information without direct interaction."
Copy link
Owner

Choose a reason for hiding this comment

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

Similar to Gather Victim Network Information I think it would be weird for normal traffic to go to a new hosted zone if there are no additional actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 29 to 30
"technique": "T1070 - Indicator Removal",
"reason": "Enabling privacy protection can hide WHOIS information, making it harder to attribute the domain to its true owner, aiding in defense evasion."
Copy link
Owner

Choose a reason for hiding this comment

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

I think in this case, as the infra is not yours you do not care if the WHOIS points to the owner of the AWS acccount. As you are registering something new I don't think this can be a indicator removal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 27 to 28
"technique": "T1213 - Data from Information Repositories",
"reason": "Attackers can exploit GetParameters to extract important data stored within the Parameter Store, such as system configurations, secrets, or other critical information."
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure we can consider this a repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 21 to 22
"technique": "T1505 - Server Software Component",
"reason": "By creating a new server, attackers can install or manage software components that support malicious activities, such as maintaining persistence or running unauthorized code."
Copy link
Owner

Choose a reason for hiding this comment

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

I don't think this one would work here as the SFTP is just an S3. There is nothing else you can do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Comment on lines 29 to 30
"technique": "T1562 - Impair Defenses",
"reason": "Attackers could configure the server in a way that bypasses or disables certain security controls, allowing them to evade detection and maintain access."
Copy link
Owner

Choose a reason for hiding this comment

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

For the description

Suggested change
"technique": "T1562 - Impair Defenses",
"reason": "Attackers could configure the server in a way that bypasses or disables certain security controls, allowing them to evade detection and maintain access."
"technique": "T1562 - Impair Defenses",
"reason": "Attackers could configure the server to allow them to access from the internet to S3 files."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggestion added in next commit.

},
{
"technique": "T1070 - Indicator Removal",
"reason": "The deletion of a RuleGroup can be used to eliminate logs or indicators of malicious activity by disabling the mechanisms that detect and log those activities."
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
"reason": "The deletion of a RuleGroup can be used to eliminate logs or indicators of malicious activity by disabling the mechanisms that detect and log those activities."
"reason": "The deletion of a RuleGroup can be used to eliminate logs or indicators of malicious activity by disabling the mechanisms that detect and log those activities. Also, to delete a group that was used previously by attackers"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added suggestion to the next commit.

Comment on lines 21 to 22
"technique": "T1078 - Valid Accounts",
"reason": "An attacker with legitimate credentials could update the IPSet to include malicious IPs, ensuring ongoing access or enabling external connections from trusted addresses."
Copy link
Owner

Choose a reason for hiding this comment

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

I agree but as mentioned in other techniques, the use of legitimate credentials is needed in all techniques.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

Copy link
Owner

@adanalvarez adanalvarez left a comment

Choose a reason for hiding this comment

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

Amazing work! Thanks a lot! LGTM

@adanalvarez adanalvarez merged commit f94a27a into adanalvarez:main Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants