GunshipPenguin / kiteshield

Packer/Protector for x86-64 ELF binaries on Linux
MIT License
131 stars 27 forks source link

the output elf run error(Segmentation fault ) #6

Closed k3mlol closed 2 years ago

k3mlol commented 2 years ago

Hi, the kiteshield is really cool, but I have issue to use it. could help me check it? the elf file I use to test

 wget https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz
tar xvf frp_0.44.0_linux_amd64.tar.gz
./kiteshield -n frp_0.44.0_linux_amd64/frpc frp_0.44.0_linux_amd64/frpc_ks
./frpc_ks
Segmentation fault (core dumped)

but I use the elf file which is smaller is ok. this version is ok https://github.com/fatedier/frp/releases/download/v0.15.1/frp_0.15.1_linux_amd64.tar.gz

GunshipPenguin commented 2 years ago

Hi there,

I'm unsure what the specific problem with frp is and unfortunately don't have time right now to dig into it.

My guess is that the newer version has some complicated assembly construct under the hood that kiteshield can't handle (e.g. a call instruction that points to the middle of a function). Unfortunately handling all such constructs is basically impossible. Kiteshield assumes the binary to pack has been produced by a "reasonable" compiler (e.g. one that only calls the beginning of functions, does not produce polymorphic code, etc.). You can re-run kiteshield in debug mode to hopefully see what specifically went wrong in the case you're interested in.