I am reading a book called "Hacking: The art of exploitation" and I came across this paragraph:
With execl(), the existing environment is used, but if you use execle(), the entire environment can be specified. If the environment array is just the shellcode as the first string (with a NULL pointer to terminate the list), the only environment variable will be the shellcode. This makes its address easy to calculate. In Linux, the address will be 0xbffffffa, minus the length of the shellcode in the environment, minus the length of the name of the executed program. Since this address will be exact, there is no need for a NOP sled.
What do they mean by specifying the environment?
What classifies different environments?
Why is the address of the environment variable calculated that way (or more specifically why is the base address 0xbffffffa)?
If I used the execl() function instead of the execle() could I not have used the shellcode environment variable?