LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   File Permission - Read an execute only file (https://www.linuxquestions.org/questions/linux-security-4/file-permission-read-an-execute-only-file-776035/)

e_x_p 12-16-2009 05:02 AM

File Permission - Read an execute only file
 
Hi,

Suppose I have a binary program with only execute permission enabled for the current user. How (in general) would I be able to obtain a core dump of the file? I think I have read it somewhere but I want to know if there are more ways of doing it.

Thanks!

kubaPL 12-16-2009 07:08 AM

first i need to determine what you mean by coredump.

when i hear coredump i think of this. if this is what you mean then you only get one if your program crashes. also you need to set a userlimit to tell the kernel how big of a coredump you want.

normally you would do something like
ulimit -c unlimited
this sets the size limit for your cores to, you guessed it, unlimited.

after running this line, when your program crashes will have a file called, most likely, core.<PID>.

if you want to get a copy of the binary data within the file then i doubt you can do that unless you have some tool that goes around the filesystem. another way might be, running the application then trying to read the contents of the ram into which the application was loaded. if you don't have root access but do have access to the physical machine (and you can turn it off without consequence) then you can try running a livecd on the machine and using the root of that to read the file contents.

if you are thinking of some other coredump, please explain exactly what you mean.


All times are GMT -5. The time now is 12:06 AM.