Skip to content

Instantly share code, notes, and snippets.

View BoredHackerBlog's full-sized avatar

boredhackerblog BoredHackerBlog

View GitHub Profile
@BoredHackerBlog
BoredHackerBlog / docker-compose.yaml
Last active March 28, 2024 17:20
grafana loki docker-compose file and vector settings
version: "3"
networks:
loki:
services:
loki:
image: grafana/loki:2.4.0
volumes:
- ./loki:/etc/loki
@BoredHackerBlog
BoredHackerBlog / winrar_CVE-2023-38831_extract_cmd.md
Last active August 24, 2023 16:06
Extracting malicious command file from rar file exploiting CVE-2023-38831
@BoredHackerBlog
BoredHackerBlog / docker-compose.yml
Created August 21, 2023 02:05
splunk free json ingest w/ persistence
version: "3.6"
services:
so1:
image: splunk/splunk:latest
container_name: so1
environment:
- SPLUNK_START_ARGS=--accept-license
- SPLUNK_PASSWORD=password
- SPLUNK_LICENSE_URI=Free
@BoredHackerBlog
BoredHackerBlog / guac_token.py
Created August 15, 2023 14:20
This code gets auth token to access guac account and also lets you expire the token instantly logging out the user. this may be useful if you'd like someone to temporarily access guac without giving them username and password
import requests
GUAC_URL="http://10.0.0.1:8080/guacamole"
GUAC_USERNAME="user"
GUAC_PASSWORD="password"
def get_token():
url = f"{GUAC_URL}/api/tokens"
payload = f"username={GUAC_USERNAME}&password={GUAC_PASSWORD}"
headers = {"Content-Type": "application/x-www-form-urlencoded"}
@BoredHackerBlog
BoredHackerBlog / docker-compose.yml
Created July 12, 2023 02:52
elasticsearch grafana with anonymous explore view
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.0
container_name: elasticsearch
environment:
- xpack.security.enabled=false #there is no password to access ES!!
- xpack.security.enrollment.enabled=false
- discovery.type=single-node
ulimits:
@BoredHackerBlog
BoredHackerBlog / Caddyfile
Created July 9, 2023 16:32
Graylog with Caddy reverse proxy and anonymous login
:80 {
reverse_proxy :9000 {
header_up +Remote-User "anonymous"
}
}
@BoredHackerBlog
BoredHackerBlog / docker-compose.yml
Created May 8, 2023 00:17
research webtop w/ vpn
version: "3.9"
services:
cloudflared:
image: cloudflare/cloudflared:latest
network_mode: "service:gluetun"
command: tunnel --no-autoupdate --url http://localhost:3000
#webtop
webtop:
@BoredHackerBlog
BoredHackerBlog / ha_ingest.py
Last active April 9, 2023 17:29
procsearch
# ingest data from hybrid analysis
import requests
import psycopg2
HA_API = ""
ha_header = {'api-key':HA_API, 'user-agent': 'Falcon Sandbox', 'accept': 'application/json'}
POSTGRES_HOST = "localhost"
POSTGRES_DB = "procsearch"
POSTGRES_SEARCH_USER = "postgres"
@BoredHackerBlog
BoredHackerBlog / abusech_malware_bazaar_hourly.sh
Created August 10, 2022 23:24
download and analyze abuse.ch malware bazaar hourly files
#!/bin/bash
# prolly use cron w/ '10 * * * *' so it runs every hour, at hour:10mins
hourlyfile=$(date -u --date="1 hour ago" +%Y-%m-%d-%H).zip
wget https://datalake.abuse.ch/malware-bazaar/hourly/$hourlyfile -O /tmp/hourly.zip
unzip -P infected -o /tmp/hourly.zip -d /tmp/hourly_files
# do stuff with the files
file /tmp/hourly_files/* >> /tmp/file_out.txt
# do stuff with the files
rm -rf /tmp/hourly_files /tmp/hourly.zip
@BoredHackerBlog
BoredHackerBlog / rulematch.py
Created September 4, 2021 19:19
dict rule match - this code essentially takes in a bunch of rules and compares them against an event (dict) and prints if something matches
# requires dictquery (pip3 install dictquery or get it from here: https://github.com/cyberlis/dictquery)
import dictquery as dq
#each rule needs to be a new line
#rule format, RULENAME|RULE
#rule syntax: https://github.com/cyberlis/dictquery#dictquery
rules_file = "rules.txt"
rules = {}