Wednesday, April 23, 2008

Generate Wordlist

Ever needed to generate a wordlist? For example... You can hear and see the general keys someone types in; so you have an idea of length and possible characters. This greatly lowers the number of possibilities when trying to brute force. I got this script off of freshmeat.net but posted here for the combo usage with perl. There is also another method via John The Ripper that I will post up at some point.


wg.pl


http://digilander.libero.it/reda/downloads/perl/wg.pl

Well, blogger wont let me put up the code (go figure). It errors when I try to post. If you know how to make it work, I would greatly appreciate it. For now, that is the direct link to the code. I will keep a copy of it just in case it disappears. Maybe I will put it into an image or something (eggh, I know) but at least we will still have it.






Using this Perl script, we can now create our brute-force word-list. :)

perl ./wg.pl -l 8 -u 10 -v abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX YZ0123456789\`\~\!\@\#\$\%\^\&\*\(\)\-\_\+\=\[\]\;\'\,\.\/\<\>\?\:\"\{\}\|\ > pass1.txt

This will make a list 8-10 characters long.

All the / characters are there because of errors from not escaping bash command characters.

My suggestion is to run this multiple times. First to make a list of all 8 character passwords, then again with 9, then again with 10, etc. etc. That way you can load up only the needed number and it will take WAY less time. You can replace the abcdefg...ABCD...1234... with only the characters needed too (from above when you had an idea of what keys were hit).

The next thing I would do is to grep out known character combos. So if you know they hit a 'r' and then a 'b', run 'grep rb pass.txt > pass2.txt Hopefully this will greatly narrow down your list (depending on how many keys you know they hit in order) and in effect narrow down your brute force time.

Enjoy!

Friday, April 11, 2008

Tunnel - SSH - Firefox

Creating a tunnel for Firefox via SSH is VERY easy. :)
Just use this command:

ssh -fND4321 aa.bb.cc.dd

That will put the ssh connection into the background and you will configure firefox to connect through port 4321.

Thursday, April 10, 2008

Tunnel - SSH - Remote Desktop

Now for a linux box. :) Linux is actually a lot easier to setup and I don't even need any screen shots! :)

First I will show you the commands. Then what it means.

  1. ssh -fNL 1234:10.0.0.1:3389 aa.bb.cc.dd
  2. rdesktop localhost:1234

Thats it! Linux is great!! ha :)

I will let you read the man page on the f,N,&L but I will explain the rest. In step one we put 1234:10.0.0.1:3389. 1234 is the local port that you will point the rdesktop command to. 10.0.0.1 is the remote machine you want to pull up. 3389 is the remote port to connect to.

Then, rdesktop is the program to open up remote desktop. Remember to point localhost to the local port 1234 (localhost:1234).

Tunnel - Putty - Remote Desktop

Ever found yourself away from home and not sure if the connection back to work (or even any offsite location) is safe? Here is how to use Putty to make a secure Remote Desktop connection over SSH back to your safe network. It is quite simple actually. After it is setup for the first time, just load it up and away you go. :)

Ok. First thing first; you will need Putty. Go to www.google.com and search/download ''Putty''. You don't even need to install it as it can run straight from your desktop. I suggest putting it in your program files directory just to keep things uniform.

  • Now, go ahead and open it up.
  1. Put in the IP or Host Name of your SSH server.
  2. Leave it at 22 or change it to whatever port you run your SSH server on.
  3. Verify that SSH is selected.
  4. Give it a Saved Session name.


5. On the left side, expand SSH.
6. Click on Tunnels to see your options for types of tunnels.
7. Enter the ''Source port'' of 1234
8. Enter ''Destination'' of the machine your wanting to Remote Desktop to WITH the port number.
9. Make sure ''Local'' and ''Auto'' are selected.
10. PRESS ADD



11. Now go back to the category ''Session'' on the top left.
12. Click SAVE
13. Then Open
14. Log into your SSH server and do some thing useful. ;)
15. Now, open up ''Remote Desktop Connection''.
16. Type in ''localhost:1234''
17. That should make the connection and you should be able to log in.