Skip to content

Instantly share code, notes, and snippets.

@pirenga
pirenga / default.conf
Created June 4, 2022 06:43 — forked from mattes/default.conf
redash.io setup
upstream redash {
server redash:5000;
}
server {
listen 80;
location / {
return 301 https://$host$request_uri;
}
@pirenga
pirenga / PoC_CVE-2021-28482.py
Created November 23, 2021 12:45 — forked from testanull/PoC_CVE-2021-28482.py
PoC of CVE-2021-28482
import requests
import time
import sys
from base64 import b64encode
from requests_ntlm2 import HttpNtlmAuth
from urllib3.exceptions import InsecureRequestWarning
from urllib import quote_plus
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
POST /api/Action/TestAction HTTP/1.1
Host: <target>
Content-Length: 3978
Accept: application/json, text/javascript, */*; q=0.01
X-XSRF-TOKEN: <token>
X-Requested-With: XMLHttpRequest
ViewLimitationID: 0
User-Agent: Mozilla/5.0
Content-Type: application/json; charset=UTF-8
Cookie: <cookie>
import requests
import random
import string
import sys
import time
import requests
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def id_generator(size=6, chars=string.ascii_lowercase + string.digits):
@pirenga
pirenga / Documentation.md
Created June 10, 2021 13:42 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
./configure
# for 8 cores cpu use make -j 8
make -j 8
make check
sudo make install
@pirenga
pirenga / Solarwinds_Orion_LFD.py
Created January 7, 2021 05:33 — forked from 0xsha/Solarwinds_Orion_LFD.py
Solarwinds_Orion_LFD local file disclosure PoC for SolarWinds Orion aka door to SuperNova?)
# CVE-2020-???? (local file disclosure PoC for SolarWinds Orion aka door to SuperNova ? )
# @0xSha
# (C) 2020 0xSha.io
# Advisory : https://www.solarwinds.com/securityadvisory
# Mitigation : https://downloads.solarwinds.com/solarwinds/Support/SupernovaMitigation.zip
# Details : https://kb.cert.org/vuls/id/843464
# C:\inetpub\SolarWinds\bin\OrionWeb.DLL
# According to SolarWinds.Orion.Web.HttpModules
@pirenga
pirenga / packer-esxi-static-network.json
Created December 7, 2020 22:02 — forked from gogson/packer-esxi-static-network.json
Packer ESXi remote build with static network configuration
{
"vm_name": "my-vm",
"remote_type": "esx5",
"remote_host": "exsi.myhost.com",
"remote_password": "myEsxiRootPassword",
"remote_datastore": "datastore1",
"type": "vmware-iso",
"output_directory": "output-vm",
"floppy_files": [
"preseed.cfg",
@pirenga
pirenga / docker-bash-command.md
Created December 7, 2020 22:00 — forked from gogson/ docker-bash-command.md
Open a bash to a running Docker container using a shell command

Purpose

Create a bash command for opening a shell to a running Docker container

Usage

Fetch container ID from docker ps and run docker-bash 880e6a9d9601 where "880e6a9d9601" is the container ID

Install

@pirenga
pirenga / proxmox-proxy
Created June 24, 2020 19:16 — forked from basoro/proxmox-proxy
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs: