Skip to content

Instantly share code, notes, and snippets.

@renini
renini / BurpDock
Created March 1, 2021 19:36 — forked from r00tdaemon/BurpDock
How to setup Burp Suite inside a docker container. (https://ujjwal96.github.io/blog/2019/06/02/burpdock)
How to setup Burp Suite inside a docker container.
@renini
renini / CVE-2021-21972_vcsa.md
Created February 25, 2021 13:14
PoC for CVE-2021-21972 VMware VCSA

CVE-2021-21972

CVE-2021-21972

Tested against VMware VCSA 6.7

create ssh keypair

ssh-keygen -t rsa -f vcsa.key -N ''
@renini
renini / decompressPic.py
Created January 17, 2021 14:51 — forked from Instagraeme/decompressPic.py
Python Script to retrieve JPEG images from Hikvision PIC file format
#!/usr/bin/env python3
"""
Copyright (c) 2017 Graeme Smith
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
@renini
renini / CERT-CveEventWrite-Validation-CVE-2020-0601.ps1
Created January 16, 2020 22:27
Script to validate/test CveEventWrite logging to Audit-CVE
# Script to call the new CveEventWrite function to validate/test logging to Audit-CVE
# In this case generate a basic CVE-2020-0601 log entry
$MethodDefinition = @'
[DllImport("advapi32.dll", CharSet = CharSet.Auto)]
public static extern long CveEventWrite(string lpCveId, string lpAdditionalDetails);
'@
$Advapi32 = Add-Type -MemberDefinition $MethodDefinition -Name 'advapi32' -PassThru
$Advapi32::CveEventWrite('[CVE-2020-0601] CERT validation', 'Used by CERT to validate CVE-2020-0601')
@renini
renini / privacyidea_emergency_bypass_IRULE
Created August 31, 2018 14:35
Emergency F5 iRULE to bypass privacyidea otp auth
# Emergency iRULE to bypass privacyidea otp auth
# This will return the OKE status to all privacyidea auth requests for OTPs
# Only use when there is an emergency and nobody is able to login! (or when you have maintenance... ;))
#
# See: https://privacyidea.readthedocs.io/en/latest/modules/api/validate.html
when HTTP_REQUEST {
#if { [HTTP::method] eq "POST" } {
if {[string tolower [HTTP::path]] eq "/validate/check"} {
set json "{ \"detail\": { \"message\": \"matching 1 tokens\", \"serial\": \"IRULEBYPASS01\", \"type\": \"spass\" }, \"id\": \"1\", \"jsonrpc\": \"2.0\", \"result\": { \"status\": true, \"value\": true }, \"version\": \"privacyIDEA F5 Irule\" }"
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
</OOBE>
</settings>
</unattend>
@renini
renini / msfvenom-reverse-tcp-WaitForSingleObject.md
Created April 12, 2018 19:14 — forked from mgeeky/msfvenom-reverse-tcp-WaitForSingleObject.md
(OSCE/CTP, Module #3: Backdooring PE Files) Document explaining how to locate WaitForSingleObject(..., INFINITE) within msfvenom's (4.12.23-dev) generated payload and how to fix the payload's glitches.

Looking for WaitForSingleObject call within modern msfvenom generated payload.


Abstract

This is a document explaining how to locate WaitForSingleObject(..., INFINITE) within msfvenom's (4.12.23-dev) generated payload and how to fix the payload's glitches. It goes through the analysis of a windows/shell_reverse_tcp payload, touching issues like stack alignment, WaitForSingleObject locating & patching. It has been written when I realised there are many topics on the Offensive-Security OSCE/CTP forums touching problem of finding this particular Windows API. Since RE is one of my stronger FU's I decided to write down my explanation of the subject.

Contents:

@renini
renini / PS-BGInfo.ps1
Created February 22, 2018 16:33 — forked from dieseltravis/PS-BGInfo.ps1
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# Configuration:
# Font Family name
$font="Consolas"
# Font size in pixels
$size=10.0
# spacing in pixels
@renini
renini / ntlmdecoder.py
Created February 15, 2018 12:26 — forked from aseering/ntlmdecoder.py
NTLM auth-string decoder
#!/usr/bin/env python
## Decodes NTLM "Authenticate" HTTP-Header blobs.
## Reads the raw blob from stdin; prints out the contained metadata.
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages.
## Based on the excellent protocol description from:
## <http://davenport.sourceforge.net/ntlm.html>
## with additional detail subsequently added from the official protocol spec:
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx>
##
@renini
renini / self-signed-certificate-with-custom-ca.md
Created December 27, 2017 21:39 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096