Verse

Luke 12:15 - 21 And he said unto them, Take heed, and beware of covetousness: for a man's life consisteth not in the abundance of the things which he possesseth.
Showing posts with label Cybersecurity. Show all posts
Showing posts with label Cybersecurity. Show all posts

Thursday, 10 September 2026

John the Ripper

 CYBERSECURITY • PASSWORD AUDITING

John the Ripper: Complete Guide to Password Auditing

John the Ripper is one of the most widely used password-auditing and password-recovery tools in cybersecurity. It can test password hashes using dictionary attacks, word-mangling rules, single-crack techniques, incremental attacks, and other configurable methods.

⚠️ Authorization & Legal Notice

John the Ripper should only be used for systems, password hashes, files, and accounts that you own or have explicit authorization to audit.

The examples in this guide are intended for cybersecurity education, laboratory environments, password auditing, and authorized penetration testing. Do not use recovered credentials or password hashes to access accounts or systems without permission.

1. What Is John the Ripper?

John the Ripper (JtR) is a password-cracking and password-auditing tool originally designed to identify weak Unix passwords. Modern versions support a very large collection of password-hash and encrypted-file formats, particularly in the Jumbo build.

The fundamental idea is simple: John takes a password hash and generates candidate passwords. It applies the appropriate hashing process to each candidate and compares the resulting value with the target hash. When the values match, the original password has been recovered.

John combines several cracking modes and is highly configurable. Its official documentation describes wordlist, single-crack, incremental, and external modes among its major capabilities.

2. Why Is John the Ripper Important?

Password auditing is important because a password can appear strong to a human while still being predictable to an automated password-auditing tool.

Security professionals can use John to:

  • Identify weak passwords in an authorized password audit.
  • Evaluate organizational password policies.
  • Test the effectiveness of password hashing.
  • Recover passwords from authorized encrypted data.
  • Demonstrate the risks of password reuse.
  • Evaluate custom password dictionaries and rules.
  • Support incident-response and forensic investigations.

3. How Password Cracking Works

John does not normally "decrypt" a password hash. A cryptographic password hash is designed to be one-way. Instead, John generates possible passwords and tests them against the hash.

Password Candidate
→
Hash Function
→
Generated Hash
→
Compare
→
Match / No Match

For example, if a laboratory hash corresponds to the password Cyber123!, John may eventually generate that candidate. If its calculated hash matches the target hash, the password has been recovered.

4. Password Hashes: The Theory You Need

Hashing vs Encryption

Encryption is designed to be reversible when the correct key is available. Hashing is designed as a one-way transformation.

Password systems therefore normally store a password-derived hash rather than the plaintext password.

Salts

A salt is additional random data incorporated into password hashing. Properly designed salted password hashing makes precomputed attacks much less useful and ensures that identical passwords do not necessarily produce identical stored hashes.

Fast vs Slow Password Hashing

Algorithms designed for password storage intentionally make password verification computationally expensive. Modern password hashing approaches such as bcrypt, scrypt, and Argon2 are designed to make large-scale guessing substantially more expensive than using fast general-purpose hashes.

This is why the hash algorithm matters just as much as the password itself when evaluating password security.

5. Installing John the Ripper

Kali Linux / Debian-based Linux

sudo apt update
		sudo apt install john

Verify the installation:

john --version

Depending on the operating system and package, the available formats and features can differ. For advanced auditing, security professionals should understand whether they are using a standard John build or a Jumbo build.

6. Basic John the Ripper Syntax

john [options] [password-file]

The password file contains password hashes or another supported input format. Options control the attack mode, hash format, wordlist, session handling, and other behavior.

Basic execution

john hashes.txt

With no specific cracking mode selected, John follows its configured sequence of cracking modes. The official examples describe a typical progression beginning with single-crack mode, followed by wordlist mode and then incremental mode.

7. John the Ripper Cracking Modes

Choosing the correct mode is one of the most important parts of using John efficiently.

7.1 Single Crack Mode

Single-crack mode generates candidates using information associated with accounts, such as login names and GECOS/full-name information, together with password-mangling rules.

john --single hashes.txt

This mode can be very effective when passwords are based on predictable personal information.

7.2 Wordlist Mode

Wordlist mode tests candidate passwords from a text file. Each line normally represents a candidate word.

john --wordlist=/path/to/wordlist.txt hashes.txt

Wordlists are particularly effective when passwords are based on common words, leaked-password patterns, names, locations, brands, or predictable modifications.

7.3 Wordlist + Rules

John can transform words from a wordlist using rules. This allows one source word to generate many password candidates.

john --wordlist=/path/to/wordlist.txt --rules hashes.txt

For example, a source word such as security could be transformed into multiple variations involving capitalization, numbers, substitutions, or appended characters.

7.4 Incremental Mode

Incremental mode can attempt combinations across a configured character set. It is extremely powerful but can have an enormous search space.

john --incremental hashes.txt

Incremental mode does not simply generate random strings. John uses character-frequency information to prioritize candidates. Because the theoretical search space can become enormous, such attacks may run for a very long time.

7.5 External Mode

Advanced users can define custom candidate-generation or filtering logic using John's external mode and configuration system.

john --external=MODE hashes.txt

External modes are useful when standard candidate-generation strategies do not adequately represent a specific authorized auditing scenario.

8. Wordlists

A wordlist is simply a collection of candidate passwords. The quality and ordering of a wordlist can have a major effect on auditing efficiency.

A useful wordlist may contain:

  • Common passwords.
  • Dictionary words.
  • Common password variations.
  • Organization-approved test passwords.
  • Custom laboratory candidates.

Example custom wordlist

nano lab-wordlist.txt

Example contents:

password
		Password
		Password123
		Security123
		Cybersecurity
		Cyber123!

Use only intentionally created test data in a learning environment.

9. RockYou and Large Wordlists

Kali Linux commonly includes the RockYou wordlist in compressed form. Depending on the installation, its location may be:

/usr/share/wordlists/rockyou.txt.gz

If the file is present and you are working in an authorized laboratory, it can be decompressed before use.

sudo gzip -d /usr/share/wordlists/rockyou.txt.gz

Large wordlists can significantly increase the number of candidates tested, but larger does not automatically mean better. A smaller, well-targeted wordlist can sometimes be considerably more efficient.

10. John the Ripper Rules

Rules are one of John's most powerful features. Instead of testing only the exact words in a wordlist, rules modify those words to generate additional candidates.

Conceptually:

word
		↓
		capitalize
		↓
		append number
		↓
		append symbol
		↓
		password candidate

John provides an extensive rule syntax supporting transformations, reject conditions, character classes, variables, and preprocessing.

This makes rules useful for modelling common human password construction behavior.

Using the default rules

john --wordlist=wordlist.txt --rules hashes.txt

Custom rules can be defined in John's configuration file.

11. Hash Formats

John supports many different password and encrypted-data formats. The exact formats available depend on the build.

You can inspect available formats with:

john --list=formats

When automatic detection does not select the expected format, a format can be explicitly specified:

john --format=FORMAT hashes.txt

Using the wrong format is a common reason for messages such as No password hashes loaded.

12. Monitoring a Cracking Session

John can report the current state of a running or interrupted session.

john --status

During a running session, pressing a key in the terminal can also cause John to display its current status.

Depending on the mode, useful information can include candidate rate, progress, elapsed time, and the current cracking state.

13. Sessions and Long-Running Jobs

Password auditing can take minutes, hours, or substantially longer. John therefore provides session management.

Create a named session

john --session=lab-audit hashes.txt

Check status

john --status=lab-audit

Restore a session

john --restore=lab-audit

Named sessions are especially useful when several authorized password-auditing jobs are being performed.

14. Displaying Recovered Passwords

John stores recovered password information in its internal password database, commonly referred to as the john.pot file.

Use John's own interface to display recovered passwords:

john --show hashes.txt

This is preferable to manually inspecting the internal pot file.

15. Complete Authorized Laboratory Workflow

The following workflow demonstrates the general process without targeting real credentials.

Step 1 — Prepare a laboratory hash

Create a password and corresponding hash using a controlled laboratory environment.

Step 2 — Save the hash

nano hashes.txt

Step 3 — Prepare a small wordlist

nano lab-wordlist.txt

Step 4 — Run a dictionary audit

john --wordlist=lab-wordlist.txt hashes.txt

Step 5 — Display results

john --show hashes.txt

Step 6 — Try word-mangling rules

john --wordlist=lab-wordlist.txt --rules hashes.txt

Step 7 — Monitor a named session

john --session=lab hashes.txt
john --status=lab

Step 8 — Restore if interrupted

john --restore=lab

This workflow illustrates the fundamental password-auditing lifecycle:

Hash
→
Identify Format
→
Generate Candidates
→
Test
→
Report

16. Understanding Incremental Attacks

Incremental mode attempts combinations from a configured character set. The theoretical search space grows rapidly as password length increases.

If a character set contains N possible characters and the password length is L, the number of possible combinations for exactly that length is:

N^L

For example, a 10-character password selected from 62 possible alphanumeric characters has:

62^10

possible combinations before considering smarter candidate ordering or password-specific weaknesses.

This demonstrates why password length, character space, hashing cost, and candidate-generation strategy all matter.

17. Performance and Cracking Speed

John reports password-candidate processing rates, but raw speed should never be interpreted as the complete measure of password security.

Performance depends on factors such as:

  • Hash algorithm.
  • Password length.
  • Number of candidate passwords.
  • Number of hashes.
  • Salt configuration.
  • CPU performance.
  • Parallelization.
  • John build and implementation.
  • Selected cracking mode.

Fast hashes can be tested extremely quickly, while deliberately expensive password-hashing algorithms significantly reduce the number of guesses an attacker can perform.

18. Benchmarking John

John includes benchmarking functionality for evaluating the performance of supported algorithms.

john --test

You can also restrict testing to a particular supported format:

john --test --format=FORMAT

Benchmark results are useful when evaluating the relative performance of different systems or configurations.

19. John's Configuration System

John is highly configurable. Its configuration file can define global options, wordlists, rules, incremental modes, and external modes.

Depending on the platform, the configuration file is generally called:

john.conf

or:

john.ini

Advanced users can customize John to represent specific authorized password-auditing requirements.

20. Common Problems and Solutions

"No password hashes loaded"

Possible causes:

  • Incorrect hash format.
  • Malformed input.
  • Unsupported format.
  • Incorrect file contents.

Approach:

john --list=formats

Verify that the supplied hash corresponds to a format supported by the installed build.

Wordlist not found

Verify the path:

ls -lh /path/to/wordlist.txt

John is taking too long

This may be completely normal. Incremental attacks can have enormous search spaces, and slow password hashes intentionally reduce candidate-processing speed.

Consider the selected mode, wordlist size, rules, hash algorithm, password length, and available hardware before assuming something is broken.

Session interrupted

Use a named session and restore it:

john --restore=lab

21. John the Ripper vs Hashcat

John the Ripper and Hashcat are both powerful password-auditing tools, but their workflows and strengths differ.

FeatureJohn the RipperHashcat
Primary usePassword auditing and recoveryPassword recovery and auditing
CPU usageStrongSupported
GPU focusAvailable depending on build/workflowMajor strength
RulesVery powerfulVery powerful
FormatsExtensive, especially JumboExtensive
Learning curveModerateModerate to advanced

The right tool depends on the hash type, hardware, workflow, required attack strategy, and auditing objective.

22. John the Ripper vs Hydra

John and Hydra solve different problems.

  • John the Ripper: Primarily focused on offline password/hash auditing and password recovery.
  • Hydra: Primarily designed for testing authentication services and network login mechanisms in authorized environments.

They should not be treated as interchangeable tools.

23. What John Teaches Us About Password Security

The most valuable result of a password audit is not the recovered password itself. It is understanding why that password was recoverable.

Use strong passwords

Longer, unpredictable passwords dramatically increase the candidate search space.

Avoid password reuse

Reusing passwords creates a single point of failure. A compromised password can potentially affect multiple services.

Use password managers

Password managers make it practical to use unique, high-entropy passwords for different services.

Use MFA

Multi-factor authentication provides an additional security layer even if a password is compromised.

Use modern password hashing

Applications should use password-specific, deliberately expensive hashing algorithms with unique salts rather than fast general purpose hashes.

24. John the Ripper Command Cheat Sheet

CommandPurpose
john hashes.txtRun John's default cracking sequence.
john --single hashes.txtUse single-crack mode.
john --wordlist=words.txt hashes.txtUse a specified wordlist.
john --wordlist=words.txt --rules hashes.txtUse wordlist mode with rules.
john --incremental hashes.txtUse incremental mode.
john --format=FORMAT hashes.txtForce a specific hash format.
john --show hashes.txtDisplay recovered passwords.
john --statusDisplay session status.
john --session=NAME hashes.txtStart a named session.
john --restore=NAMERestore an interrupted session.
john --testBenchmark supported algorithms.
john --list=formatsList available hash formats.

25. Recommended Password-Auditing Workflow

  1. Obtain explicit authorization.
  2. Identify the hash format.
  3. Preserve the original evidence.
  4. Start with efficient candidate sources.
  5. Use an appropriate wordlist.
  6. Apply rules when justified.
  7. Use single-crack techniques when appropriate.
  8. Use incremental techniques only when the search space is reasonable.
  9. Monitor performance and session state.
  10. Document recovered and unrecovered credentials securely.
  11. Report password-policy weaknesses.
  12. Recommend remediation.

26. Final Takeaway

John the Ripper is more than a simple password-cracking command. It is a flexible password-auditing framework that combines candidate generation, wordlists, rules, hash formats, session management, incremental attacks, benchmarking, and extensive configuration.

The most important concept is understanding the relationship between password entropy, candidate generation, hash algorithms, computational cost, and time.

Used responsibly, John can help security professionals discover weak passwords before attackers do and provide measurable evidence for improving an organization's authentication security.

Official References

About the Author: Jahid Shah is a WordPress developer and security specialist focusing on malware remediation, API hardening, and server infrastructure at Jahid Shah Labs.

Thursday, 20 August 2026

Computer Systems Security Syllabus

Course Description

6.858 Computer Systems Security is a class about the design and implementation of secure computer systems. Lectures cover threat models, attacks that compromise security, and techniques for achieving security, based on recent research papers. Topics include operating system (OS) security, capabilities, information flow control, language security, network protocols, hardware security, and security in web applications.

Syllabus

Calendar

Readings

Lecture Notes

Lecture Videos

Labs

Exams

Final Project

Related Resources


DOWNLOAD COURSE

Computer Systems Security

 

Syllabus

This course makes use of Athena, MIT’s UNIX-based computing environment. OCW does not provide access to this environment.

Course Meeting Times

Lectures: 2 sessions / week, 1.5 hours / session

Prerequisites

6.033 Computer System Engineering

Description

6.858 Computer Security studies the design and implementation of secure computer systems. Lectures cover threat models, attacks that compromise security, and techniques for achieving security, based on recent research papers. Topics include operating system (OS) security, capabilities, information flow control, language security, network protocols, hardware security, and security in web applications. Assignments include labs that involve implementing and compromising a secure web server and web application, and a group final project.

6.858 is primarily intended for seniors and Masters of Engineering students who want to learn about how to build secure computer systems in detail. Ph.D. students are also welcome. Students can use 6.858 to fulfill the engineering concentration requirements for Computer Systems.

Lectures

Each lecture will cover a paper in systems security. Read the paper before lecture, and submit by 10PM the night before:

  • An answer to the homework reading question.
  • Your own question about the paper (will try to answer in lecture).

We’ll discuss the paper in class. Please interrupt, ask questions, and point out mistakes.

Quizzes

There will be two quizzes during our regular lecture time slot. No “final exam” during finals week; second quiz near end-of-term.

Assignments

There are 6 labs and a final project in this course. Labs will look like real-world systems, in some respects: There are many interacting parts written in different languages. We’ll look at / write x86 asm, C, Python, Javascript, etc…

There will be a final project at the end of the course (groups of 3–4 people), and presentations during the last week of class. Think of projects you’d like to work on as you’re reading papers. Either attack or defense-oriented projects are possible. It is ok to combine this project with other class projects or your own research.

Grading

ACTIVITIESPERCENTAGES
2 Quizzes20%
Lab Exercises35%
Final Project and Presentation25%
Homework and Class Participation20%

Lab exercises will be graded on the correctness based on both the lab assignment and whether they fulfill the specifications imposed by the grading / checking scripts. Grading will be done with a staff-version of the Makefile and grading scripts, so you should pass all the tests without any modifications to those files.

Turn-In Policy

You are required to turn in each lab; if you have not turned in all of the labs, you will receive an F. Labs that are turned in but score 0 points will receive a D. You have a total of 72 late hours to use throughout the semester. After you have used up your late hours, each additional day late will incur a full letter grade penalty. Saturday and Sunday both count as days. (Late days are tracked automatically, so you don’t need to email before using one.)

Collaboration

You may not collaborate on quizzes. You are welcome to discuss the labs with other students, but you should complete all assignments on your own, and you should carefully acknowledge all contributions of ideas by others, whether from classmates or from sources you have read. Final projects will be in groups, where you should collaborate.

Warning About Security Work / Research on MITnet (and in General)

You will learn how to attack systems so that you know how to defend them. Just because something is technically possible, doesn’t mean it’s legal.

Labs

LABSSUPPORTING FILES
Lab 1: Buffer Overflows (PDF)

vm-6858.zip (ZIP) (This ZIP contains the files .vmdx, .vmx, .vmx-e)

lab1.zip (ZIP) (This ZIP contains the files .vmdx, .vmx, .vmx-e)

Lab 2: Privilege Separation (PDF)lab2.zip (ZIP) (This ZIP contains the files .txt, .sh, .ico, .py, etc.)
Lab 3: Symbolic Execution (PDF)lab3.zip (ZIP) (This ZIP contains the files .txt, .sh, .ico, .py, etc.)
Lab 4: Attacking the Server (PDF) <no supporting files>
Lab 5: Browser Security (PDF)lab5.zip (ZIP) (This ZIP contains the files .txt, .sh, .ico, .py, etc.)
Lab 6: JavaScript Sandboxing (PDF)lab6.zip (ZIP) (This ZIP contains the files .txt, .sh, .ico, .py, etc.)


Exams

YEARSEXAMSSOLUTIONS
  Quiz 1
2009Quiz 1 (PDF)Quiz 1 Solutions (PDF)
2010Quiz 1 (PDF)Quiz 1 Solutions (PDF)
2011Quiz 1 (PDF)Quiz 1 Solutions (PDF)
2012Quiz 1 (PDF)Quiz 1 Solutions (PDF)
2013Quiz 1 (PDF)Quiz 1 Solutions (PDF)
2014

Quiz 1 (PDF)

Quiz 1 Review (PDF)

Quiz 1 Review 2 (TXT)

Quiz 1 Solutions (PDF)
  Quiz 2 
2009Quiz 2 (PDF)Quiz 2 Solutions (PDF)
2010Quiz 2 (PDF)Quiz 2 Solutions (PDF)
2011Quiz 2 (PDF)Quiz 2 Solutions (PDF)
2012Quiz 2 (PDF)Quiz 2 Solutions (PDF)
2013Quiz 2 (PDF)Quiz 2 Solutions (PDF)
2014

Quiz 2 (PDF)

Quiz 2 Review (PDF)

Quiz 2 Review 2 (PDF)

Quiz 2 Review 3 (TXT)

Quiz 2 Solutions (PDF)

Final Project

This course makes use of Athena, MIT’s UNIX-based computing environment. OCW does not provide access to this environment.

Idea discussions due: One day after Lecture 13

Proposals due: Two days after Quiz 1

Presentations due: Lecture 24 (in class)

Code and write-up due: Two days after Lecture 24 (5:00pm)

Introduction

In this lab, you will work on a final project of your own choice. Unlike in previous labs, you will work in groups of 3–4 for the final project. You will be required to turn in both your code and a short write-up describing the design and implementation of your project, and to make a short in-class presentation about your work. We will post your write-up and code on the web site after the end of the semester, unless you explicitly talk to us about why you want to keep yours confidential.

The primary requirement is that your project be something interesting. Your project should also have something to do with security, but that’s relatively easy, and it’s much more important for your project to be interesting.

We encourage students to choose any project idea that you might think is interesting. If you are not sure, we provides you with two kinds of ideas. First, we present two reasonably well-defined starting points for projects. Second, we give a list of half-baked ideas that we think could turn into an interesting project, but we haven’t given them too much thought.

We encourage final projects that leverage multiple classes you might be taking, or that involve other research or projects you are already working on. For example, if you are also taking 6.828 Operating System Engineering or 6.S897 (elections and voting technology), it would be fine with us to have a single project that counts for both 6.858 and another class. Same for other upper-level course-6 classes or MEng and AUP projects.

Most of the final projects from last year are posted online. Several final projects from previous years ended up being subsequently published as research papers (e.g., UserFS (PDF), BStore (PDF), and LXFI (PDF)). If this sounds interesting to you, try to pick an ambitious class project that you might want to continue working on afterwards!

Deliverables

There are four concrete steps to the final project, as follows:

1. Form a Group

Decide on the project you would like to work on, and post a short summary of your idea (one to two paragraphs). Discuss ideas with others. Use these discussions to help find other students interested in similar ideas for forming a group. Course staff will provide feedback on project ideas; if you’d like more detailed feedback, come chat with us in person.

2. Project Proposal

Discuss your proposed idea with course staff over the next week, before the proposal deadline, to flesh out the exact problem you will be addressing, how you will go about doing it, and what tools you might need in the process. By the proposal deadline, you must submit a one-to-two-page proposal describing:

  • Your group members list
  • The problem you want to address
  • How you plan to address it
  • What are you proposing to specifically design and implement

3. Project Presentation

Prepare a short in-class presentation about the work that you have done for your final project. We will provide a projector that you can use to demonstrate your project. Depending on the number of groups and the kinds of projects that each group chooses, we may decide to limit the total number of presentations, and some groups might end up not presenting in class.

4. Write-up and Code

Write a document describing the design and implementation of your project, and turn it in along with your project’s code by the final deadline. The document should be about 2–3 pages of text that helps us understand what problem you solved, and what your code does. The code and writeups will be posted online after the end of the semester. Take a look at the list of writeups from past years (2012 and 2013) to get a sense of what this writeup should look like.

Well-defined Starting Points

We provide two starting points if you want a well-defined project. One involves building a defensive system, namely an encrypted file system that allows users to share data through an untrusted server. The other involves finding vulnerabilities in existing systems, namely in various MIT services that IS&T runs.

Encrypted File System

Your goal for this project idea is to develop a file system that allows users to store data on an untrusted file server. The file server should not be able to obtain the user’s plaintext data (i.e., your file system should encrypt the data), and the file server should not be able to corrupt the data either (i.e., your file system should authenticate the data it gets back from the file server).

Your file system should support many users, and allow users to share files with one another. For each file, it should be possible to control the set of users who can read, and who can write, to that file.

At a minimum, your file system should meet the following requirements:

  • Users can create, delete, read, write, rename files.
  • The file system should support directories, much like the Unix file system.
  • Users should be able to set permissions on files and directories, which also requires that your file system be able to name users.
  • File names (and directory names) should be treated as confidential.
  • Users should not be able to modify files or directories without being detected, unless they are authorized to do so.
  • If the server is not malicious, unauthorized users should not be able to corrupt the file system.
  • The file server should not be able to read file content, file names, or directory names.
  • The server should not be able to take data from one file and supply it in response to a client reading a different file.
  • A malicious file server should not be able to create or delete files or directories without being detected.

The final result of this project should be a functional file system implementation that meets the above requirements. You can implement your prototype in any language you want, such as Python or C++ or Go. You can decide how the file system client and server should be run. One reasonable design would be to have the file system client provide a minimal shell environment that allows users to perform the operations described in the above requirements.

As a challenge, you may want to think about providing freshness guarantees: that is, that a client should always see the latest version of a file, or at least that a client should never see an older version of a file after it sees a newer one. The SUNDR file system (PDF) may provide some inspiration for this, although it is a rather complicated system. You can choose to implement some limited freshness guarantees, unlike SUNDR’s ideal fork consistency.

As another challenge, you may want to think about integrating your file system with the OS of your choosing. You may find FUSE helpful for this.

Looking for Vulnerabilities

If you are interested in a more attack-oriented final project, your goal for this project is to pick an interesting service provided by MIT’s IS&T (or any other computing service at MIT, such as those provided by SIPB), and try to find vulnerabilities in it. We will judge your project based on what kinds of vulnerabilities you find. Beware that there’s no guarantee of success with this (or any other attack-oriented) project, because you may accidentally choose a very secure service, and might end up finding no vulnerabilities, which can potentially result in a failing grade. However, if you have an interesting approach to finding vulnerabilities (e.g., you have designed a new tool for finding bugs), you may receive a good grade even without finding real vulnerabilities.

Important: In any attack-oriented project, you must be very careful to avoid disrupting existing services, inconveniencing users of those services, compromising the security of that service, or taking advantage of any vulnerabilities you find. If you are ever in doubt, please get in touch with us. If you discover real vulnerabilities in a service, please get in touch both with the operators of that service and with us. Please don’t exploit the vulnerability to gain any additional privileges on a service, and don’t announce it widely before the service operators have a chance to understand it.

Your grade in this project depends on how interesting the vulnerabilities are that you have found, or how interesting the techniques are that you used to discover those vulnerabilities. For example, obtaining passwords through traditional brute-forcing techniques is not interesting. The general scale of work expected should be comparable to the amount of work involved in building a file system (see project above). Of course, much of your work will involve reading and understanding an existing system, and carefully constructing proof-of-concent exploits to demonstrate the vulnerabilities that you discovered, and the total amount of resulting code may be minimal; think back to how much time you spent on lab 1, and how many lines of code your final exploits were.

Half-baked Project Ideas

If you are interested in working on something other than the two projects proposed above, here are some half-baked ideas. Use them to come up with more well-defined projects; we expect the final work to be comparable in terms of total effort to the two well-defined projects listed above. Of course, we encourage you to come up with your own ideas for what you would like to work on; there’s no need to restrict yourself to this list.

  • Get the concolic execution system from lab 3 to work on real-world Python web applications, and try to find real bugs.
  • Write an interesting web application in Ur / Web.
  • Modify Linux to keep track of the last process and user that modified each file. Perhaps log a warning or raise an alarm when a file is modified by an application that hasn’t written to that file before.
  • Build a static analysis tool to find bugs in real web applications. It would be great to have a static analysis tool for Python programs, even if it’s not perfectly sound, much like the PHP static analysis tool we discussed in lecture. In addition to the standard XSS bugs, can you find bugs where application developers forget to perform permission checks, or inadvertently leak sensitive data? Such a tool might also be useful to find non-security bugs in Python programs. One existing tool that’s quite limited is PyLint.
  • Find bugs in real C code. Take a look at some recent research papers on finding real bugs in the Linux kernel and other C-based programs, involving integer errors (PDF) or undefined behavior (PDF). We can give you access to our source code to these tools; you can apply them to existing software to see what bugs you can find, and also think about ways to extend the tools to make them more accurate, to make them find other kinds of bugs, etc.
  • Extend program analysis tools used by Linux kernel developers, such as sparse and smatch, to catch different kinds of bugs in the kernel.
  • Use the KLEE symbolic execution system to build an analysis tool that finds interesting bugs in C programs.
  • Explore the extent to which covert channels / side channels matter, e.g. in shared VMs like EC2, vs. shared OS, vs. other environments. See this paper (PDF) for some background information.
  • Add Capsicum support to Linux. There has been some recent work toward capsicum on linux proposed.
  • Port an interesting application to use Capsicum (on FreeBSD).
  • Build an interesting application on top of Webathena (site, code), or extend it to support non-DES enctypes (AES, etc).
  • Implement Kerberos for Android. We can put you in touch with some folks at the Kerberos Consortium that are working on this. It would be interesting to implement a Kerberos ticket caching service, accessed via Android intents, so that an application can use Kerberos tickets for a specific service without being able to steal the user’s entire TGS ticket.
  • Implement progressive authentication: instead of requiring the user to log in to do anything, require different levels of credentials for specific tasks. For example, on Athena, perhaps running a web browser should not require any credentials, but accessing your personal files (or your browser accessing your google.com cookie that gives access to gmail) should require your Kerberos password, etc. The same would apply on an Android phone: checking the weather or the map should not require any credentials, but accessing the mail app should prompt for a PIN, swipe pattern, or password. A paper from Microsoft Research (PDF) might give you some things to think about, although it may not be worthwhile to implement all of the environment monitoring done in that work.
  • Examine the security of Android applications. Look at some previous studies for inspiration (one (PDF), two (PDF)).
  • Improve sandboxing for Android applications. Is there something that you could do to prevent a malicious application from exploiting kernel bugs? Consider recent improvements to seccomp, using Linux KVM, or using Native Client.
  • Look for weaknesses in random number generation, or improve the random number generation. Some hints for where to start: Mining your Ps and Qs (PDF), Boot-time Entropy (PDF), Ted T’so on Linux PRNG design, Theoretical weaknesses in the Linux PRNG (PDF).
  • Audit interactions between Android applications, perhaps by tracing all intents sent via the reference monitor. When something goes wrong, can your system tell the user why an application might be broken?
  • Implement an environmental key generation system.
  • Build a password manager for Android applications, perhaps by implementing a virtual keyboard that can automatically enter passwords into an application. The virtual keyboard can know exactly what application it’s entering passwords into, which can guard against phishing-style attacks.
  • Provide more fine-grained network access control in Android, to protect an internal corporate network from possibly-malicious applications on a phone.
  • Implement an efficient version of Baggy bounds checking on top of Clang and LLVM.
  • Use DynamoRIO’s binary instrumentation to implement some cool security mechanism for unmodified binaries. For example, you could implement a binary-level taint tracking system that prevents secret files from being sent out over the network. You can look at a previous lab we used to have involving DynamoRIO from a few years ago.
  • Use Resin’s taint tracking for Python to enforce some interesting properties in zoobar.
  • Find an interesting use for trusted hardware, and figure out how to expose trusted hardware safely to applications. Linux should already have a basic device driver for a TPM.
  • Write a tool to help privilege-separating Python applications, and apply it to the Zoobar labs or other real applications.
  • Implement more flexible protection mechanisms for Linux (so that any user can create additional protection domains – sub-users – to run code with less privileges, without having to be root). You can build upon a class project from a previous year, UserFS (PDF).
  • Improve the security of HTTPS in web browsers in the face of possibly compromised CAs. For example, define a new URL syntax that includes the server’s certificate public key in the URL itself, so that one site can unambiguously include a link to another site without relying on CAs. Or, include the CA name in the URL, so that another CA cannot subvert security. See SSL observatory, perspectives, and CertPatrol.
  • Auditing support for web applications. For instance, suppose someone broke into your blog or forum, added a user account for themselves, changed permissions, and posted garbage messages. How can you track down all of the changes made by the attacker? Could be done with the help of a language runtime, such as Resin.
  • The Tor Project has some ideas for possible Tor-related projects.
  • Analyze the Bitcoin transaction graph. How hard is it to anonymize Bitcoin exchanges? Here’s one recent paper (PDF) analyzing the Bitcoin data set, which might give you ideas for other things to try.
  • Implement one of Daniel J. Bernstein’s ECC curves (e.g., Curve3617) in OpenSSL / OpenSSH.


Related Resources

This section contains external resources related to the material taught in this class.

Cryptography

Control Hijacking Attacks

Web Security

OS Security

Exploiting Hardware Bugs

Mobile Devices



Readings

LEC #READINGSREADING QUESTION
1No readingsNo question
2Akritidis, Periklis, Manuel Costa, et al. “Baggy Bounds Checking: An Efficient and Backwards-Compatible Defense against Out-of-Bounds Errors.” USENIX Security Symposium (2009): pp. 51–66.Lecture 2 Question (PDF)
3Bittau, Andrea, Adam Belay, et al. “Hacking Blind.” Proceedings of the IEEE Symposium on Security & Privacy (2014).Lecture 3 Question (PDF)
4Krohn, Maxwell. “Building Secure High-Performance Web Services with OKWS (PDF).” USENIX Technical Conference (2004): pp. 185–198.Lecture 4 Question (PDF)
5No readingsNo question
6

Hardy, Norm. “The Confused Deputy.” ACM SIGOPS Operating Systems Review 22, no. 4 (1988): pp. 36–38.

Watson, Robert N. M., Jonathan Anderson, et al. “Capsicum: practical capabilities for UNIX.” (PDF) Proceedings of the 19th USENIX Security Symposium (2010).

Lecture 6 Question (PDF)
7Yee, Bennett, David Sehr, et al. “Native Client: A Sandbox for Portable, Untrusted x86 Native Code.” IEEE Symposium on Security and Privacy (2009): pp. 79–93.Lecture 7 Question (PDF)
8

“OWASP Top 10 - 2013: The Ten Most Critical Web Application Security Risks.”

Zalewski, Michal. Chapters 9–13 in The Tangled Web: A Guide to Securing Modern Web Applications. No Starch Press, 2011. ISBN: 9781593273880.

Lecture 8 Question (PDF)
9

“Security in Django.”

“Django CSRF Protection.”

Lecture 9 Question (PDF)
10Cadar, Cristian, Daniel Dunbar, et al. “KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs.” Operating Systems Design and Implementation (2008): pp. 209–224.Lecture 10 Question (PDF)
11Chlipala, Adam. “Ur / Web: A Simple Model for Programming the Web.” ACM SIGPLAN-SIGACT Symposium (2015): pp. 153–165.Lecture 11 Question (PDF)
12Bellovin, Steven M. “A Look Back at ‘Security Problems in the TCP/IP Protocol Suite’.” Computer Security Applications Conference (2004): pp. 229–249.Lecture 12 Question (PDF)
13Steiner, Jennifer G., Clifford Neuman, et al. “Kerberos: An Authentication Service for Open Network Systems.” USENIX Conference (1988).Lecture 13 Question (PDF)
14Jackson, Collin, and Adam Barth. “ForceHTTPS: Protecting High-Security Web Sites from Network Attacks.” Proceedings of the 17th international conference on World Wide Web (2008): pp. 525–534.Lecture 14 Question (PDF)
15Fu, Kevin. “Trustworthy Medical Device Software,” 2011.Lecture 15 Question (PDF)
16Brumley, David, and Dan Boneh. “Remote Timing Attacks are Practical.” Proceedings of the 12th USENIX Security Symposium 12, (2003): pp. 1.Lecture 16 Question (PDF)
17

Bonneau, Joseph, Cormac Herley, et al. “The Quest to Replace Passwords: A Framework for Comparative Evaluation of Web Authentication Schemes.” IEEE Symposium on Security and Privacy (2012): pp. 553–567.

There is an optional extended version published by the University of Cambridge: Computer Laboratory.

Lecture 17 Question (PDF)
18Aggarwal, Gaurav, Elie Burzstein, et al. “An Analysis of Private Browsing Modes in Modern Browsers.” USENIX Conference on Security (2010).Lecture 18 Question (PDF)
19

Dingledine, Roger, Nick Mathewson, et al. “Tor: The Second-Generation Onion Router.” Proceedings of the 13th USENIX Security Symposium 13 (2004): pp. 21.

Blog posts:

Part 1   
Part 2   
Part 3

Lecture 19 Question (PDF)
20

“Enck, William, Machigar Ongtang, et al. “Understanding Android Security.” IEEE Security and Privacy 7, no. 1 (2009): pp. 50–57.

Errata: Bug in the paper: In Figure 1, in the FriendViewer application, the top right blue oval (shown as Activity “FriendTracker”) should actually be a rounded-rectangle Activity “FriendMap” (see Figure 2).

Lecture 20 Question (PDF)
21Enck, William, Peter Gilbert, et al. “TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones.” Communications of the ACM 57, no. 3 (2010): pp. 99–106.Lecture 21 Questions (PDF)
22No readingsNo question
23Levchenko, Kirill, Andreas Pitsillidis, et al. “Click Trajectories: End-to-End Analysis of the Spam Value Chain.” IEEE Symposium on Security and Privacy (2011): pp. 431–446.Lecture 23 Question (PDF)
24No readingsNo question

Lecture Notes

LEC #TOPICS AND NOTES
1Introduction, Threat Models (PDF)
2Control Hijacking Attacks (PDF)
3Buffer Overflow Exploits and Defenses (PDF)
4Privilege Separation (PDF)
5Guest Lecture: Paul Youn from iSEC Partners (no notes)
6Capabilities (PDF)
7Sandboxing Native Code (PDF)
8Web Security Model (PDF)
9Securing Web Applications (PDF)
10Symbolic Execution (no notes)
11Ur / Web (no notes)
12Network Security (PDF)
13Network Protocols (PDF)
14SSL and HTTPS (PDF)
15Medical Software (no notes)
16Side-Channel Attacks (PDF)
17User Authentication (PDF)
18Private Browsing (PDF)
19Anonymous Communication (no notes)
20Mobile Phone Security (PDF)
21Data Tracking (PDF)
22Guest Lecture: Mark Silis and David LaPorte from MIT IS&T (no notes)
23Security Economics (PDF)
24Project Presentations (no notes)

Vision vs. Ambition in Ministry

Vision vs. Ambition in Ministry Vision is a God-given picture of what God desires to accomplish through us; ambition is a self-driven desir...