maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   dsniff/ettercap do not work without NAT iptables (https://talk.maemo.org/showthread.php?t=19035)

poxika 2008-04-12 18:05

dsniff/ettercap do not work without NAT iptables
 
Hi fellow security "experimenter".

I recently bought a n810 with the hope of using it for security testing. I have kismet, ettercap and dsniff installed and working. However, they cannot do anything (at least for dsniff and ettercap) until the kernel supports a way to reroute the traffic to these tools. It can be ipchains or iptables.
Iptables is available on os2008 but is missing the NAT tables.
I've seen multiple post on these forum saying that these tools were working, but I think that what was meant is that they could be launched but not really do anything useful.

Did I miss something ? is there an easy way to get the NAT tables modules for os2008 without recompiling a kernel ?

Thanks for any help.

JC

ajay2music 2009-01-08 20:04

Re: dsniff/ettercap do not work without NAT iptables
 
Hi JC,
Did u solve the NAT problem???If yes please gimme some pointers since even I'm stuck with this NAT problem..

winpisces 2009-01-20 21:00

Re: dsniff/ettercap do not work without NAT iptables
 
Any updates how get ipatables to work?

Matan 2009-01-20 21:18

Re: dsniff/ettercap do not work without NAT iptables
 
See here:

http://www.internettablettalk.com/fo...15&postcount=5

winpisces 2009-01-21 19:10

Re: dsniff/ettercap do not work without NAT iptables
 
I'm pretty new kernel. What should I do with the netfiler-diablo.tgz file?

Matan 2009-01-21 20:29

Re: dsniff/ettercap do not work without NAT iptables
 
Open xterm (or ssh into the device) make sure you have root privileges (sudo gainroot is an option), and run

tar -C /lib/ -xzf netfilter-diablo.tgz

Then insmod all the necessary modules, and iptables will work.

winpisces 2009-01-30 15:42

Re: dsniff/ettercap do not work without NAT iptables
 
After the tar part, what do I have to do with insmod?

Really, this is my first time to deal with it.

Matan 2009-01-30 16:58

Re: dsniff/ettercap do not work without NAT iptables
 
Run the commands:

insmod /lib/modules/2.6.21-omap1/net/netfilter/nf_conntrack.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/nf_conntrack_ipv4.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/nf_nat.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/iptable_nat.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/iptable_raw.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_REDIRECT.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_SAME.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_MASQUERADE.ko
insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_NETMAP.ko



Please note that this enables NAT, but I never tried any of kismet, ettercap or dsniff, so I don't know if that is enough to make them work.

winpisces 2009-02-03 15:36

Re: dsniff/ettercap do not work without NAT iptables
 
already tried insmod but still no success to run the following command:

iptables -t nat -I POSTROUTING -o bnep0 -j MASQUERADE

iptables: No chain/target/mach by that name

any ideal?

Matan 2009-02-03 16:27

Re: dsniff/ettercap do not work without NAT iptables
 
Are you sure the module iptables_nat is inserted properly (check with lsmod)?

What is the result of

iptables -t nat -L

winpisces 2009-02-03 20:23

Re: dsniff/ettercap do not work without NAT iptables
 
The result of iptables -t nat -L is:

Chain PREROUTING (policy ACCEPT)
target prot opt source destination

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Matan 2009-02-03 20:29

Re: dsniff/ettercap do not work without NAT iptables
 
Then the nat table and the POSTROUTING chain exist. The problem has to be with the MASQUERADE target. Is the ipt_MASQUERADE module inserted? What is the output of lsmod?

winpisces 2009-02-04 14:11

Re: dsniff/ettercap do not work without NAT iptables
 
Hmm... When I type in
iptables -t MASQUERADE -L

I got the following:
iptables v1.3.6: can't inintalize iptables table 'MASUERADE': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

And when I try to rerun the command:

insmod /lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_MASQUERADE.ko

I got the following:

insmod: cannot insert '/lib/modules/2.6.21-omap1/net/ipv4/netfilter/ipt_MASQUERADE.ko': File exists (-1): File exists

Any ideal???

Matan 2009-02-04 14:20

Re: dsniff/ettercap do not work without NAT iptables
 
MASQUERADE is a target, not a table, so the command you ran should fail.

Please run the command

iptables -t nat -I POSTROUTING -j MASQUERADE

and report the result.


PLEASE, please also include the output from lsmod.

winpisces 2009-02-04 14:42

Re: dsniff/ettercap do not work without NAT iptables
 
I ran the command

iptables -t nat -I POSTROUTING -j MASQUERADE

and the result is:
iptables v1.3.6: no command specified
Try 'iptables -h' ro iptables --helo' for more information

Matan 2009-02-04 14:50

Re: dsniff/ettercap do not work without NAT iptables
 
The I is a capital i, not a small L.

winpisces 2009-02-05 19:59

Re: dsniff/ettercap do not work without NAT iptables
 
When I type in:
iptables -t nat -I POSTROUTING -j MASQUERADE

there aren't any output. Just show a new prompt.

any ideal?

Matan 2009-02-05 20:10

Re: dsniff/ettercap do not work without NAT iptables
 
This means that the command is accepted without errors. This is the unix way - no unnecessary output.

Now try the same successful command with additional -o bnep0 and see if it works.


All times are GMT. The time now is 01:15.

vBulletin® Version 3.8.8