Skip to content

Instantly share code, notes, and snippets.

@alfredocambera
alfredocambera / cloudflare-list-zones-and-records.py
Last active April 3, 2024 10:02
Lists cloudflare zones an DNS records
#!/usr/bin/env python
# prints all the records in all the zones in colums separated by ','.
# It uses raw mode to handle pagination to iterate over zones and records
import CloudFlare
separator=","
cf = CloudFlare.CloudFlare(token='REPLACE_WITH_YOUR_OWN_CF_TOKEN', raw=True)
per_page = 10
@lukeplausin
lukeplausin / transfer_ssm_file.sh
Last active April 29, 2024 18:34
Transfer a file to EC2 SSM instance without using S3 (SSM only)
# This script will explain how to transfer a file to EC2 using SSM ONLY!
# You will need to have permission to run SSM commands on the target machine and have sudo access as well
# Infos
INSTANCE_ID=i-1234567890
FILE_NAME=the_file.tar.gz
# Step 1: Run command on machine to install netcat and dump from port to filename
# < Start session
@ssstonebraker
ssstonebraker / pentestws.json
Created January 28, 2021 23:15
pentest.ws export
{
"username": "brakertech",
"export_time": "2021-01-28T23:14:25.004Z",
"export_type": "Account Items",
"service_command_library": [
{
"service": "http",
"sort_order": null,
"name": "davtest",
"command": "davtest -url http://$ip:$port",
@gregn610
gregn610 / cf.template
Created May 29, 2020 07:13
cloudformation template with templatebody sub
---
AWSTemplateFormatVersion: 2010-09-09
Description: "Conformance Pack of Operational Best Practices for Amazon S3 with Remediation."
Resources:
ConformancePackS3Operations:
Type: AWS::Config::ConformancePack
Properties:
ConformancePackName: "CyberOpsS3RemediationOperations"
@SwitHak
SwitHak / 20200114-TLP-WHITE_CVE-2020-0601.md
Last active February 9, 2024 14:42
BlueTeam CheatSheet * CVE-2020-0601 * crypt32.dll | Last updated: 2020-01-21 1817 UTC

CVE-2020-0601 AKA ChainOfFools OR CurveBall

General

  • Microsoft disclosed a vulnerability in their monthly Patch Tuesday referenced under CVE-2020-0601.
  • The vulnerability was discovered by the U.S. National Security Agency, anounced today (2020-01-14) in their press conference, followed by a blog post and an official security advisory.
  • The flaw is located in the "CRYPT32.DLL" file under the C:\Windows\System32\ directory.

Vulnerability explanation

  • NSA description:
  • NSA has discovered a critical vulnerability (CVE-2020-0601) affecting Microsoft Windows® cryptographic functionality.
@ropnop
ropnop / docker_aliases.sh
Created July 18, 2019 02:16
Docker aliases
function dockershell() {
docker run --rm -i -t --entrypoint=/bin/bash "$@"
}
function dockershellsh() {
docker run --rm -i -t --entrypoint=/bin/sh "$@"
}
function dockershellhere() {
dirname=${PWD##*/}
@JohnLaTwC
JohnLaTwC / bashscript.sh
Created May 6, 2019 14:54
Bash script: 077d51016727216dd6216a3722353be274288d411a6295a5d804d251dacd88fc
#!/bin/bash
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#This is the Old-ReBuild Lady job copy
#
#Goal:
# The goal of this campaign is as follows;
# - To keep the internet safe.
# - To keep them hackers from causing real damage to organisations.
# - We know you feel We are a potential threat, well We ain't.
@ag-michael
ag-michael / ADenrichment.html
Created April 16, 2019 17:05
ADEnrichment report template
<style>
#reportrow {
position:relative;
overflow-wrap:anywhere;
border-bottom:solid 1px;
}
</style>
<div class="panel panel-info" ng-if="success">
<div class="panel-heading">
@ag-michael
ag-michael / FalconHuntqueries.md
Last active November 23, 2023 12:02
Falcon hunt queries

timestamp convert:


 convert ctime(timestamp/1000)

.top,.club,.xyz,.ru domain lookups where the amount of lookup for the domain is more than 1 and less than 4 per computer


aid=* event_simpleName=DnsRequest | regex DomainName=".*\.top$|.*\.club$|.*\.xyz$|.*\.ru$|[0-9]+.*\.\w$" | stats values(ComputerName) count by DomainName| where count &lt;4 | sort – count