Skip to content

Instantly share code, notes, and snippets.

@c4mx
c4mx / setuid_shell.c
Last active July 20, 2021 16:28
Password-protected setuid shell
#include <stdlib.h>
#include <stdio.h>
#include <openssl/sha.h>
#include <stddef.h>
#include <errno.h>
#include <string.h>
// gcc -lcrypto setuid_shell.c -o setuid_shell
void sha256(char *string, char outputBuffer[65])
@c4mx
c4mx / test_href_schemes.html
Last active September 18, 2023 16:29
PortSwigger lab: Exploiting DOM clobbering to enable XSS
<html>
<head>
<script src='./domPurify-2.0.15.js'></script>
</head>
<body>
<style>
.text {
font-size: 16px;
font-weight: bold;
}