Directory/path traversal attack is possible
Severity: Medium
Vulnerability description
Properly controlling access to web content
is crucial for running a secure web server. Directory traversal or Path
Traversal is an HTTP attack which allows attackers to access restricted
directories and execute commands outside of the web server’s root directory.
Impact
It may be possible to access arbitrary files
and directories stored on file system including application source code or configuration
and critical system files.
Attack simulation
check website through the dir buster tool and owasp zap tool forced browsing attack.
Recommendation
- Prefer working without user input when using file system calls
- Use indexes rather than actual portions of file names when templating
or using language files (i.e. Value 5 from the user submission =
Czechoslovakian, rather than expecting the user to return “Czechoslovakian”)
- Ensure the user cannot supply all parts of the path – surround it
with your path code
- Validate the user’s input by only accepting known good – do not sanitize
the data
- Use chrooted jails and code access policies to restrict where the
files can be obtained or saved to
Affected URLs/parameters
Comments
Post a Comment