Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I need to check vulnerability in my polling system. So I need to send GET requests but every time with different IPs. Can anyone suggest something?

share|improve this question
    
Have you considered invoking the poll functions programmatic? –  Dog eat cat world May 22 '12 at 22:16

5 Answers 5

up vote -2 down vote accepted

How are you sending your GET requests?

Regardless of how you do it you'll need to change your IP somehow. If it is a program it'd be easier to change proxies on the fly, but if not you could just switch proxies every time in your browser.

You could also disconnect/reconnect your internet if you had a dynamic IP obviously, but that'd just be a hassle.

OR, if you are doing internal testing it'd be quite easy as you'd just need to change your statically set LAN IP each time.

share|improve this answer
1  
There are ways (raw sockets) that don't involve that tedium and allow moving a lot of traffic from a lot of addresses. As long as the sourcing machine can see the replies, it can keep up the "ruse". Not a good answer to have been accepted. –  Jeff Ferland Feb 10 '12 at 15:11
    
It depends on how he is sending (and receiving) his request, but you are correct that he could use sockets, I thought I mentioned sockets when I mentioned if he was using a program, but I may have just thought it and not typed it. –  doyler Feb 10 '12 at 15:31
    
Disconnecting and reconnecting - even when IP addresses are assigned dynamically - may still result in the same IP address. –  chao-mu Jul 3 '12 at 13:10

Spoofing IP addresses over different subnets is not trivial as you have to establish a 3 way TCP handshake in order to make the HTTP connection.

If you have control of a machine on the same subnet you can probably make this work a lot easier. You simply script changing your IP, replay the HTTP request and repeat.

Other than that you could probably do one of the following:

  • Install Tor (Comes with portable Firefox, easy to set up)
  • Use public open proxy (Just google it)
  • Get someone to help you test from different IP's
share|improve this answer

Running as root with raw sockets will let you set whatever IP address you wish on your outgoing packets. Tools like hping3 include this functionality. You could write the binary GET request and feed it as an option to hping3, then specify the source address (or even --rand-source). That won't get you all the way, though.

Since we're talking about completing the full TCP connection, you'll need to take those lessons of raw sockets and write them into your own application (or find one that does this already). To be functional, your source machine's network card will need to be listening in promiscuous mode. You will also need to have your target's (the webserver) network route pumping all traffic directly to the network. The easiest way to to do that would be to make your source machine the default gateway.

Sockstress is one tool that sounds like it might fit the bill, but I'm not familiar with it.

share|improve this answer

Could you connect through Tor or a proxy?

share|improve this answer

IP addresses can't be spoofed with TCP unless you're in a position to intercept the return traffic.

But if you're using all IP addresses that are assigned to your computer, you can call bind() on the outbound socket using the desired outbound address before calling connect() to make the request.

If instead you're on a router or other network choke-point, then your best bet is probably intercepting and re-writing your own traffic using either a virtual interface or through something like libipq. That allows you to offload the real heavy-lifting to the kernel instead of having to re-write your own TCP implementation.

If this sounds confusing, then you may be in a bit over your head, and perhaps this isn't the direction you should go.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.