Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local File Disclosure using fileviewer functionality #112

Closed
AbhiKafle123 opened this issue Jun 27, 2018 · 2 comments
Closed

Local File Disclosure using fileviewer functionality #112

AbhiKafle123 opened this issue Jun 27, 2018 · 2 comments

Comments

@AbhiKafle123
Copy link

AbhiKafle123 commented Jun 27, 2018

Line 129 in index.php lets anyone view all the local files the web-server has access to.

        case 'fileviewer':
            $file = get('file');

Example exploit
example.com/webgrind/index.php?op=fileviewer&file=/etc/passwd

Can we avoid relying on user input to get 'file'?

@SilverioMiranda
Copy link

This is not the purpose of this project, it should only be run locally in the test environment only, NEVER in a publicly accessible environment.
That is why no measures are necessary to prevent this kind of situation

@alpha0010
Copy link
Collaborator

Correct, this is intended behaviour. Additionally, your production environment should not even have xdebug installed.

(Of note, you will only be able to view files the server can read. /etc/passwd is not that problematic, as the password hashes are actually in /etc/shadow. If apache can read that, you have other problems. Still, someone could access /path/to/site/db-config.php for some handy plain text passwords.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants