From 1c52069abd09d4086a362ed0b84492778954c401 Mon Sep 17 00:00:00 2001 From: Ringoshiro <137809157+Ringoshiroku@users.noreply.github.com> Date: Sat, 18 Oct 2025 21:45:26 +0700 Subject: [PATCH 1/2] changed CRLF --- Binary Exploitation/BeeChat/src/start.sh | 32 ++++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Binary Exploitation/BeeChat/src/start.sh b/Binary Exploitation/BeeChat/src/start.sh index cfbfac6..6ae5be0 100755 --- a/Binary Exploitation/BeeChat/src/start.sh +++ b/Binary Exploitation/BeeChat/src/start.sh @@ -1,16 +1,16 @@ -#!/usr/bin/env bash -set -euxo pipefail -cd "$(dirname "$0")" -export COMPOSE_PROJECT_NAME=beechat -if docker compose version >/dev/null 2>&1; then - DC="docker compose" -elif command -v docker-compose >/dev/null; then - DC="docker-compose" -else - echo "Docker Compose not found" >&2 - exit 127 -fi -$DC down -v --rmi all --remove-orphans || true -$DC pull || true -$DC build --pull -$DC up -d --force-recreate --renew-anon-volumes +#!/usr/bin/env bash +set -euxo pipefail +cd "$(dirname "$0")" +export COMPOSE_PROJECT_NAME=beechat +if docker compose version >/dev/null 2>&1; then + DC="docker compose" +elif command -v docker-compose >/dev/null; then + DC="docker-compose" +else + echo "Docker Compose not found" >&2 + exit 127 +fi +$DC down -v --rmi all --remove-orphans || true +$DC pull || true +$DC build --pull +$DC up -d --force-recreate --renew-anon-volumes From d53ecb2189ba443dcd40d23d0d7759f60bfa9ce0 Mon Sep 17 00:00:00 2001 From: Ringoshiro <137809157+Ringoshiroku@users.noreply.github.com> Date: Sat, 18 Oct 2025 21:48:53 +0700 Subject: [PATCH 2/2] changed CRLF for some more files --- Binary Exploitation/BeeChat/src/compile.sh | 34 +++++++++++----------- Binary Exploitation/BeeChat/src/extract.sh | 20 ++++++------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Binary Exploitation/BeeChat/src/compile.sh b/Binary Exploitation/BeeChat/src/compile.sh index 2fc1343..221664d 100755 --- a/Binary Exploitation/BeeChat/src/compile.sh +++ b/Binary Exploitation/BeeChat/src/compile.sh @@ -1,17 +1,17 @@ -#!/bin/bash - -# This script compiles chall.c with full security mitigations. - -GCC_FLAGS=( - "-fPIE" # Position-Independent Executable - "-pie" # Link as PIE - "-fstack-protector-all" # Enable stack canaries for all functions - "-Wl,-z,relro,-z,now" # Full RELRO - "-Wl,-z,noexecstack" # Non-executable stack -) - -gcc -o chall chall.c "${GCC_FLAGS[@]}" - -echo "[+] Compilation complete! Output file: chall_secure" -echo "[*] Note: The binary is linked against your system's default libc." -echo "[*] To link against glibc-2.27, run this script inside the Ubuntu 18.04 Docker container." +#!/bin/bash + +# This script compiles chall.c with full security mitigations. + +GCC_FLAGS=( + "-fPIE" # Position-Independent Executable + "-pie" # Link as PIE + "-fstack-protector-all" # Enable stack canaries for all functions + "-Wl,-z,relro,-z,now" # Full RELRO + "-Wl,-z,noexecstack" # Non-executable stack +) + +gcc -o chall chall.c "${GCC_FLAGS[@]}" + +echo "[+] Compilation complete! Output file: chall_secure" +echo "[*] Note: The binary is linked against your system's default libc." +echo "[*] To link against glibc-2.27, run this script inside the Ubuntu 18.04 Docker container." diff --git a/Binary Exploitation/BeeChat/src/extract.sh b/Binary Exploitation/BeeChat/src/extract.sh index b6789a7..1544c35 100755 --- a/Binary Exploitation/BeeChat/src/extract.sh +++ b/Binary Exploitation/BeeChat/src/extract.sh @@ -1,10 +1,10 @@ -docker system prune -docker build -t chall-builder . -docker create --name temp-container chall-builder -docker cp temp-container:/app/chall . -docker cp temp-container:/lib/x86_64-linux-gnu/libc-2.27.so . -docker cp temp-container:/lib/x86_64-linux-gnu/ld-2.27.so . -docker rm temp-container - -mv libc-2.27.so libc.so.6 -mv ld-2.27.so ld-linux-x86-64.so.2 +docker system prune +docker build -t chall-builder . +docker create --name temp-container chall-builder +docker cp temp-container:/app/chall . +docker cp temp-container:/lib/x86_64-linux-gnu/libc-2.27.so . +docker cp temp-container:/lib/x86_64-linux-gnu/ld-2.27.so . +docker rm temp-container + +mv libc-2.27.so libc.so.6 +mv ld-2.27.so ld-linux-x86-64.so.2