Ret2Lib
If you have found a vulnerable binary and you think that you can exploit it using Ret2Lib here you can find some basic steps that you can follow.
If you are inside the host
You can find the address of libc
If you want to check if the ASLR is changing the address of libc you can do:
Get offset of system function
Get offset of "/bin/sh"
/proc/<PID>/maps
If the process is creating children every time you talk with it (network server) try to read that file (probably you will need to be root).
Here you can find exactly where is the libc loaded inside the process and where is going to be loaded for every children of the process.

In this case it is loaded in 0xb75dc000 (This will be the base address of libc)
Using dgp-peda
Get address of system function, of exit function and of the string "/bin/sh" using gdb-peda:
Bypassing ASLR
You can try to bruteforce the abse address of libc.
Code
Last updated