Thursday, February 12, 2015

What's on the network?

Our goal here to see what is live on the network and how possibly vulnerable those machines are. Might be interesting to use with a wifi network.

First lets get the live systems at the moment. You will need to change your code depending on your network,
rm goodips
  ping -c 1 $1 > /dev/null
  [ $? -eq 0 ] && echo $i >> goodips

for i in 192.168.1.{1..255}
is_alive_ping $i & disown

Generated goodips file:

Then we can run a sort of network scanner.
m="not done"
while read line
do fdata[$a]=$line
echo $line
        let a=a+1
       for p in {1..1023};
       (echo >/dev/tcp/$line/$p) >/dev/null 2>&1 && echo "$p open"
done < $datafile

Then we can run the bash file to see what is open. (You could also save it to a file.)
23 open
53 open
80 open
22 open
80 open
110 open
111 open
143 open
443 open
993 open
995 open
21 open
80 open
139 open
515 open
22 open
25 open
80 open
139 open
445 open

No comments:

Post a Comment