Skip to content

Instantly share code, notes, and snippets.

View manesec's full-sized avatar
🏠
Sleep is good

Mane manesec

🏠
Sleep is good
View GitHub Profile
@manesec
manesec / rocky-docker.sh
Created March 24, 2023 04:16 — forked from ryanmaclean/rocky-docker.sh
Install Docker on Rocky Linux
#!/usr/bin/env bash
## Script to install docker-ce on Rocky Linux
## Run using `sudo rocky-docker.sh`
# Ensuring "GROUP" variable has not been set elsewhere
unset GROUP
echo "Removing podman and installing Docker CE"
dnf remove -y podman buildah
@manesec
manesec / elasticsearch_in_lxd.md
Created April 17, 2023 21:53 — forked from ruanbekker/elasticsearch_in_lxd.md
Fix Elasticsearch issues in LXD/LXC containers

Errors like this appear when you start elasticsearch in a container:

$ journalctl -xe
Dec 27 16:50:17 elasticsearch-03 mount[62]: mount: /sys/kernel/config: cannot mount configfs read-only.
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '262144' to 'vm/max_map_count', ignoring: Read-only file system
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '1' to 'fs/protected_hardlinks', ignoring: Read-only file system
Dec 27 16:50:17 elasticsearch-03 systemd-sysctl[63]: Couldn't write '1' to 'fs/protected_symlinks', ignoring: Read-only file system

$ /etc/init.d/elasticsearch status
@manesec
manesec / decryptchromecookies.py
Created December 18, 2023 15:09 — forked from zackmark29/decryptchromecookies.py
Decrypt Chrome Cookies File (Python 3) - Windows
# Based on:
# https://gist.github.com/DakuTree/98c8362fb424351b803e
# https://gist.github.com/jordan-wright/5770442
# https://gist.github.com/DakuTree/428e5b737306937628f2944fbfdc4ffc
# https://stackoverflow.com/questions/60416350/chrome-80-how-to-decode-cookies
# https://stackoverflow.com/questions/43987779/python-module-crypto-cipher-aes-has-no-attribute-mode-ccm-even-though-pycry
import os
import json
import base64
@manesec
manesec / minio-upload.sh
Created February 22, 2024 17:54 — forked from PhilipSchmid/minio-upload.sh
Upload data to Minio using CURL
#!/bin/bash
# Usage: ./minio-upload my-bucket my-file.zip
bucket=$1
file=$2
host=minio.example.com
s3_key=svc_example_user
s3_secret=svc_example_user_password
@manesec
manesec / SimpleHTTPServerWithUpload.py
Created March 4, 2024 21:18 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""
@manesec
manesec / rbcd_demo.ps1
Created June 8, 2024 18:13 — forked from HarmJ0y/rbcd_demo.ps1
Resource-based constrained delegation computer DACL takeover demo
# import the necessary toolsets
Import-Module .\powermad.ps1
Import-Module .\powerview.ps1
# we are TESTLAB\attacker, who has GenericWrite rights over the primary$ computer account
whoami
# the target computer object we're taking over
$TargetComputer = "primary.testlab.local"
#https://rohnspowershellblog.wordpress.com/2013/03/19/viewing-service-acls/
Add-Type @"
[System.FlagsAttribute]
public enum ServiceAccessFlags : uint
{
QueryConfig = 1,
ChangeConfig = 2,
QueryStatus = 4,
EnumerateDependents = 8,
Start = 16,