Exploit
Entry point is second key after enumeration
Identification
Build C Script
Compile with Docker
Windows
Last updated
Entry point is second key after enumeration
Last updated
docker pull gcc:4.9
# 4.9: Pulling from library/gcc
# Digest: sha256:6356ef8b29cc3522527a85b6c58a28626744514bea87a10ff2bf67599a7474f5
# Status: Image is up to date for gcc:4.9
# docker.io/library/gcc:4.9
# copy the exploit.c in the current directory
docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp gcc:4.9 gcc -o exploit exploit.c
gcc code.c -o programname
#if need 32 bit
gcc -m32 -Wl,--hash-style=both exploit.c -o exploit
# if error when execute binary
./exploit: /lib/tls/libc.so.6: version `GLIBC_2.34' not found (required by ./exploit)
# compile with dockerdocker pull debian:10
mkdir ~/docker_shared
docker run --name debian10 -v ~/docker_shared:/media -it debian:10 /bin/bashapt update && apt install gcc-multilib build-essentialdocker stop/start debian10
docker exec -it debian10 /bin/bash#include <windows.h>
#pragma comment(lib, "ws2_32")# install migw32 first
sudo apt install gcc-mingw-w64# compile
i686-w64-mingw32-gcc code.c -o programname
# if need lib use -l
i686-w64-mingw32-gcc code.c -o programname -l<libname>
# example
i686-w64-mingw32-gcc code.c -o programname -lws2_32wine programname.exesudo apt install mono-runtime
# win 64
sudo apt install wine
# if need wine 32
dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32:i386