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 / 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");
@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

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)
diff --git a/roles/bootstrap-os/tasks/bootstrap-debian.yml b/roles/bootstrap-os/tasks/bootstrap-debian.yml
index aec6d78b..e16b9c6e 100644
--- a/roles/bootstrap-os/tasks/bootstrap-debian.yml
+++ b/roles/bootstrap-os/tasks/bootstrap-debian.yml
@@ -59,9 +59,17 @@
when:
- need_bootstrap.rc != 0
-# Workaround for https://github.com/ansible/ansible/issues/25543
-- name: Install dbus for the hostname module
@praseodym
praseodym / psp-clusterroles.yaml
Last active May 12, 2019 19:01
Kubernetes PodSecurityPolicy configuration
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: psp-safe
rules:
- apiGroups: ['policy']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames:
#!/bin/bash
set -ex
sudo sysctl -w vm.max_map_count=262144
docker rm -f es1 || true
docker rm -f es2 || true
docker network inspect es || docker network create es
docker run -d --rm --name es1 --net es -e discovery.zen.ping.unicast.hosts=es2 -p 127.0.0.1:9200:9200 docker.elastic.co/elasticsearch/elasticsearch:6.4.0
docker run -d --rm --name es2 --net es -e discovery.zen.ping.unicast.hosts=es1 -p 127.0.0.1:9201:9200 docker.elastic.co/elasticsearch/elasticsearch:6.4.0
@praseodym
praseodym / openctf2018_24.md
Last active September 3, 2018 21:20
OpenCTF 2018: Challenge 24 (Nightmare-50)

OpenCTF 2018: Challenge 24 (Nightmare-50)

Challenge text:

Nightmare-50 50 ---
Automated home work scoring my ass. https://shades-of-nightmare.openctf.com/nzpoixyucvkjwnerntasdfascdvasdfqwerqwe/nightmare-50/ 

This website hosts a 'homework grading' application as an Xterm.js/Gotty webapp: