bolster

ssh-persist

Dec 8th, 2011
1,185
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.67 KB | None | 0 0
  1. #!/bin/bash
  2. usage()
  3. {
  4. cat << EOF
  5. usage: $0 options
  6.  
  7. This sets up a persistent reverse tunnel (shell) to another machine
  8.  
  9. OPTIONS:
  10.    -h      Show this message
  11.    -r      'remote' machine (default localhost)
  12.    -p      Port on remote (this) machine to be forwarded (default 22/ssh)
  13.    -l      'local' machine (the one you want to connect to here, from)
  14.    -q      Port on local (foreign) machine to be tunneled to the remote port (default 2222)
  15.    -u      Use an alternative user on 'local'
  16.    -v      Verbose
  17. EOF
  18. }
  19.  
  20. while getopts “hr:p:l:q:u:v” OPTION
  21. do
  22.      case $OPTION in
  23.          h)
  24.              usage
  25.              exit 1
  26.              ;;
  27.          r)
  28.              REMOTE=$OPTARG
  29.              ;;
  30.          p)
  31.              REMOTE_PORT=$OPTARG
  32.              ;;
  33.          l)
  34.              LOCAL=$OPTARG
  35.              ;;
  36.          q)
  37.              LOCAL_PORT=$OPTARG
  38.              ;;
  39.          u)
  40.              USER= $OPTARG
  41.              ;;
  42.          v)
  43.              VERBOSE=" -v "
  44.              ;;
  45.          ?)
  46.              usage
  47.              exit
  48.              ;;
  49.      esac
  50. done
  51.  
  52. #Set Defaults
  53. [[ -n $REMOTE ]] && REMOTE= $REMOTE || REMOTE="localhost"
  54. [[ -n $REMOTE_PORT ]] && REMOTE_PORT=$REMOTE_PORT || REMOTE_PORT="22"
  55. [[ -n $LOCAL_PORT ]] && LOCAL_PORT=$LOCAL_PORT || LOCAL_PORT="2222"
  56. [[ -n $USER ]] && USER=$USER || USER=`whoami`
  57.  
  58. trap "logger Tunnel to $LOCAL died permenantly; exit" SIGINT SIGTERM EXIT
  59.  
  60. while true;do
  61.     ssh $VERBOSE -NR $LOCAL_PORT:localhost:$REMOTE_PORT $LOCAL
  62.     logger "Tunnel to $LOCAL died (hopefully) temporarily, sleeping for 10 seconds, then trying again"
  63.     sleep 10
  64. done;
  65.  
  66. logger "Someone is trying to kill tunnel to $LOCAL!"
  67.  
  68.  
Advertisement
Comments
  • baris0210
    23 hours
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 38% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without any verification from Swapzone — instant swap).
Add Comment
Please, Sign In to add comment