# AWS - SQS Persistence {{#include ../../../banners/hacktricks-training.md}} ## SQS अधिक जानकारी के लिए देखें: {{#ref}} ../aws-services/aws-sqs-and-sns-enum.md {{#endref}} ### संसाधन नीति का उपयोग करना SQS में आपको IAM नीति के साथ **यह बताना होगा कि किसे पढ़ने और लिखने का अधिकार है**। बाहरी खातों, भूमिकाओं के ARN, या **यहाँ तक कि "\*"** को इंगित करना संभव है।\ निम्नलिखित नीति AWS में सभी को **MyTestQueue** नामक कतार में सब कुछ एक्सेस करने की अनुमति देती है: ```json { "Version": "2008-10-17", "Id": "__default_policy_ID", "Statement": [ { "Sid": "__owner_statement", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": ["SQS:*"], "Resource": "arn:aws:sqs:us-east-1:123123123123:MyTestQueue" } ] } ``` > [!NOTE] > आप हर बार जब एक नया संदेश कतार में डाला जाता है, तो **हमलावर के खाते में एक Lambda को ट्रिगर** कर सकते हैं (आपको इसे फिर से डालने की आवश्यकता होगी) किसी न किसी तरह। इसके लिए इन निर्देशों का पालन करें: [https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html) {{#include ../../../banners/hacktricks-training.md}}