Hacking Computer Passwords

Ask questions about projects relating to: computer science or pure mathematics (such as probability, statistics, geometry, etc...).

Moderators: kgudger, bfinio, Moderators

Locked
tzlangstaff
Posts: 2
Joined: Mon Dec 01, 2014 8:58 pm
Occupation: Student
Project Question: How easy is it to hack a computer password?
Project Due Date: January 31, 2015
Project Status: I am conducting my experiment

Hacking Computer Passwords

Post by tzlangstaff »

I am doing the project, "Password Security: How Easily Can Your Password Be Hacked?" and I need some help. I believe I am supposed to make some changes to the program, but the procedure does not tell me what changes to make and without changes, the program just runs in circles. Anyone who has done this project and can help? Thanks so much.
bfinio
Expert
Posts: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Hacking Computer Passwords

Post by bfinio »

Hi tzlangstaff,

This is a computer programming challenge that does not "give away" what changes you should make to the program. Rather, it is up to you to see if you can think of ways to modify the code to make it better at guessing passwords, or come up with your own methods. The "Procedure" tab of the project explains several methods that the Science Buddies program uses to guess passwords:

1. Going through a "number dial" (000, 001, 002...all the way up to 999)
2. The same thing as #1, but including letters in addition to numbers
3. Guessing based on a list of real-world most-popular passwords
4. Guessing combinations of 2 words with a special character in between (for example Harry+Ginny)

However, there are many more ways you could come up with (and try to guess) a password. For example, passwords are case-sensitive. What about different possible combinations of upper and lower-case letters or words? What about combinations of three words instead of two? As the procedure explains, you can put your own test password in "password0" in the program, and try out your own algorithms to see if they can find it.
tzlangstaff
Posts: 2
Joined: Mon Dec 01, 2014 8:58 pm
Occupation: Student
Project Question: How easy is it to hack a computer password?
Project Due Date: January 31, 2015
Project Status: I am conducting my experiment

Re: Hacking Computer Passwords

Post by tzlangstaff »

Thank you, very helpful! I understand better now that the project is more dependent on the changes I make to the program, the only problem is, any change results in a black screen flashing on my computer for a millisecond. Even when I try to set password0 to anything, it''l just flash the black screen up for a blink. I've tried to open the file many times in a row to try to read what the black screen says, and I believe I'm reading "name error." This happens with any alterations I make to the program, except I can only read the words when I try to set password0. Any suggestions?
bfinio
Expert
Posts: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Hacking Computer Passwords

Post by bfinio »

Hi tzlangstaff,

That's a tough one to try and help troubleshoot over the internet. So, when you download the original Science Buddies program and run it as-is, it works fine? But if you make ANY change you get this weird black screen? How about if you try adding some trivial line of code (like a "print" command) to the program, instead of making changes to the password part? Does that also mess things up?

Do you have an adult with programming experience who could help take a look at your program in person?

-Ben
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Hacking Computer Passwords

Post by HowardE »

tzlangstaff-

The problem you're having is that you need to either run the Python interpreter from a command prompt or using Python's IDLE environment. We suggest you use IDLE. Find the command prompt in Windows (it sounds like you're using Windows but you can do this in Terminal on a Mac) and type in IDLE3 or IDLE, whichever works. You will see a new window come up. It should say you're running come version of Python 3. If not, you'll need to find the latest version of Python and install that.

Once you have IDLE running, load in the source code for the project and select Run from the menu. You'll see the program run without closing the window before you can read the text. The companion file, passwords.txt, needs to be downloaded and in the same folder as the crack2.py file in order for the program to run.
snappyo10
Posts: 3
Joined: Thu Dec 11, 2014 4:28 pm
Occupation: Student:9th grade
Project Question: How easily can you hack a password?
Project Due Date: January 12, 2015
Project Status: I am conducting my experiment

Re: Hacking Computer Passwords

Post by snappyo10 »

On the science buddies website for "How easily can you hack a password?" it doesnt let me download the password.txt file to put in the directory with the other program to test the sample program
bfinio
Expert
Posts: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Hacking Computer Passwords

Post by bfinio »

snappyo10 - I just checked and had no trouble downloading the file using Firefox by right-clicking and selecting "Save Link As". You can also just use this link:

https://www.sciencebuddies.org/Files/54 ... swords.txt

and copy and paste the text into a .txt file on your computer.
snappyo10
Posts: 3
Joined: Thu Dec 11, 2014 4:28 pm
Occupation: Student:9th grade
Project Question: How easily can you hack a password?
Project Due Date: January 12, 2015
Project Status: I am conducting my experiment

Re: Hacking Computer Passwords

Post by snappyo10 »

oh thank you anyway i figured it out but whenever i use the test program to guess a list of passwords i have put in the directory. i have to quick time a screenshot because it closes the program out as soon as it completes cracking the password. is that supposed to happen, i have not modified the program in any way
snappyo10
Posts: 3
Joined: Thu Dec 11, 2014 4:28 pm
Occupation: Student:9th grade
Project Question: How easily can you hack a password?
Project Due Date: January 12, 2015
Project Status: I am conducting my experiment

Re: Hacking Computer Passwords

Post by snappyo10 »

oh thank you anyway i figured it out but whenever i use the test program to guess a list of passwords i have put in the directory. i have to quick time a screenshot because it closes the program out as soon as it completes cracking the password. is that supposed to happen, i have not modified the program in any way
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Hacking Computer Passwords

Post by HowardE »

When you installed Python3 it should have also installed IDLE or IDLE3. That's the Python development environment, or IDE and it will keep the messages visible and allow you plenty of time to read the output.

If you have to run from a command line, then you're right - the messages disappear quickly. If you cant run from IDLE for some reason, add an input request to the program so that after it finishes it says something like

ignoreme = input("Press ENTER to exit the program")

where ignoreme is a string variable. You're still better off using IDLE if you can manage it though.
Locked

Return to “Grades 9-12: Math and Computer Science”