Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

LIEF 0.10.1: 05_ELF_infect_plt-got Segmentation Fault #6

@d4em0n

Description

@d4em0n
➜  05_ELF_infect_plt-got git:(master) ls
arch  crackme.c  hook.c  hook_pltgot.py  Makefile  script.ld
➜  05_ELF_infect_plt-got git:(master) make
gcc crackme.c -O3 -o crackme.bin
chmod u+rx crackme.bin
gcc -Wl,-T script.ld -fno-stack-protector -nostdlib -nodefaultlibs -fPIC -Wl,-shared hook.c -o hook
In file included from hook.c:1:
arch/x86_64/syscall.c:24:13: warning: conflicting types for built-in function ‘_exit’; expected ‘void(int)’ [-Wbuiltin-declaration-mismatch]
   24 | static long _exit(int errcode) {
      |             ^~~~~
➜  05_ELF_infect_plt-got git:(master) ✗ ls
arch  crackme.bin  crackme.c  hook  hook.c  hook_pltgot.py  Makefile  script.ld
➜  05_ELF_infect_plt-got git:(master) ✗ make run
python ./hook_pltgot.py
chmod u+x ./crackme.hooked
./crackme.hooked XXXXXXXXXXXXXXXXXXXXX
make: *** [Makefile:16: run] Segmentation fault (core dumped)
➜  05_ELF_infect_plt-got git:(master) ✗ ./crackme.hooked
[1]    115659 segmentation fault (core dumped)  ./crackme.hooked
➜  05_ELF_infect_plt-got git:(master) ✗ python3 -m pip list | grep lief
lief                    0.10.1
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
➜  05_ELF_infect_plt-got git:(master) ✗ uname -a
Linux justpwn 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

crackme.hooked.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions