Wireshark

From Bitpost wiki
Revision as of 17:21, 28 January 2018 by M (talk | contribs) (Created page with "=== Remote monitoring === It's not too hard to monitor another machine that may not have X on it. First you have to TEMPORARILY allow [ssh root] on the exposed server, DO NO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Remote monitoring

It's not too hard to monitor another machine that may not have X on it.

First you have to TEMPORARILY allow [ssh root] on the exposed server, DO NOT LEAVE THIS ON:

ssh bitpost
emacs /etc/ssh/sshd_config # add root to AllowUsers

Then on the monitoring box, set up a shared pipe, use ssh to route a tcpdump, and capture it in wireshark.

ssh viper
sudo su -
mkfifo /tmp/bitpost_443 # make a shared pipe
wireshark -k -i /tmp/bitpost_443
ssh bitpost "tcpdump -s 0 -U -n -w - -i eth0 not port 22" > /tmp/bitpost_443

FIX THE EXPOSED SERVER to disable [ssh root]:

ssh bitpost
emacs /etc/ssh/sshd_config # remove root from AllowUsers