Skip to content

Instantly share code, notes, and snippets.

View procinger's full-sized avatar
👻

Adam Hukalowicz procinger

👻
View GitHub Profile
@procinger
procinger / Dockerfile.bad
Created November 10, 2022 15:49
Nginx Modsecurity Mem Leak
FROM alpine:3.16.2
ARG MODSECURITY_VERSION=v3.0.8
ARG NGINX_MODSECURITY_VERSION=1.0.2
ARG NGINX_VERSION=1.21.6
ARG OWASP_MODSECURITY_CRS_VERSION=v3.3.4
WORKDIR /build
RUN apk add \
@procinger
procinger / ping-test
Created October 6, 2022 08:32
GNU/Linux simple MTU Ping Test
ping 1.1.1.1 -c 1 -M do -s $((1500-28))
@procinger
procinger / shell.asm
Created October 22, 2018 18:22
GNU/Linux x86_64 shellcode
section .text
global _start
_start:
xor rax, rax
push rax
mov al, 0x3b
mov rbx, 68732f2f6e69622fH
push rbx
mov rdi, rsp
syscall
@procinger
procinger / shell_exec.c
Last active June 18, 2023 00:27
GNU/Linux x86_64 Hello World Shellcode
/*
* Shellcode executer
* gcc -fno-stack-protector -z execstack shell.c -o shell
*/
char shellcode[] = "\xeb\x20\x48\x31\xc0\x48\x31\xff\x48\x31\xf6\x48\x31\xd2\xb0\x01\x40\xb7\x01\x5e\xb2\x0c\x0f\x05\x48\x31\xc0\xb0\x3c\x40\xb7\x00\x0f\x05\xe8\xdb\xff\xff\xff\x48\x65\x6c\x6c\x6f\x20\x57\x6f\x72\x6c\x64\x21";
int main(int argc, char **argv)
{
int (*exeshell)();