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
#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,
@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"
@manesec
manesec / updateTimeFromNTP.py
Created May 4, 2024 07:58
Update time from NTP SERVER with windows
import time
import os
import ntplib
client = ntplib.NTPClient()
response = client.request('ntp4.aliyun.com')
timestamp = int(response.tx_time)
date_string = time.strftime('%d-%m-%Y', time.localtime(timestamp))
print(date_string)
os.system('date ' + date_string)
@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 / 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 / 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 / singbox.json
Created November 3, 2023 07:16
解決 HTB THM 靶場連接超時的 singbox 配置文件,使用singbox劫持openvpn
{
"log": {
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tls://dns.google",
@manesec
manesec / SeBackupPrivilege.md
Created November 2, 2023 09:53
Exploit with SeBackupPrivilege.

SeBackupPrivilege

Exploit with SeBackupPrivilege.

You need to setup NTFS Disk to support remote windows backup.

0x0 Pre-setup ntfs

# Create 2G Disk
@manesec
manesec / Ping Monitor.sh
Last active October 28, 2023 11:41
Use for Ping Monitor
interface="$(ip tuntap show | cut -d : -f1 | head -n 1)"
ip=`ip -j route list table all | jq -r '.[] | select(.dev=="'$interface'") | .gateway' | grep -v null | head -n 1`
ping $ip -W 1 -c 1| awk -F'/' 'END{ print (/^rtt/? " - "$5" ms":"") }'
@manesec
manesec / better-sqli-lab.sh
Last active October 13, 2023 17:54
Hackable sqli-lab container
#! /bin/bash
# Please note that the script runs in base64 to prevent spoilers.
# If you're done, you can decode the base64.
# container port
port=8888
echo ' *** This is script used to create Hackable sqli-lab container *** '
echo 'Please Note that: After patch it, You can get a root shell !!'