You can:
1. Do a port redirection - dst-nat for ssh port to a server on a separate linux machine you have in your network for sniffing passwords (ex. a Raspberry Pi machine) for connections coming from an address list (and you just add the "suspicious" IP to the list - to be redirected to the fake server)
2. Sniff passwords from the linux machine (see
http://blog.vpetkov.net/2013/01/29/snif ... rver-side/ )
edit: I've just tested, it works for me!
Process 20987 attached - interrupt to quit
write(4, "\0\0\0\23\v", 5) = 5
write(4, "\0\0\0\16$ecreTP2$$w0rd", 18) = 18
write(3, "*\373\fAPK\365B\243\220\\\"7(\321\24\216J}g^\2411\3555\27n\352\377\23B\22"..., 64) = 64
write(4, "\0\0\0\26\v", 5) = 5
write(4, "\0\0\0\21An0ther$ecretP@ss", 21) = 21
write(3, "\231\315\3v\306\206\337\213\367\220\245\354\245\36x\317C\262O\37$Q\0218\330\230\364/\363\344\343\232"..., 64) = 64
write(4, "\0\0\0\22\v", 5) = 5
write(4, "\0\0\0\rM2ybeThi$0ne?", 17) = 17
write(3, "\214do\325\307\26~\240\372\260\261\346aK\323\237P\373,\322H\243.\17\177X\225\333\25MT\260"..., 64) = 64
write(8, "\0\0\0+\0\0\0\3\0\0\0#Connection closed by"..., 47) = 47
Process 20987 detached
So:
write(4, "\0\0\0\16
$ecreTP2$$w0rd", 18) = 18
write(4, "\0\0\0\21
An0ther$ecretP@ss", 21) = 21
write(4, "\0\0\0\r
M2ybeThi$0ne?", 17) = 17
It works!
All you need is:
1. On your MikroTik:
/ip firewall nat add chain=dstnat action=dst-nat protocol=tcp dst-port=22 src-address-list=sniff_ssh dst-address=<MikroTik'sIPAddress> to-addresses=<LinuxSnifferMachineIPAddress>
/ip firewall address-list add list=sniff_ssh address=<Attacker'sIPAddress>
2. On your Linux sniffer:
root@sniffer:~# while [ 1 ]; do newpid=`ps aux | grep ssh | grep net | awk {' print $2'}`; if [ -n "$newpid" ]; then strace -q -e write -p $newpid; fi; done
- And wait.
I'm sure it's worth at least 1 karma
.