Skip to content

Instantly share code, notes, and snippets.

View d1str0's full-sized avatar

Brady Sullivan d1str0

  • Imageware
  • Portland, Oregon
View GitHub Profile
package main
import (
"flag"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
@d1str0
d1str0 / gist:8bac584197ca7df559d51101f383a605
Created August 5, 2021 20:33
Badge - getting started
To get started,
Step 1: You will need to download new firmware for your badge to participate, this firmware can be found here https://defcon.org/signal/ (this link can be found in the topic of #dc29-badge as well if you don't trust me).
Step 2: Connect your badge to your PC with usb-c on badge side, and usb-a on computer. Turn power switch from battery to USB while holding down the bottom right button, your badge should glow red.
Step 3: You should see your badge as an attached USB drive. Drag and drop the new firmware into your badge. It should automatically reboot.
Step 4: Connect to the badge. For macOS, you can run `screen /dev/tty.usbmodem123451 9600` which will present a black screen, then press enter. For linux, use the previous command with 'sudo'.
@d1str0
d1str0 / events.txt
Created August 30, 2020 00:51
IAM Events
"AddClientIDToOpenIDConnectProvider",
"AddRoleToInstanceProfile",
"AddUserToGroup",
"AttachGroupPolicy",
"AttachRolePolicy",
"AttachUserPolicy",
"ChangePassword",
"CreateAccessKey",
"CreateAccountAlias",
import * as cdk from '@aws-cdk/core';
import * as ec2 from "@aws-cdk/aws-ec2";
import ecs = require('@aws-cdk/aws-ecs');
import ecr = require('@aws-cdk/aws-ecr');
import ecs_patterns = require('@aws-cdk/aws-ecs-patterns');
export class IdrdConstructStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
@d1str0
d1str0 / Player.log
Created June 18, 2020 00:53
Log file from NON experimental (1.5i)
Desktop is 1920 x 1080 @ 60 Hz
[Vulkan init] extensions: count=18
[Vulkan init] extensions: name=VK_KHR_device_group_creation, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_memory_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_semaphore_capabilities, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_display_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_physical_device_properties2, enabled=0
[Vulkan init] extensions: name=VK_KHR_get_surface_capabilities2, enabled=0
[Vulkan init] extensions: name=VK_KHR_surface, enabled=1
@d1str0
d1str0 / Player.log
Created June 18, 2020 00:51
From current *experimental* build
Mono path[0] = '/home/brady/.steam/steam/steamapps/common/Parkitect/Parkitect_Data/Managed'
Mono config path = '/home/brady/.steam/steam/steamapps/common/Parkitect/Parkitect_Data/MonoBleedingEdge/etc'
Preloaded 'UnityFbxSdkNative.so'
Preloaded 'libsteam_api.so'
Display 0 'LEN LI2264d 22"': 1920x1080 (primary device).
Display 1 'LG Ultra HD 27"': 3840x2160 (secondary device).
Desktop is 1920 x 1080 @ 60 Hz
[Vulkan init] extensions: count=18
[Vulkan init] extensions: name=VK_KHR_device_group_creation, enabled=0
[Vulkan init] extensions: name=VK_KHR_external_fence_capabilities, enabled=0
// ValidateToken takes a token string, usually provided by the user, and
// validates whether or not it is properly signed as well as parses out any claims.
func (s *JWTSecret) ValidateToken(tokenString string) (jwt.MapClaims, error) {
// Make sure token is valid
err := s.ValidSecret()
if err != nil {
return nil, err
}
@d1str0
d1str0 / reconnect.go
Created May 2, 2019 03:50
Reconnect logic.
var recon <-chan time.Time
go func() {
for {
select {
// If we see a disconnect, try to reconnect
case <-client.Disconnected:
// Trigger reconnect immediately
recon = time.After(0)
case <-recon:
fmt.Printf("Attempting to reconnect...\n")
@d1str0
d1str0 / update-geolite2.sh
Created March 27, 2019 22:36
chmod +x update-geolite2.sh && ./update-geolite2.sh
#!/bin/sh
cd /opt/
mkdir GeoLite2-City
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz -O GeoLite2-City.tar.gz
tar xvf GeoLite2-City.tar.gz -C GeoLite2-City --strip-components 1
mv GeoLite2-City/GeoLite2-City.mmdb ./
mkdir GeoLite2-ASN
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz -O GeoLite2-ASN.tar.gz
tar xvf GeoLite2-ASN.tar.gz -C GeoLite2-ASN --strip-components 1
mv GeoLite2-ASN/GeoLite2-ASN.mmdb ./
{
"data": [
{
"count": 296,
"honeypot": "cowrie",
"source_ip": "88.214.26.89"
},
{
"count": 181,
"honeypot": "cowrie",