A Note On Config Files
Configuration files contain configurations for various processes and programs running on the Linux system. They are generally stored under /etc. Configuration files can hold all sorts of information for programs running which makes it an extremely broad topic to discuss in terms of privilege escalation. The main idea is, if you have write access to a file, try to find some way to abuse it so it runs commands as an elevated user. To identify configuration files that we have write access to, you can run this command:
find / -perm -o+w -type f 2>/dev/null | grep -v '/sys\|proc'
After running the command above, you will want to focus your attention on files located in /etc . There are hundreds of possibilities for abusing misconfigured configuration files. You will have to get creative here since there is not only one path to elevating your privileges. Your best friend will be Google.