Wednesday, September 29, 2021

Reading Data Stored in RAM

 Reading Data On RAM 

Exploring Ram in RHEL8.4

First, open the terminal in RHEL and type python3 to get started.


Then create a var x = 5.

Then open another terminal and type

    ps -aux | grep python3





From the above, we will see the PID or Process ID of python ( The first one )

    ID = 4414

Now go to proc folder, using the following: 

    cd /proc/

Here use the ls command to see various folders available

then move the folder of python using PID as 

    cd /4414/

again use ls to see all available files and folders.

Now run "cat maps" command to find the RAM address of heap.



use xxd command to create hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form. 


use the command: cat maps | grep heap

Then, use sudo xxd -s 0x<id before hypen> -l $(( 0x<after hypen> - 0x <before hypen >)) mem | less

Now we will just scroll to see the data 



we have successfully searched data in RAM. 


 




No comments:

Post a Comment