PF Utility to spew out lots of IP addresses?

I need to work on fine tuning my pf.conf. I like to do such experimenting by setting up a test machine to get the pf rules right, before going live on my bare metal server. The test machine would be FreeBSD guest running in a Virtualbox VM on a Windows host. I've worked with test machines like this quite a bit.

One of the things I want to do is imitate what the evil doers are doing. It is pretty obvious that they are using port scanners to probe my system for open ports and then hammering away on those for hours on end. The tougher part is that they are also using multiple IP addresses to do this, presumably by shepherding large botnets to do their bidding.

It looks like a bad guy who is using one IP address and something like nmap to find the open ports, then feeds my IP address and the ports-to-be-hammered into the botnets which follow orders. I have endless logs showing this activity. I may not really understand how this is being done but the logs make it look like this.

In order to imitate these bad guys I need some way to probe my test machine from a range of IP addresses originating from my FreeBSD server box. The IP addresses do not need to be public; I was thinking that a range like 10.0.1.0/16 would likely be plenty. The actual ports being probed don't matter.

Does a utility like this exist? Can it be imitated using a sh or perl script? It would be nice if the time between IP address hits could be configured from milliseconds up. And also that some of the IP addresses repeat at semi-random times during the run. I think using ping to hit the ports would be good enough though perhaps a way to send a SYN would be good as well.

Or perhaps I am thinking about this all wrong in which case I'd appreciate any guidance the hive would care to offer.

TIA.
 
It looks like a bad guy who is using one IP address and something like nmap to find the open ports, then feeds my IP address and the ports-to-be-hammered into the botnets which follow orders. I have endless logs showing this activity. I may not really understand how this is being done but the logs make it look like this.
Bots generally don't port scan. They just connect to random IP addresses and fire off their exploits at known vulnerable services. Bots are typically controlled from some sort of command & control structure forming a "botnet", i.e. a network of bots. They are usually previously exploited services that are turned into new bots to be added to their network.
 
tcpreplay could be your friend, together with its utilities. You could just capture real crap botnetshitty traffic and edit/replay them?

side note, 10.0.1.0/16 is not a valid range, 10.0.0.0/16 is, (the actual RFC 1918 range is 10.0.0.0/8)
 
tcpreplay could be your friend, together with its utilities. You could just capture real crap botnetshitty traffic and edit/replay them?

side note, 10.0.1.0/16 is not a valid range, 10.0.0.0/16 is, (the actual RFC 1918 range is 10.0.0.0/8)
Right, sorry. Was late at night for me when I wrote / posted this.
 
Thank you all for the suggestions and explanations so far.

While falling asleep last night I got to thinking that perhaps nmap will be my best friend in this exploration though I intend to look at the other suggestions as well. I spent a few hours reading about and studying how nmap works.

I got to wondering if cloning the lo0 interface -> lo1, then adding as aliases a whole bunch of 10.0.0.0/16 addresses to it, then using nmap as the prober and feeding it the lo1 interface's abundant IP addresses might work? I'll experiment with that after a bit. But it would reduce my request to a way to generate all the 10.0.0.0/16 IP addresses automatically rather than by hand.
 
You may try with Cisco Trex
This looks interesting and I may play around with it some. Way over my head. From what I read this could be used to do DoS attacks (extremely high packet rates (30 million / sec / CPU core).)

Wow.
 
This looks interesting and I may play around with it some. Way over my head. From what I read this could be used to do DoS attacks (extremely high packet rates (30 million / sec / CPU core).)

Wow.
No, it can't be used as DDoS as the routes will be adv from a single AS and it's easy to be blocked at the routing level.
 
You can write shell script to send TCP SYN packets | ICMP from spoofed random IP addresses using hping3 and run in parallel many scripts to emulate actions of a bad guy.
 
Back
Top