I ran a telnet session using default password to a network switch, captured the PCAP file. However i am not sure what should i use to search for using the "content" keyword in my snort rule ? Reason being, i had to do a "Follow TCP Stream" in Wireshark to be able to see the password in clear text in wireshark.
alert tcp $HOME_NET any -> $HOME_NET 23 (msg:" TELNET:Default password login attempt"; flow:to_server,established; content:""; fast_pattern:only; classtype:default-login-attempt; sid:10000007; rev:1;)
Thanks in advance
The "content" will be the telnet prompt back to you. You will see this in the "follow tcp stream" view. If you had a banner, you could look for that as well. Here are some of the older rules from the ET rule set (in telnet.rules). Best bet is to get the Emerging rules (even though Telnet Emerged in 1977, I think...)
https://rules.emergingthreats.net/open/suricata-4.0/
#alert tcp $HOME_NET 23 -> $EXTERNAL_NET any (msg:"ET TELNET External Telnet Attempt To Cisco Device With No Telnet Password Set (Automatically Dissalowed Until Password Set)"; flow:from_server; content:"Password required, but
none set"; depth:31; reference:url,doc.emergingthreats.net/bin/view/Main/2008860; classtype:attempted-admin; sid
:2008860; rev:4; metadata:created_at 2010_07_30, updated_at 2010_07_30;)
#alert tcp $HOME_NET 23 -> $EXTERNAL_NET any (msg:"ET TELNET External Telnet Login Prompt from Cisco Device"; flow:from_server,established; pcre:"/^(\r\n)*/"; content:"User Access Verification"; within:24; reference:url,doc.emergingthreats.net/bin/view/Main/2008861; classtype:attempted-admin; sid:2008861; rev:6; metadata:created_at 2010_
07_30, updated_at 2010_07_30;)
#alert tcp $HOME_NET 23 -> $EXTERNAL_NET any (msg:"GPL TELNET Bad Login"; flow:from_server,established; content:" Login incorrect"; nocase; fast_pattern:only; classtype:bad-unknown; sid:2101251; rev:9; metadata:created_at 2010_
09_23, updated_at 2010_09_23;)
#alert tcp $TELNET_SERVERS 23 -> $EXTERNAL_NET any (msg:"GPL TELNET TELNET access"; flow:from_server,established;
content:"|FF FD|"; rawbytes; content:"|FF FD|"; distance:0; rawbytes; content:"|FF FD|"; distance:0; rawbytes; reference:arachnids,08; reference:cve,1999-0619; reference:nessus,10280; classtype:not-suspicious; sid:2100716; rev:14; metadata:created_at 2010_09_23, updated_at 2010_09_23;)