Please ensure Javascript is enabled for purposes of website accessibility

Administrative Information

Important: All students are required to read the Syllabus, which outlines the major course policies, and Collaboration Policy, which describes the rules surrounding collaboration with other students and referencing external sources outside of the course. Please make sure you understand these policies well! (The section below elaborates more on some additional policies that aren’t covered in either of those documents.)

What's this course about?

This is a course on computer systems security through a balanced mixture of theory and practice.

We’ll start out with building the foundations of security through an exploration of cryptography. From there, we’ll move to more complex, multi-faceted systems such as web applications, operating systems, and networks. Along the way, we’ll explore complementary topics such as authentication, physical security, social engineering, privacy, anonymity, usability, and the security of emergent systems such as blockchains and machine learning.

By learning about security through these multiple domains, you’ll concretely learn how various classes of attacks appear in a vast variety of scenarios and how they work in practice. You’ll also learn how to evaluate systems adversarially, from writing precise security analyses about subtle issues in protocols to discovering and exploiting vulnerabilities in concrete technical systems for yourself.

Through all of these activities, you’ll ultimately work to develop a specific kind of intuition—a “security mindset”—that will give you the knowledge, vocabulary, and confidence to critically analyze and effectively defend the software and systems you approach as a computer scientist even after the course.

CS162: The Lab

We strongly encourage you to consider taking CS162, the additional half-credit “lab”. If you take CS162, you’ll have the opportunity to work on advanced challenges that will provide you with a greater appreciation of systems security and the “security mindset” as a whole:

CS162 is intended to be taken concurrently with CS166 and provides students with a deeper understanding of the material by doing advanced versions of the CS166’s projects and advanced questions on the written assignments. These advanced versions focus on real-world skills: performing attacks that are more difficult and rely on less serious vulnerabilities, performing attacks against systems with more real-world constraints, and creating attacks that achieve a higher standard of quality than a mere proof of concept.

In previous years, CS162 students report spending approximately 8 to 20 extra hours on each project throughout the semester, though they also note that the additional components are more front-loaded so the second half of the semester is much more flexible. (We anticipate that this will be the same this year.) You do not need any additional experience on the base prerequsites of the course to succeed in CS162—anyone who feels comfortable taking CS166 and is able to put in the extra time should also feel comfortable taking CS162.

If you’re interested, undergraduate and PhD students should register for CS162 as normal on Courses@Brown. (Senior undergraduates are eligible to capstone with CS162—email the HTA list if you intend to capstone.) If you’re a Masters student, you may earn 2000-level credit for CS166 by completing the CS162 requirements—email the HTA list if you want to do this.


You should have an intro-sequence’s worth of programming experience (016, 018, or 019) and have a good understanding of systems programming (030, 033, 131, or 133). This concretely means that:

  • You should be comfortable writing programs and scripts in the language of your choice (such as Python, Ruby, Bash, Go, C++, etc.), be comfortable in a Unix command-line environment (running binaries, filesystem navigation, etc.) and using SSH with the Brown CS filesystem, have a basic understanding of systems programming concepts such as memory management and networking.
  • You also should have heard of the terms “race condition”, “packet”, “TCP”, “UDP”, “buffer overflows”, and “DNS”. (If you forget what these are, don’t worry—we’ll describe them again when they come up in the latter half of the course.)
  • You should also be at least somewhat comfortable (and very willing) to learn new programming languages and reading code in languages and programs that you’ve never used before. (You’ll get lots of practice with this in this course!)

If you don’t meet the official prerequisites but still want to take the course, talk to the HTAs (they can advise you on your particular situation).

Your willingness to challenge yourself is perhaps the most important prerequsite for the course. Security can be frustrating at times, but the rewards are great—in exchange for engaging with some difficult intellectual challenges, you’ll have the opportunity to gain concrete insights about systems and security and become a better computer scientist by the end of the course.

Lecture Policy

We will have live lecture on Tuesdays and Thursdays @ 1pm - 2:20pm ET in person at CIT 368 and on Zoom here . The lectures will be recorded and information for accessing the captured lectures will be posted on Edstem.

Attendance Policy: Attending lectures synchronously and active class participation is highly encouraged, but not required. While lecture will be recorded, class participation will help the instructor better assess your understanding of the topics in determining the final grade.

The instructor determines overall letter grades by taking into account the final numerical grade and, in borderline cases, class participation. In other words, not attending lecture won’t directly impact your grade, but you might get more out of lecture if you’re able to participate (and, if you’re at a letter grade boundary, class participation and attendance might positively impact your final letter grade at the instructor’s discretion).

If you’re unable to attend lecture on a given date, you don’t need to notify us. (If you’ll routinely be unable to attend lecture—for instance, due to time zone constraints—email Bernardo briefly explaining why in the first two weeks of the course.)

Asking Questions: During the lecture all students will be muted, but we encourage signaling your questions via Zoom chat. This helps us maintain a queue of student questions. You can either ask your question directly in the chat, or, if you want to ask your question verbally, simply type the word "question" in the chat and Bernardo will signal to you when you can unmute and ask your question.

Recording Policy: Lectures will be recorded and made available to all registered students within 24 hours of the lecture date via this Panopto folder (during shopping period, if you are not officially registered, you need to have CSCI1660 in your Primary Cart on Courses@Brown in order to see the Panopto folder). We will also post lecture slides for each lecture.


The Collaboration Policy details the rules surrounding collaboration on all aspects of the course and plays a major role in the pedagogical goals of the course. Please read it in its entirety and make sure you understand its contents before working on any assignment in this course.

To emphasize the points related to collaborating with other students in the course:

  • Projects: Whenever you’re actively interacting with project systems, you must do so entirely independently. “Actively interacting” includes having the project systems (binary, website, etc.) within sight or interacting with them, exploring system source code, writing your deliverables (solutions, writeup, exploit code, video, etc.), and so on. You also may not share your deliverables with others, and you may not read others’ deliverables.

    That said, we allow discussion of projects with other students as long as no student in the discussion is actively interacting with the project systems. You should treat project-based discussions like going to TA hours—that is, focus on high-level hints, prodding questions, and occasional debugging help on narrowly scoped technical issues, but don’t give away full answers. Finally, when you talk to other students about projects, you must cite those students in your handin. See the Policy for more details.

  • Homeworks: You’re permitted to (and encouraged to) discuss any aspect of the homework problems with other students currently in CS166. In this course, the homework problems generally will require you to approach problems from different angles and are designed to encourage discussion amongst students.

    However, you must write your homework solutions entirely independently. You may not share your solutions with anyone (or read solutions written by others). You should not write your solutions while working with other students, and when you’re writing your solutions, you should ensure that you independently understand and can reproduce your answers without referring to notes from collaboration sessions and consulting with other students. (Homework Clinics are not exempt from this policy.) Finally, when you talk to other students about homeworks, you must cite those students in your handin. See the Policy for more details.

Even if you’ve read the above summary, please read the remainder of the Collaboration Policy, since it covers more policies on referencing external sources, how to cite other students in your handins, etc. If you have any questions about the Policy, please ask on Edstem.

All assignments have a due time of 11:59 PM ET. Solution passwords are at /course/cs1660/pub/solution-passwords.txt.
Homework 0 Jan 27 Feb 1
Homework 1 Feb 15 Feb 24
Homework 2 Mar 5 Mar 15
Homework 3 Apr 5 Apr 13
Homework 4 Apr 15 Apr 22
Cryptography Feb 3 Feb 14
Flag Feb 22 Mar 6
Handin Mar 11 Mar 26
Dropbox Apr 3 May 3
Lectures take place on Tuesdays and Thursdays at 1:00pm ET in person at CIT 368 and on Zoom. Lecture recordings are on Panopto. Lectures, readings, and demos are subject to change, so check the lecture schedule once the slides are posted.
—  X 
Jan 27 Course Intro: Logistics, Security Principles

Lecture recording
Textbook chapters: 1.1, 1.3.1, 1.3.3, 1.3.4, 1.4
In-class demo: Windows XP Key Cracking (w/ Bernardo and Victor)

w/ Bernardo
Feb 1 Cryptography I: Symmetric Crypto, OTP, Hash Functions w/ Bernardo
Feb 3 Cryptography II: Block / Stream Ciphers, Public Key Crypto, Signatures w/ Bernardo
Feb 8 Cryptography III: Digital Signatures, MACs, IND-CPA, AAA w/ Bernardo
Feb 10 Cryptography IV: Authentication, Authorization, and Accounting

Lecture recording
Textbook chapters: 7.1, 7.2.3
In-class demo: Password Cracking (w/ Bernardo)
Reading: Same-origin policy

w/ Bernardo
Feb 15 Passwords and MFA w/ Bernardo
Feb 17 Web Security I: Web Security Models, Browser Security, Web Technologies and Protocols

Textbook chapters: 7.1, 7.2.3
In-class demo: Client-Side Checks on WebGoat (w/ Bernardo)
Reading: Same-origin policy

w/ Bernardo
Feb 24 Web Security II: Session Management, SOP JavaScript and iframes, CSRF (Cross-Site Request Forgery) w/ Bernardo
Mar 1 Web Security III: Cross-Site Request Forgery SQL Injection and XSS w/ Bernardo
Mar 3 Web Security IV: Injection Mitigations, XSS, Web Frameworks w/ Bernardo
Mar 8 Web Security IV: XSS mitigations, Web Frameworks & OS Intro w/ Bernardo
Mar 10 Operating Systems Security

Textbook chapter: 3
Reading: CS166 Handin Wiki

w/ Bernardo
Mar 15 Operating Systems Security II w/ Bernardo
Mar 17 Networks I

Textbook chapters: 5.1, 5.2.1, 5.2.2, 5.3.1, 5.3.2
In-class demo: traceroute and ping (w/ Bernardo)

w/ Bernardo
Mar 22 Networks II: ARP, IP, TCP, UDP

Textbook chapters: 5.2.3, 5.3.3, 5.3.4, 5.4.1, 5.4.2, 5.5.3
In-class demo: Wireshark (w/ Bernardo)
Reading: “SYN cookies”

w/ Bernardo
Mar 24 Networks III: DoS, DNS, TLS

Textbook chapter: 6.1

w/ Bernardo
Apr 5 Networks IV: SSL/TLS, Malware

Textbook chapters: 7.1.2, 8.2.4

w/ Bernardo
Apr 7 Cloud Security (Guest Lecture)

Textbook chapters: 7.1.2, 8.2.4
[Reading (optional): _Full Database Rec

w/ Bernardo & Lilika & Kaki
Apr 12 Networks V: TOR; Storage Encryption

Textbook chapter: 9.7
In-class demo: Veracrypt (w/ Bernardo)

w/ Bernardo
Apr 14 Networks VI: Pen Testing, Heartbleed

In-class demo: Pentesting, Heartbleed

w/ Bernardo
Apr 19 Networks VII: Firewall, BGP, Forensics w/ Bernardo
Apr 21 Ransomware w/ Bernardo

We have two types of TA office hours in CS166.

In Project Hours, you can ask for help on anything related to the projects (clarifications, code, etc.), lecture material, or general concepts. Any questions about homework content should be directed to Homework Clinic or Edstem (exception: CS162 students may ask about CS162-only homework content at Project Hours).

In Homework Clinics, students collaborate on homework problems in a group-work environment under the guidance of the TAs. Homework Clinics are designed specifically to help students on the homework problems or any conceptual problems related to the homework. Any questions outside of the homework content should be directed to TA Hours or Edstem.

All emails below have a suffix, though please do not write to individual course staff unless they have asked you to do so. Most questions related to the course should be posted on Edstem, though for sensitive matters you can contact the Head TAs and the professor at
Who Is The Impostor?
Bernardo Palazzi
bernardo@cs - Instructor - he/him
If you look hard enough around the spaceship, you might just find a clue...
Jefferson Bernard
jbernar3@cs - Head TA - he/him
Hello world. I'm Jefferson, a senior from Brooklyn studying Computer Science. I spend most of my time reading, learning how to cook (pasta from scratch), eating Chinatown, and going on really long walks for no reason. You can find me wandering around Providence aimlessly.
Victor Kalev
vkalev@cs - Head TA - he/him
I’m a senior from the Dallas area studying computer science. I like sewing, a solid 5 PM coffee, and obscure video games. I’m also on the club tennis team, but I haven’t been going to practices lately so you probably won’t find me at the Pizzitola.
Ben Givertz
bgivertz@cs - UTA - he/him
I’m a senior from Boston studying computer science. I love to hike, cook, and occasionally hop on the drum set!
Ben Silverman
bsilverm@cs - UTA - he/him
I'm a senior from Chicago studying computer science. Besides CS I love photography, filmmaking, baking, biking, and going to concerts and comedy shows!
Jake Nieto
jnieto@cs - UTA - he/him
Hello! I’m a senior from Long Island, New York studying computer science. My favorite things to do are cooking, collecting plants, and being outdoors! You can usually catch me working at the front desk of the John Hay Library, or eating at Den Den.
Kaki Su
jsu15@cs - UTA-STA - she/her
halo! I’m a junior from Japan studying CS. Unless I’m making music with my friends or riding horses with the brown equestrian team, I’m probably cuddled up in a fluffy blanket hanging out with (both real and stuffed animal) cats.
Ocean Pak
cpak4@cs - UTA - he/him
Heya! I'm Ocean, a junior from Hong Kong studying comp sci. You'll probably find me snacking, sleeping, vibing to cantopop or playing board and card games.
Raj Paul
rpaul5@cs - UTA - he/him
Hi, I’m a junior from St. Louis, Missouri studying English and Computer Science. I like cleaning my room and watching movies. I really love food, and some of my favorites are pomegranate, salmon, and a Bangladeshi dish called 'Biye Barir Roast'.
Selen Tumay
stumay@cs - UTA-STA - she/her
E-enthusiastic about coding
L-lives in florida
E-enjoys a smoky dirty chai (pictured)
N-never too busy to help!
Sierra Rowley
srowley2@cs - UTA - she/her
hi girlies!! I’m Sierra, a senior from RI studying cs! I spend most of my time walking my little dog, drinking coffee, sitting on the couch watching Gilmore Girls, and perusing Spotify. Occasionally I leave my house to admire nature.


Course Documents

All students are responsible for the contents of the following documents and registering for the following external services used in the course:

  • Syllabus and Collaboration Policy: All students are required to read the Syllabus and Collaboration Policy. By working on any assignment in this course, you agree to the contents of both documents.

  • Textbook: The textbook for the course is Introduction to Computer Security by Michael T. Goodrich and Roberto Tamassia, 1st Edition. The lecture schedule includes supplementary readings from the textbook, and you’ll find the textbook directly helpful on most assignments in this course.

  • Gradescope: We use Gradescope for collecting certain assignments and grade distribution. We add students to our Gradescope page manually based course registration—if you’re trying to hand in but aren’t able to access the page, please email the HTA list.

  • Edstem: Join our Edstem board to ask questions about course content (see the Collaboration Policy for question guidelines). The course staff will also post announcements and assignment clarifications to this board. All Edstem questions must be posted privately by default, though the course staff will make posts public when necessary.

  • Regrade Policy: Before submitting a regrade request, please read the Regrade Policy.


Extension Requests: If there are extenuating circumstances preventing you from completing an assignment on time (e.g., illness), you may use this form to request an extension (without using late days) before the assignment is due. (Dean’s Notes and SEAS Accomodations should not go through this form—any inquires of the sort should be sent directly to Bernardo.)

Anonymous Feedback: If you have feedback that you’d wish to share anonymously, you can use this form. Emails are tracked on this form, but these email addresses cannot be viewed by the course staff (including the professor) and are only viewable by Thomas Doeppner (Director of Undergraduate Studies).

Department Resources

Undergraduate Missive: The Computer Science department’s Undergraduate Missive contains lots of helpful information regarding asking for help from TAs, Sunlab Consultants, and more. (Some information is useful for graduate students as well.)

Diversity and Inclusion: In addition to the following resources, you can email the Student Advocates for Diversity & Inclusion at

Health and Wellness: In addition to the following resources, you can email the Student Advocates for Health & Wellness at

Student Groups: The department sponsors or is affiliated with several student groups:

  • CS for Social Change: Focuses on the intersection of computer science and social impact.
  • CS DUG (Department Undergraduate Group): Seeks to increase undergraduate participation in the department and continue the Brown legacy of involved undergraduates.
  • Mosaic+: Student-led diversity initiative to create an inclusive space for racially and ethnically underrepresented minority (URM) students.
  • oStem@Brown: Student group that aims to empower LGBTQ people studying or working in STEM fields to succeed personally, academically, and professionally.
  • WiCS (Women in Computer Science): Student group that aims to support and increase the participation of women in the field of Computer Science.
  • Full Stack @ Brown: A Brown University club committed to promoting the education of full stack software engineering by working on applications for the Brown community and beyond.

University Resources

Writing Center: The Writing Center offers free consultations for students who would like to improve the quality of their writing; this is relevant in CS166 since the written components of the course involve communicating complex technical ideas clearly, concisely, and precisely. Appointments can be scheduled on the Writing Center website or by emailing

CAPS (Counseling and Psychological Services): If you feel yourself falling behind, needing to talk to someone about personal problems, or, in general, want a supportive ear, you may find CAPS helpful—they provide a range of mental health services to the Brown community. The office can be reached at 401-863-3476 or

SAS (Student Accessibility Services): Brown University is committed to full inclusion of all students. Students who, by nature of a documented disability, require academic accommodations should contact the professor. The staff of the SAS office can be reached at 401-863-9588 or to discuss the process for requesting accomodations.

Ombudsperson Office: The Ombuds Office provides a safe, informal, and confidential service independent from the University administration for students involved in a University-related problem (academic or administrative), acting as a neutral complaint resolver and not as an advocate for any of the parties involved in a dispute. The Ombudsperson can provide information on policies and procedures affecting students, facilitate students’ contact with services able to assist in resolving the problem, and assist students navitgate conflicts concerning improper application of University policies or procedures. All matters referred to this office are held in strict confidence (with the exception of cases where there appears to be imminent threat of serious harm).

Student Support Services: Student Support Services assists students with a wide-range of issues and concerns that might arise during their time at Brown. The Student Support Services Deans provide 24-hour crisis services for undergraduate, graduate, and medical students with personal or family emergencies, and are available by appointment to consult with individual students about their personal questions/concerns, thus allowing students to succeed and thrive in their academic pursuits.

Administrator on Call: The Student Support Services office manages Brown’s Administrator On Call (AOC) system which provides a mechanism for Brown students to seek assistance in emergency situations after business hours. An AOC is able to respond to students, connect them with resources and referrals, consult with colleagues as needed, and gather information for additional follow-up during business hours. To reach the AOC, call 401-863-3322 and ask to speak to the Administrator-On-Call.


What’s the difference between 166 and {151, 165, 180, 239}?

Each of these courses cover relatively disjoint material, and you’ll learn completely different things in all of them. (If you haven’t taken any of them—great! CS166 is a great introduction to the field, and you’ll learn a lot through this course. If you have taken a subset of these courses—also great! A lot of CS166’s material will still be new to you, and all of these courses are useful in terms of honing your security mindset for the long-term.)

  • 151 focuses on cryptography from a theoretical and more formal perspective by building on the concepts learned in 101 and involves proving that cryptosystems are secure under defined, precise notions of security.
    • In comparison, 166 looks at a small slice of applied cryptography, and we generally assume the cryptographic tools that we’re using are “secure”. We instead focus on the practical applications of conventional cryptography as it applies to computer systems.
  • 165 is a deep-dive into software security, which focuses on low-level memory vulnerabilities (i.e. on the stack), and coursework primarily focuses on developing attacks.
    • In comparison, 166 looks at higher-level abstractions (cryptography, browser and web applications, networks, etc.) and principles of systems security. Our coursework also focuses on a mix of discovering attacks and designing defenses. (We don’t really look at software security / stack-based code execution vulnerabilities at all.)
  • 180 looks at cybersecurity from a more historical and policy-driven perspective.
    • In comparison, 166 motivates much of its content with historical examples (but is primarily about technical details).
  • 239 is about privacy engineering—making sure that the data is either not collected in the first place or, if collected, not misused.
    • In comparison, 166 focuses on the whole of the “CIA” mnemonic of “confidentiality”, “integrity”, and “availability”; some of the techniques used in privacy engineering overlap with 166 content, but our usage and analysis of those techniques differs.

Can I use this course as a ugrad capstone?

If you’re a 7th semester (or greater) undergraduate, then you can use CS166 as a capstone by completing the CS162 requirements—you’ll need to register for CS162, and you need to email the HTA list.

Can I use this course for 2000-level credit?

If you’re a graduate student, then you can use CS166 for 2000-level credit by completing the CS162 requirements.

  • If you’re a Masters student and want 2000-level credit, you should not register for CS162 (since it’ll cost you more tuition!). Instead, you should email the HTA list indicating that you intend to complete the CS162 requirements for 2000-level credit.

  • If you’re a PhD student and want 2000-level credit, then you should register for CS162. (No need to email the HTA list in this situation.)

Do I have to attend lectures synchronously?

Please read the Lecture Policy. If you are looking to request Simultaneous Enrollment Permission on ASK to register for another class in the same timeslot as CS166, please email the instructor—we will approve such requests, but please note that lecture attendance and class participation in CS166 can help your final grade in borderline cases.