Skip to content

Instantly share code, notes, and snippets.

View praseodym's full-sized avatar
:shipit:
ship it

Mark Janssen praseodym

:shipit:
ship it
View GitHub Profile
@praseodym
praseodym / osv2020.diff
Created December 1, 2023 10:36
OSV2020-U diff 1.9.1.2 vs 1.9.1.3
diff --color=auto -r osv2020-u-versie-1.9.1.2/elect-base-jar.jar/de/ivu/elect/business/dokumente/boundary/DokumentVorlageEdit.java nl-was-war-1.9.1.3-sources-all/elect-base-jar.jar/de/ivu/elect/business/dokumente/boundary/DokumentVorlageEdit.java
53c53
< // msc: Ich mache es mir einfach und ersetze die vorhandene Datei auf dem Server... nicht ganz sauber, für den Fall,
---
> // elect Ich mache es mir einfach und ersetze die vorhandene Datei auf dem Server... nicht ganz sauber, für den Fall,
diff --color=auto -r osv2020-u-versie-1.9.1.2/elect-base-jar.jar/de/ivu/elect/business/gebietsbaum/entity/AbstractGebiet.java nl-was-war-1.9.1.3-sources-all/elect-base-jar.jar/de/ivu/elect/business/gebietsbaum/entity/AbstractGebiet.java
95c95
< // msc: nicht ändern (Performance, Lambdas und Sets machen die Sache nicht schenller...)
---
> // elect nicht ändern (Performance, Lambdas und Sets machen die Sache nicht schenller...)
@praseodym
praseodym / _vmdir-exploit.md
Last active January 4, 2023 08:16
Exploit for VMware vCenter Directory Service (vmdir) - CVE-2020-3952 / VMSA-2020-0006

Exploit for VMware vCenter Directory Service (vmdir) - CVE-2020-3952 / VMSA-2020-0006

This is my proof-of-concept exploit code for the VMware vCenter Directory Service (vmdir) sensitive information disclosure vulnerability (CVE-2020-3952 / VMSA-2020-0006).

It turns out that the vmdir service, which provides an LDAP directory server (and more), allows anonymous LDAP connections (also called LDAP binding) in the ACL MODE: Legacy configuration that is present after upgrading from vCenter 6.5. While the LDAP tree doesn't expose password hashes for administrative users, it does expose the VMware SSO server's SAML identity provider (IdP) certificates and private key. This key can be downloaded and used to sign arbitrary SAML responses, allowing an attacker to

@praseodym
praseodym / csr.sh
Last active November 13, 2022 13:05
#!/bin/bash
# csr.sh: Certificate Signing Request Generator
set -e
if [ $# -lt 1 ]; then
echo "Usage: $0 hostname [alt.hostname1] [alt.hostname2]"
exit 1
fi
@praseodym
praseodym / config.gateway.json
Created December 18, 2016 14:39
UniFi Security Gateway configuration
{
"firewall": {
"all-ping": "enable",
"broadcast-ping": "disable",
"group": {
"address-group": {
"authorized_guests": {
"description": "authorized guests MAC addresses"
},
"guest_allow_addresses": {
@praseodym
praseodym / AESGCMUpdateAAD2.java
Last active June 7, 2021 16:38
JDK8 AES-GCM code example
import javax.crypto.*;
import javax.crypto.spec.GCMParameterSpec;
import java.nio.ByteBuffer;
import java.security.SecureRandom;
import java.util.Arrays;
public class AESGCMUpdateAAD2 {
// AES-GCM parameters
public static final int AES_KEY_SIZE = 128; // in bits
@praseodym
praseodym / common_tasks_apt.yml
Created November 3, 2016 20:06
Ansible examples
---
- name: ensure wheezy-backports is present
apt_repository: repo="deb http://ftp.nl.debian.org/debian/ wheezy-backports main contrib non-free" state=present update_cache=yes
when: ansible_distribution_release == 'wheezy'
- name: ensure jessie-backports is present
apt_repository: repo="deb http://ftp.nl.debian.org/debian/ jessie-backports main contrib non-free" state=present update_cache=yes
when: ansible_distribution_release == 'jessie'
@praseodym
praseodym / ingress-nginx.yaml
Last active April 30, 2020 21:54
Linkerd 503 Service Unavailable repro
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
name: ingress-nginx
---
kind: ConfigMap
@praseodym
praseodym / Migration.java
Created April 26, 2020 12:59
Java tool to migrate JSR310 java.time.LocalDate serialized as bytea in PostgreSQL to proper date column
import java.io.ByteArrayInputStream;
import java.io.ObjectInputStream;
import java.sql.*;
import java.time.LocalDate;
public class Migration {
public static void main(String[] args) throws Exception {
String url = "jdbc:postgresql://joost.chnet/choice?ssl=true&sslrootcert=wisvch.crt";
Connection conn = DriverManager.getConnection(url, "user", "password");
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: 0.30.0
Build: git-7e65b90c4
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.17.8
-------------------------------------------------------------------------------
W0301 00:31:38.725688 8 flags.go:260] SSL certificate chain completion is disabled (--enable-ssl-chain-completion=false)