ldd /path/to/executable | grep libc.so.6 #Address (if ASLR, then this change every time)
```
If you want to check if the ASLR is changing the address of libc you can do:
```bash
for i in `seq 0 20`; do ldd <Ejecutable> | grep libc; done
```
### Get offset of system function
```bash
readelf -s /lib/i386-linux-gnu/libc.so.6 | grep system
```
### Get offset of "/bin/sh"
```bash
strings -a -t x /lib/i386-linux-gnu/libc.so.6 | grep /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.
![](../../.gitbook/assets/image%20%2899%29.png)
In this case it is loaded in **0xb75dc000** \(This will be the base address of libc\)