Forum Thread: IP Subnet

I'm using metasploit to perform a ssh login scan on a range of ips from 192.168.24.00 and up and I don't know how to write it. For example, I'm trying to scan 192.168.24.01, 192.168.24.02, 192.168.24.03, all the way up to 192.168.24.99. This isn't the actual ip btw, just a made up one. Can someone help please?

2 Responses

By what i remember from nmap, it should be 192.168.24.1/24 . Correct me if i'm wrong, or tells if it works.

Jesus

Hi
You have to know the netmask of the network you want so scan.
I recommend you to fresh up your knowledge of IP and Subnetting.

So you have your IP Address:
Address: 192.168.24.1
In binary that is:
11000000.10101000.00000000.00000001

The netmask defines the host and network part of your address.

As you can see with this netmask the first 24 bits are used --> network part. The remaining bits are free for your host adresses, in this case 254.

Netmask: 255.255.255.0 = /24
11111111.11111111.11111111.00000000

To answer your question:
Find out what netmask is used and write it either way full like this 255.255.255.0 or the shot form like that /24.

Examples:
255.255.255.128 = 25
11111111.11111111.11111111.10000000
--> 126 free hosts

255.255.255.252 = 30
11111111.11111111.11111111.11111100
--> 3 free hosts

http://jodies.de/ipcalc

Hope you try to learn a little bit more abuot the topic instead of just typing in everything and hoping it workes.

Share Your Thoughts

  • Hot
  • Active