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

ping me in command execution page is not working #4

Closed
KajanM opened this issue Mar 17, 2018 · 5 comments
Closed

ping me in command execution page is not working #4

KajanM opened this issue Mar 17, 2018 · 5 comments

Comments

@KajanM
Copy link

KajanM commented Mar 17, 2018

environment => Windows 10, XAMPP (PHP 7)

initially
access denied

after starting ws-socket.php with administrator privilege
bad-value

After changing line 24 of CommandExecution.php to $reply_data = shell_exec('ping '.$msg);

everything is working fine.
ping-working

command injection is also working fine
success

@KajanM
Copy link
Author

KajanM commented Mar 18, 2018

also, it must be noted that when running docker image in kali linux no such problem is observed. Is it because of PHP version mismatch in XAMPP?

@kingthorin
Copy link

kingthorin commented Mar 18, 2018

-c is the Linux (*nix) count switch. The Windows equivalent is -n, number of echo requests to send.

When ping is run under Linux without specifying count then it just keeps running until cancelled.

@KajanM
Copy link
Author

KajanM commented Mar 18, 2018

ohh, thank you @kingthorin. So DVWS is built mainly for Linux environment right?

@KajanM KajanM closed this as completed Mar 18, 2018
@kingthorin
Copy link

kingthorin commented Mar 18, 2018

That seems to be an assumption that was made.

There must be a way to check platform in php and then use the appropriate switch...I would hope.

Edit: http://php.net/manual/en/function.php-uname.php

@interference-security
Copy link
Owner

Platform check has been implemented for ping command (01d36bd). Thanks @KajanM and @kingthorin

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