TOPIC | AWS | AZURE | FUNCTIONALITY |
---|---|---|---|
Compute | E |
This file contains hidden or 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
#!/usr/bin/env bash | |
# print usage | |
DOMAIN=$1 | |
if [ -z "$1" ]; then | |
echo "USAGE: $0 domain.lan" | |
echo "" | |
echo "This will generate a non-secure self-signed wildcard certificate for given domain." | |
echo "This should only be used in a development environment." |
This file contains hidden or 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
# Generate a new key | |
openssl genrsa -out server.key 2048 | |
# Generate a new CSR | |
openssl req -sha256 -new -key server.key -out server.csr | |
# Check certificate against CA | |
openssl verify -verbose -CApath ./CA/ -CAfile ./CA/cacert.pem cert.pem | |
# Self Signed |
This file contains hidden or 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
::############################################################################################################### | |
:: Credits and More info: https://gist.github.com/mackwage/08604751462126599d7e52f233490efe | |
:: https://github.com/LOLBAS-Project/LOLBAS | |
:: https://lolbas-project.github.io/ | |
:: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
:: https://github.com/cryps1s/DARKSURGEON/tree/master/configuration/configuration-scripts | |
:: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1#file-reclaimwindows10-ps1-L71 | |
:: https://github.com/teusink/Home-Security-by-W10-Hardening | |
:: | |
::############################################################################################################### |
This file contains hidden or 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
############################################### | |
## Author : HKO | |
## Date: 16/02/2020 | |
## Description: This Lambda function Add Bucket in VPC S3 Endpoint Policy | |
##################################################### | |
from boto3 import resource, client | |
from logging import getLogger, info, error, debug | |
from os import environ | |
from botocore.exceptions import ClientError |
This file contains hidden or 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
data "aws_iam_policy_document" "lambda_policy_doc" { | |
statement { | |
effect = "Allow" | |
actions = [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents", | |
"config:PutEvaluations", | |
] |
This file contains hidden or 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
############################################### | |
## Author : HKO | |
## Date: 16/02/2020 | |
## Description: This Lambda function Add Bucket in VPC S3 Endpoint Policy | |
##################################################### | |
from boto3 import resource, client | |
from logging import getLogger, info, error, debug | |
from os import environ | |
from botocore.exceptions import ClientError |
This file contains hidden or 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
############################################### | |
## Author : Hervekhg | |
## Description: This Lambda function enforce encryption on unencrypted S3 Bucket | |
##################################################### | |
from boto3 import resource, client | |
from logging import getLogger, info, error, debug | |
from os import environ | |
from botocore.exceptions import ClientError |
This file contains hidden or 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
cd terraform_code_folder | |
terraform init | |
terraform plan | |
terraform apply |
This file contains hidden or 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
resource "aws_cloudwatch_event_target" "sns_target" { | |
arn = var.sns_topic_arn | |
rule = aws_cloudwatch_event_rule.daily.name | |
target_id = "send-sns-notification" | |
} |
NewerOlder