akde/infosec

Information security is ultimately about managing risk


Cross-compiling for 32/64 bit systems

  • sudo apt-get install gcc-multlib
  • gcc ‑m32 datei.c

Tipp: Add ‑sta­t­ic for a sta­t­ic binary.

Note that you need to install pack­ets for the tar­get plat­form, e.g. apt install gcc-i686-linux-gnu.

Cross-compiling for Windows

Install the pack­ages like apt install gcc-mingw-w64. Then use x86_64-w64-mingw32-gcc execute.c -o execute.exe.

Disable security features

You can use checksec.sh to see which secu­ri­ty tech­niques are enabled in a executable.

Pro­tec­tiongcc para­me­ter to disable
PIE-no-pie
Stack canary-fno-stack-pro­tec­tor

Leave a Reply

About

Personal collection of some infosec stuff. Primary purpose of this site is to collect and organize for myself.

Note: Some content is not publicly visible due to copyright issues. Therefore, some links could be broken.

Checklists

Categories

Checklists: Ports

python -c 'import pty;pty.spawn("/bin/bash")';

python3 -c 'import pty;pty.spawn("/bin/bash")';