Skip to content

Instantly share code, notes, and snippets.

View 0xdabbad00's full-sized avatar

Scott Piper 0xdabbad00

View GitHub Profile
{
"version":"2.0",
"metadata":{
"apiVersion":"2016-01-13",
"endpointPrefix":"cloudfront",
"globalEndpoint":"cloudfront.amazonaws.com",
"protocol":"rest-xml",
"serviceAbbreviation":"CloudFront",
"serviceFullName":"Amazon CloudFront",
"serviceId":"CloudFront",
@0xdabbad00
0xdabbad00 / gist:5d1d5fd619a20ba2ee899c56f8d6787f
Created March 26, 2019 22:02
WARNING: Only tested in a test account, beware, this could break things.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"apigateway:*",
"autoscaling:*",
"cloudtrail:*",
"cloudwatch:*",
"cloudformation:*",
a4b
account
acm
acm-pca
amplify
apigateway
application-autoscaling
appstream
appsync
artifact
@0xdabbad00
0xdabbad00 / resources_referenced_by_managed_policies.txt
Created February 10, 2019 19:26
AWS managed policies resource reference, found using https://github.com/SummitRoute/aws_managed_policies and: cat policies/* | jq '.PolicyVersion.Document.Statement[].Resource' | sed 's/ //' | sort | uniq
"*"
"arn:*:iam::*:role/aws-service-role/s3.data-source.lustre.fsx.amazonaws.com/AWSServiceRoleForFSxS3Access_*"
"arn:aws:a4b:*:*:gateway/*"
"arn:aws:acm-pca:*:*:certificate-authority/*"
"arn:aws:acuity:*:*:stream/deeplens*/*"
"arn:aws:apigateway:*::/*"
"arn:aws:apigateway:*::/account",
"arn:aws:apigateway:*::/clientcertificates",
"arn:aws:apigateway:*::/clientcertificates/*",
"arn:aws:apigateway:*::/domainnames"
#!/usr/bin/env python
from os import listdir
from os.path import isfile, join
import re
import json
from bs4 import BeautifulSoup
"""
Clone botocore and run `git rev-list --all > commit_list.txt` to get a chrological list of the hashes.
Then I manually installed https://github.com/nok/git-walk but had to modify it to use my list instead of generating it's own each time because it was going into a loop.
So `read_commit_ids` looks like this:
```
def read_commit_ids():
#cmd = 'git rev-list --all'
#log = subp.check_output(cmd.split()).strip()
#log = [line.strip() for line in log.split('\n')]
with open("commit_list.txt") as f:
@0xdabbad00
0xdabbad00 / CloudFormation_resources.txt
Last active May 28, 2019 15:46
CloudFormation resources. Found via: git clone --depth=1 https://github.com/awsdocs/aws-cloudformation-user-guide.git; cd aws-cloudformation-user-guide; grep -h "# AWS::" doc_source/aws-* | sed 's/# //' | sed 's/<.*//' | sort | uniq
AWS::AmazonMQ::Broker
AWS::AmazonMQ::Configuration
AWS::ApiGateway::Account
AWS::ApiGateway::ApiKey
AWS::ApiGateway::Authorizer
AWS::ApiGateway::BasePathMapping
AWS::ApiGateway::ClientCertificate
AWS::ApiGateway::Deployment
AWS::ApiGateway::DocumentationPart
AWS::ApiGateway::DocumentationVersion
@0xdabbad00
0xdabbad00 / config_resources.txt
Created January 12, 2019 03:31
AWS Config resources. Found by copying the HTML of https://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html to a file and running: grep "AWS::" tmp.txt | grep -v "," | grep -v "\." | sed 's/.*AWS:/AWS:/' | sed 's/<.*//' | sort
AWS::ACM::Certificate
AWS::AutoScaling::AutoScalingGroup
AWS::AutoScaling::LaunchConfiguration
AWS::AutoScaling::ScalingPolicy
AWS::AutoScaling::ScheduledAction
AWS::CloudFormation::Stack
AWS::CloudFront::Distribution
AWS::CloudFront::StreamingDistribution
AWS::CloudTrail::Trail
AWS::CloudWatch::Alarm
{
"update.channel": "none",
"extensions.autoUpdate": false,
"extensions.ignoreRecommendations": true,
"editor.autoClosingBrackets": false,
"html.autoClosingTags": false,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
Give a man an 0day and he'll have access for a day, teach a man to phish and he'll have access for life.
https://twitter.com/thegrugq/status/563964286783877121
--
You can get 25% off a Mandiant incident response with the code: ITWASCHINA. 100% off if you just use that code as the report.
https://twitter.com/thegrugq/status/600345075562909696
--
Fear of 0day is like being terrified of ninjas instead of cardiovascular disease.
https://twitter.com/thegrugq/status/851001030019907588