Gallopsled / pwntools

CTF framework and exploit development library
http://pwntools.com
Other
11.99k stars 1.7k forks source link

ELF.plt['unlink'] is not work for the provided binary #2473

Closed AWdong closed 1 week ago

AWdong commented 1 week ago

English is not my native language; please excuse typing errors.

When I was going to go to use elf.plt[‘unlink’] to complete the challenge, it had a problem.

[!] Could not populate PLT: Invalid argument (UC_ERR_ARG)

I tried to fix this problem in goole but I didn't find a valid solution.Here's my full error message.

屏幕截图 2024-09-28 143212

My environment is ubuntu 22.04 on wsl2. This below are some of my code snippets.

屏幕截图 2024-09-28 145638

Arusekk commented 1 week ago

What is your version of pwntools? (Try pwn version to see that.) What is your version of unicorn? (Also please make sure that the binary really has an entry for puts in its PLT.)

Please check if #2466 solves your issue, thanks.

AWdong commented 1 week ago

first, thank your answer. My pwntools version is v4.13.0 and my unicorn version is 2.1.1. In the meantime, I'm pretty sure I have the plt of puts in my elf file.

This is the plt content I output using the objdump command 屏幕截图 2024-09-28 160327

peace-maker commented 1 week ago

Please check if #2466 solves your issue, thanks.

Yes, that's the error that fixes

AWdong commented 1 week ago

so the problems is due to unicorn version(2.1.1) too high.just now, I solved this problem by using the following command successfully. pip install unicorn==2.0.1

Thanks for the answer, to solve this problem I even reinstalled again the ubuntu system in wsl2.

Arusekk commented 1 week ago

(We should release 4.13.1 soon.)