Skip to content

Instantly share code, notes, and snippets.

View 0xdabbad00's full-sized avatar

Scott Piper 0xdabbad00

View GitHub Profile
@0xdabbad00
0xdabbad00 / server.go
Created April 3, 2015 21:24
server.go
// Gist associated with http://0xdabbad00.com/2015/04/03/choosing_libraries_for_go_web_servers/
package main
import (
"flag"
"fmt"
"net/http"
log "github.com/Sirupsen/logrus"
@0xdabbad00
0xdabbad00 / middleware.go
Created April 3, 2015 21:26
ApplyProtectionFromCSRF function
// Gist associated with http://0xdabbad00.com/2015/04/03/choosing_libraries_for_go_web_servers/
// ApplyProtectionFromCSRF makes all POST messages check for a csrf_token
func (application *Application) ApplyProtectionFromCSRF(c *web.C, h http.Handler) http.Handler {
fn := func(w http.ResponseWriter, r *http.Request) {
protected := nosurf.New(h)
failureHandler := func(w http.ResponseWriter, r *http.Request) {
log.Errorf("Possible CSRF attack")
w.Write([]byte("400: Request could not be handled"))
@0xdabbad00
0xdabbad00 / IceBuddha_USN_parser
Created May 11, 2015 22:18
USN Parser for IceBuddha
""" USN file parse script for IceBuddha.com, based on http://shark5terforensics.blogspot.com/2015/03/manually-parsing-unallocated-usn.html
"""
import icebuddha
__author__ = "0xdabbad00"
__license__ = "Apache"
class Parse:
def run(self, data):
filedata = data
{
"update.channel": "none",
"extensions.autoUpdate": false,
"extensions.ignoreRecommendations": true,
"editor.autoClosingBrackets": false,
"html.autoClosingTags": false,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
@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
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
{
"version":"2.0",
"metadata":{
"apiVersion":"2016-01-13",
"endpointPrefix":"cloudfront",
"globalEndpoint":"cloudfront.amazonaws.com",
"protocol":"rest-xml",
"serviceAbbreviation":"CloudFront",
"serviceFullName":"Amazon CloudFront",
"serviceId":"CloudFront",
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<xs:schema xmlns:tns="http://cloudfront.amazonaws.com/doc/2016-01-13/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cloudfront.amazonaws.com/doc/2016-01-13/" elementFormDefault="qualified">
<xs:element name="ActiveTrustedSigners" type="tns:ActiveTrustedSigners"/>
<xs:complexType name="ActiveTrustedSigners">
<xs:sequence>
<xs:element name="Enabled" type="xs:boolean"/>
<xs:element name="Quantity" type="xs:integer"/>
<xs:element name="Items" type="tns:SignerList" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
@0xdabbad00
0xdabbad00 / ViewOnlyAccess-expanded.txt
Created July 24, 2018 17:05
ViewOnlyAccess IAM privileges expanded
acm:ListCertificates
application-autoscaling:DescribeScalableTargets
application-autoscaling:DescribeScalingActivities
application-autoscaling:DescribeScalingPolicies
application-autoscaling:DescribeScheduledActions
athena:ListNamedQueries
athena:ListQueryExecutions
autoscaling:DescribeAccountLimits
autoscaling:DescribeAdjustmentTypes
autoscaling:DescribeAutoScalingGroups
Announcement: Amazon S3 will no longer support path-style API requests starting September 30th, 2020
Posted By: Sarasaws
Created in: Forum: Amazon Simple Storage Service (S3)
Posted on: Apr 30, 2019 3:43 PM
Amazon S3 currently supports two request URI styles in all regions: path-style (also known as V1) that includes bucket name in the path of the URI (example: //s3.amazonaws.com/<bucketname>/key), and virtual-hosted style (also known as V2) which uses the bucket name as part of the domain name (example: //<bucketname>.s3.amazonaws.com/key). In our effort to continuously improve customer experience, the path-style naming convention is being retired in favor of virtual-hosted style request format. Customers should update their applications to use the virtual-hosted style request format when making S3 API requests before September 30th, 2020 to avoid any service disruptions. Customers using the AWS SDK can upgrade to the most recent version of the SDK to ensure their applications are using the virtual-hosted st