OK so in this example I've got a telnet script that I've written.
I'm an import price shock.
I'm going to capture traffic off the wire in real time on the soon to host on Ethan at zero.
I've got a loop once again looking for telnet traffic.
So is a telnet in the packet.
If it is look for user name in the string.
In other words look for user name and the output of the packet.
If you see user name print the user name.
If you see password then print the password.
Now telnet isn't as nice as the other protocols and that's because the username and password are sent
in individual packets so we're not going to see everything as clearly as we saw with the other scripts
but that's not going to stop us.
We will still be able to capture the username and password.
So again Kat telnet dot P..
There's our script let's run Python to capture the username and password.
What I'll do in this example is use a 1 2 2 to Telnet to the broader so there's a boon to one which
is our hacking server.
Here is a boon to Radha IP address is 1 9 2 1 6 8 122 82 so telnet 1 on 2 1 6 8 1 22 82.
Notice we suddenly see some output here.
So it's seeing something it's captured this thing called Password.
Put the password in and if you saw that notice.
See IFCO there's the Telnet password there's a prompt top enable password there is the enabled password
CISPA show run we can see the running config here now again telnet doesn't do this very nicely because
the data is all over the place so I've kind of tried to highlight here that you must look for password
after you see this line so let's change the the way the Cisco Rada works I'll say username David password
Cisco and rather than just using a standard password all say log in local so a username and password
are used when I Telnet to the right.
Okay so let me go to the end here.
Tell it to the writer.
Notice we see username so we told be careful use the name it is gonna be displayed now.
David there you can see the username David now gets copied twice because we seeing the traffic from
the P.C. to the broader.
And from the writer to The P.C. password Cisco you can see that yes Cisco is the password.
It was only sent once because we don't see the password in the output.
Top enable.
We can see that they these enable notice.
We are warned.
Another password is going to be displayed here.
So put the password in.
There's a positive Cisco.
So again telling it isn't as good as SPF or ATP or other protocols when it comes to capturing traffic.
It's a bit all over the place but you could save this to a file and then simply do a search for a keyword
like I've done here a bunch of lines and password and then you know that the password is just off to
that or you could do a search for the actual keyword password and see the passwords in the text just
after that.
So there's my positive Cisco notice as an example if we touch a run here we'll see the actual password
in the output here like this and if I scroll down I'll see the password over here.
OK so telnet isn't that great.
Not that easy to do it as cleanly as the other protocols but there's my basic python script and again
in this example I'm using Sublime Text nice idc.
There are many others out there that are very good.
You can see that the script looks a lot nicer in sublime text.
Here's my OSB a script it's only a few lines he has my FCP script he has my telnet script.
You could take these scripts and change them and make them a lot more powerful.
I just wanted to show you a little bit about what Python can be useful and inspire you to think about
the options available to download these scripts and see what you can do with them.
As always be careful hacking networks make sure that you have permission to hack those networks or to
grab usernames and passwords of those networks.