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

Fix reverse shell DOES NOT WORK #72

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

shelld3v
Copy link
Contributor

@shelld3v shelld3v commented Oct 27, 2020

Currently, the reverse shell option does not work in my test. It still can receive the connection but Tplmap only sends the first character of the command that I entered. So I fixed it

@shelld3v
Copy link
Contributor Author

shelld3v commented Oct 27, 2020

@shelld3v
Copy link
Contributor Author

Hi, I have tested this locally, any update? Or any problem?

@shelld3v shelld3v changed the title Multiple bug fixes Fix reverse shell DOES NOT WORK Oct 29, 2020
@epinna
Copy link
Owner

epinna commented Oct 29, 2020

Many thanks for your contributions.

Unfortunately I don't have time to thoroughly review and adjust PRs, but you can help by running the tests before submitting new PRs. It requires Docker and can be run launching ./tests/tests.sh or running the single test scripts with./tests/run_*_tests.sh. Feel free to adapt the test if you changed some minor functionality.

Thanks

@shelld3v
Copy link
Contributor Author

Hi, I have already tested this in my machine. I didn't test with a vulnerable server, but tested by running the code in tcpserver.py (replace log.info with print)

@epinna
Copy link
Owner

epinna commented Oct 29, 2020

Still it shouldn't break the test suite (I quickly run it and it does).

@shelld3v
Copy link
Contributor Author

The code didn't work as intended? What was happening?

@epinna
Copy link
Owner

epinna commented Dec 3, 2020

Sorry for the late response, I currently don't have time to work on this. I'm happy to merge your PRs, but please make sure the tests passes (please follow the instructions above). Feel free to adjust the test suite if needed.

@shelld3v
Copy link
Contributor Author

shelld3v commented Dec 3, 2020

Hi, I can't:

$ sudo ./tests.sh

## Running ./run_channel_test.sh
Exposed testing APIs:

http://localhost:15001/reflect/mako?inj=*
http://localhost:15001/reflect/jinja2?inj=*
http://localhost:15001/post/mako?inj=*
http://localhost:15001/post/jinja2?inj=*
http://localhost:15001/limit/mako?inj=*
http://localhost:15001/limit/jinja2?inj=*
http://localhost:15001/put/mako?inj=*
http://localhost:15001/put/jinja2?inj=*

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

@epinna
Copy link
Owner

epinna commented Dec 3, 2020

You need to install Docker, it virtualizes any application with the vulnerable template engine and test tplmap against it. It's also pretty cool as development infrastructure to develop new SSTI techniques.

@shelld3v
Copy link
Contributor Author

shelld3v commented Dec 4, 2020

Idk, but I am unable to test this. I installed Docker with sudo apt install docker.io, but is failed =(

@epinna
Copy link
Owner

epinna commented Dec 4, 2020

Take your time to run Docker in your machine. I'm more than happy to work with you and merge your changes as long as they don't break the test suite.

@shelld3v
Copy link
Contributor Author

Hi, the fact that I can't install Docker into my Linux subsystem for Windows. Can you test this?

@epinna
Copy link
Owner

epinna commented Dec 11, 2020

I'm sorry but I've no time for adjusting the test suite for the PRs. Consider using a Linux VM for development.

@shelld3v
Copy link
Contributor Author

Hi @epinna, can you use Github Actions for this? So we can automatically test every PRs and no one has to do it!

@shelld3v
Copy link
Contributor Author

I tested:

Ran 13 tests in 45.899s

OK
tplmap-java

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

Successfully merging this pull request may close these issues.

2 participants