Click here to Skip to main content
15,886,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have done the same thing I have 1 application A that just prints a one liner each 7 seconds and another code that has a function with another print, injection.o. When I get to the step to open my object file injection.o and trying to map it in the memory I get several errors.

When I first do "call open("injection.o", 2)" it always return -1. I then did "call open("injection.o", "O_RDWR")". Then it returned a fd = 3.

When I then do mmap(1, 2504, 1|2|4, 1, 3, 0), 2504 is my objects file size, it again only returned -1.

I have no clue on what to do. Can anyone help me?

Br

Hung
Posted

1 solution

Don't post this under Quick Answers - if you got the code from an article - this one perhaps: Code Injection into Running Linux Application[^] - then there is a "new message" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900