Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Which tools should I research into to intercept a plain text packet, edit it and then continue it on it's way. I am using Ubuntu 11.04 and Backtrack 5; my wifi is WPA2-person encrypted. I need to edit an item database of an ipod game :)

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

You don't want to intercept this in the air. It's very hard to do well. I suggest you change your network around a bit. You'll need a PC with two network interfaces and two routers to pull this off. Here's how I would do it:

Internet --> Router --> Ubuntu machine --(network port)--> Wifi router --> iPod

Ubuntu needs to "share" the Internet connection with the second router. This is actually dead simple with Network Manager: just create a new connection and in the IPv4 tab, set "Method" to "Shared to other computers". The second router should then get traffic from your PC and you should connect your iPod to the second router.

Now you just need to intercept and mangle the traffic. Let's deal the the mangle first. You want something like Hatkit. It's simple and for purpose. It won't handle tons of traffic but it'll get you going. Set it to run on 127.0.0.1:8080 (the default). There are other similar proxies out there including scripts you can hack into and customise.

And to intercept, you just need a simple iptables rule to redirect incoming traffic from the second router through your proxy (you need to replace the IP 10.42.43.2 with the one that Ubuntu has assigned your second router - most easily found out by looking at the admin pages on the second router):

sudo iptables -t nat -A PREROUTING -p tcp -s 10.42.43.2 \
  --destination-port 80 -j REDIRECT --to-ports 8080

Now when you request things on port 80 from the second router, all the requests should fly through Hatkit where you can alter them and the responses to your delight. Enjoy hacking your game :P


You can do this with a laptop: network cable in from the first router and use the onboard wireless as an access point. I didn't suggest this because ad-hoc networking in my experience is extremely flaky in Ubuntu.

I have two nics and more routers than I can shake a stick at, so the other way is just easier for me.

share|improve this answer
add comment

Im going to assume your both connected to the Same network either by wifi or Cable, I'd suggest ettercap, use the ARP poisoning man in the middle attack that will basically send all network traffic to you including wireless and then on to the intended recipient, in ettercap you can see actuall tcp stream on screen, it has many plugins and you can create your own, I reckon it's not to difficult to then right a rule to change a packets payload, however the stream it self may be encrypted and at that point you may be stuck as it will just look like nonsense, you say it's in plain text so I'm guessing you must of already sniffed the packets,

I used to use backtrack quite heavily a couple years ago to crack wifi and I know that ettercap is on there, I done some videos on YouTube showing how to use it for man in the middle attacks, the account is called bit-jacked or bitjacked I'd check but I'm on my phone they may help you with the first part.

share|improve this answer
add comment

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.