0

I can examine a payload using libemu (sctest) and ndisasm, like this :

msfvenom -p linux/x86/shell_bind_tcp -f raw | ./sctest -vvv -Ss 1000

msfvenom -p linux/x86/shell_bind_tcp -f raw | ndisasm -u -

And I'd also like to debug the payload with gdb.

So I create an elf executable :

msfvenom -p linux/x86/shell_bind_tcp -a x86 --platform linux -f elf > payloadexec

But running the payloadexec leads to permission denied.

./payloadexec
bash: ./payloadexec: Permission denied
5
  • 2
    Did you set the executable bit?
    – user163495
    Oct 9, 2019 at 13:43
  • Strange, if I move the file to another folder it works. And it even works if I move it back to original folder.
    – trogne
    Oct 9, 2019 at 13:52
  • @MechMK1 You are right ! Moving to another folder sets the missing exec bit ! I didn't know that permission could change when moving files.
    – trogne
    Oct 9, 2019 at 13:55
  • If you type chmod +x payloadexec you will make the file executable.
    – game0ver
    Oct 9, 2019 at 14:13
  • 2
    Moving a file isn't supposed to set the exe bit. Maybe the original location was mounted with "noexec" option...
    – binarym
    Oct 9, 2019 at 15:30

0

You must log in to answer this question.

Browse other questions tagged .