During vulnerability assessment and penetration testing, we usually focus on operating system-level vulnerabilities and ultimately ignore Layer 7. This is a very dangerous trap because there are many attacks on remote logon and SSH Linux systems. In fact, in my opinion, most Linux-based defects are at the application layer. It may be Apache, PHP, or OpenSSL, or it is only a common error configuration. If the vulnerability can be accessed through HTTP, it is more dangerous.
Common Vulnerabilities include SQL attacks and cross-site scripting. For Linux Web security, there are more vulnerabilities. The following lists other Web security vulnerabilities that I often see on Linux-based systems for your reference to reduce Web-related risks:
PHP code intrusion allows direct execution of malicious code. I have seen that the server-side scripting engine accepts unfiltered PHP input and runs on the server to provide system-level server access.
Use the user name and password for http get requests instead of POST requests. This disadvantage can cause Web applications and operating system-level privileged extensions.
Weak passwords and lack of intruders. I have found that using automatic password cracking, such as Brutus and old logons guesses, is usually easy to obtain unauthorized access to websites or applications when weak logon occurs.
Weak file and directory permissions allow the system to list objects. I often find that backups or test files contain old and unmaintained Code and provide information that not everyone needs to see.