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

  1. Prefer working without user input when using file system calls
  2. 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”)
  3. Ensure the user cannot supply all parts of the path – surround it with your path code
  4. Validate the user’s input by only accepting known good – do not sanitize the data
  5. Use chrooted jails and code access policies to restrict where the files can be obtained or saved to

Affected URLs/parameters

Comments

Popular posts from this blog

Set password by default when transfering data through xender hot spot network.

Browser cache weakness

Email Phishing