forked from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
025634d
commit 00cc8b1
Showing
88 changed files
with
89 additions
and
66 deletions.
There are no files selected for viewing
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
.../Projects/Creating a Global Attack Map.md → ... Projects/Creating a Global Attack Map.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
--- | ||
tags: | ||
- azure | ||
date: | ||
--- | ||
This project creates an attack map of all failed RDP requests made on a honeypot virtual machine. | ||
|
File renamed without changes.
File renamed without changes.
42 changes: 21 additions & 21 deletions
42
...nsformation using S3 Events and Lambda.md → ...ming images using S3 Events and Lambda.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,85 +1,85 @@ | ||
This project will use S3 events that will trigger a lambda. Every time an image is uploaded, it will trigger the Lambda and pixelize the image. | ||
This project will use S3 events that will trigger a lambda. Every time an image is uploaded, it will trigger the Lambda and pixelizes the image. | ||
|
||
This lab was taken from Adrian Cantrill's course: https://github.com/acantril/learn-cantrill-io-labs/tree/master/00-aws-simple-demos/aws-lambda-s3-events | ||
#### Create the S3 Buckets | ||
In the S3 portal, click on 'Create bucket' we will need to create 2 buckets: | ||
|
||
![[Pasted image 20240702113438.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702113438.png]] | ||
|
||
Give it a unique name, I named one 'imagepixelationsource' and 'imagepixelationprocessed': | ||
|
||
![[Pasted image 20240702115102.png]] | ||
![[Pasted image 20240702115818.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702115102.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702115818.png]] | ||
|
||
##### Create the Lambda role | ||
|
||
Navigate to IAM and select 'Roles', click on 'Create role': | ||
|
||
![[Pasted image 20240702120014.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702120014.png]] | ||
|
||
Select 'AWS service' and choose Lambda: | ||
|
||
![[Pasted image 20240702120116.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702120116.png]] | ||
|
||
Give it a name and select 'Create role', we will not be adding any policies yet: | ||
|
||
![[Pasted image 20240702120226.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702120226.png]] | ||
|
||
Select the role and select 'Add permissions' and 'Create inline policy': | ||
![[Pasted image 20240702120902.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702120902.png]] | ||
|
||
Select JSON and paste the JSON copied from https://raw.githubusercontent.com/acantril/learn-cantrill-io-labs/master/00-aws-simple-demos/aws-lambda-s3-events/01_LABSETUP/policy/s3pixelator.json to here. Edit in the bucket names and account ID: | ||
|
||
![[Pasted image 20240702121437.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702121437.png]] | ||
|
||
Give the policy a name and click 'Create policy': | ||
|
||
![[Pasted image 20240702121628.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702121628.png]] | ||
|
||
#### Create the Lambda Function | ||
|
||
Navigate to the Lambda page and click on 'Create a function': | ||
|
||
![[Pasted image 20240702122338.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702122338.png]] | ||
|
||
Author from scratch and fill out the required information: | ||
Function name | ||
Python 3.9 | ||
x86_64 | ||
Use an existing role (Select the role created in the step above) | ||
|
||
![[Pasted image 20240702122509.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702122509.png]] | ||
|
||
Select the 'Upload from' and choose the .zip file. Upload the .zip file from https://github.com/acantril/learn-cantrill-io-labs/blob/master/00-aws-simple-demos/aws-lambda-s3-events/01_LABSETUP/my-deployment-package.zip : | ||
|
||
![[Pasted image 20240702122729.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702122729.png]] | ||
|
||
Click on the 'Configuration' tab and under 'Environment Variables', select 'Edit': | ||
|
||
![[Pasted image 20240702122953.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702122953.png]] | ||
|
||
Add the processed bucket key and value and hit 'Save': | ||
|
||
![[Pasted image 20240702123115.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702123115.png]] | ||
|
||
Under 'General configuration', change the timeout to 1 minute: | ||
|
||
![[Pasted image 20240702123329.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702123329.png]] | ||
|
||
Under the 'Triggers' section, add a trigger: | ||
|
||
![[Pasted image 20240702123416.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702123416.png]] | ||
|
||
Make sure to select the source bucket or it may cause an exponential look and increase your costs!: | ||
|
||
![[Pasted image 20240702123606.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702123606.png]] | ||
|
||
#### Assembling everything together | ||
|
||
Upload an image into the source bucket and see how the processed bucket will output 5 images with varying degrees of pixelation: | ||
|
||
![[Pasted image 20240702125012.png]]![[Pasted image 20240702125030.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702125012.png]]![[content/3 AWS Services/Images/Pasted image 20240702125030.png]] | ||
|
||
![[Pasted image 20240702125139.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702125139.png]] | ||
|
||
![[Pasted image 20240702125252.png]] | ||
![[content/3 AWS Services/Images/Pasted image 20240702125252.png]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters