
    

    <?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://ocw.cs.pub.ro/courses/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://ocw.cs.pub.ro/courses/feed.php">
        <title>CS Open CourseWare cns:labs</title>
        <description></description>
        <link>http://ocw.cs.pub.ro/courses/</link>
        <image rdf:resource="http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico" />
       <dc:date>2026-05-16T07:27:33+03:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-01?rev=1634044031&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-02?rev=1666023535&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-03?rev=1666627541&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-04?rev=1667229730&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-05?rev=1667825062&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-06?rev=1605517261&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-07?rev=1669033789&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-08?rev=1639481337&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-09?rev=1670240186&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-10?rev=1610377172&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-11?rev=1642514389&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-12-ctf-challenges-part-2?rev=1673280850&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-12?rev=1575811131&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/lab-13?rev=1575811142&amp;do=diff"/>
                <rdf:li rdf:resource="http://ocw.cs.pub.ro/courses/cns/labs/start?rev=1442928892&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico">
        <title>CS Open CourseWare</title>
        <link>http://ocw.cs.pub.ro/courses/</link>
        <url>http://ocw.cs.pub.ro/courses/lib/tpl/arctic/images/favicon.ico</url>
    </image>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-01?rev=1634044031&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-10-12T16:07:11+03:00</dc:date>
        <title>Lab 01 - Introduction. Basic Exploration Tools</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-01?rev=1634044031&amp;do=diff</link>
        <description>Introduction

You will spend a large part of the labs and assignments working with binaries; in some of the cases we will also provide you with source code. You will have to find vulnerabilities in those binaries, then (possibly) exploit them and (possibly) fix the vulnerabilities in order to illustrate various secure coding practices. To achieve this, first you need to get comfortable with at least some of the common tools that are right for the job.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-02?rev=1666023535&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-10-17T19:18:55+03:00</dc:date>
        <title>Lab 02 -  Program Analysis</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-02?rev=1666023535&amp;do=diff</link>
        <description>Overview/Motivation

Why do we need a file format for a binary file?

Operating systems introduce two fundamental abstractions: files and processes. Binary (executable) files can be viewed as a static abstraction of resources, while processes can be viewed as a dynamic representation of resources. The process of transforming the static entity (binary executable files) in a dynamic entity (process) is called loading. The loader, which is a piece of code that is part of the operating system, has t…</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-03?rev=1666627541&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-10-24T19:05:41+03:00</dc:date>
        <title>Lab 03 - The Stack. Buffer Management</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-03?rev=1666627541&amp;do=diff</link>
        <description>Intro

The stack is a dynamic memory region of a process used to organize the contexts of functions as they are being called during execution. The memory region is allocated when a process starts, and is managed by special machine code generated by the compiler handling operations such as: resizing when functions are called or return, storing arguments and local variables, storing metadata.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-04?rev=1667229730&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-10-31T17:22:10+03:00</dc:date>
        <title>Lab 04 - Exploiting. Shellcodes</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-04?rev=1667229730&amp;do=diff</link>
        <description>Intro

Whenever an attacker manages to overwrite the return address, their primary follow-up is to divert the execution flow to their advantage. One can gain a stable foothold inside the exploited system via spawning a shell from the vulnerable application.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-05?rev=1667825062&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-11-07T14:44:22+03:00</dc:date>
        <title>Lab 05 - Exploiting. Shellcodes (Part 2)</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-05?rev=1667825062&amp;do=diff</link>
        <description>Intro

Starting from where we left off last session, you will find that in real-life scenarios, vulnerabilities leave you very little room to play with, so you have to be creative with your exploits.




	*  Disable it for a newly spawned shell (and subsequent processes):

setarch i386 -R /bin/bash</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-06?rev=1605517261&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-11-16T11:01:01+03:00</dc:date>
        <title>Lab 06 - Exploit Protection Mechanisms</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-06?rev=1605517261&amp;do=diff</link>
        <description>Introduction: Protection Mechanisms

So far we've explored methods of abusing vulnerabilities in programs in order to gain control over them, using manual and/or automated techniques known as exploits. Ideally, programmers would carefully inspect code to remove all the possible vulnerabilities from their programs; in practice however even the most basic vulnerabilities (e.g. unchecked buffer bounds) can be easily found in the wild, which is how various hardware and software protection mechanisms…</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-07?rev=1669033789&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-11-21T14:29:49+03:00</dc:date>
        <title>Lab 07 - Strings</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-07?rev=1669033789&amp;do=diff</link>
        <description>Tasks repository

All content necessary for the CNS laboratory tasks can be found in the CNS public repository. 

Intro

This is a tutorial based lab. Throughout this lab you will learn about frequent errors that occur when handling strings. This tutorial is focused on the C language. Generally, OOP languages (like Java, C#, C++) are using classes to represent strings -- this simplifies the way strings are handled and decreases the frequency of programming errors.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-08?rev=1639481337&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-12-14T13:28:57+03:00</dc:date>
        <title>Lab 08 - Return-Oriented Programming</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-08?rev=1639481337&amp;do=diff</link>
        <description>Introduction

As we've seen in the previous labs, due to the code integrity protection mechanisms, we cannot store our exploit code in areas marked as non-executable (e.g. data segment or stack). In this case, we need more advanced attacks like reusing parts of the already executable code in order to bypass the integrity restrictions. For instance, if we want to obtain a shell, we can replace the return address (divert control to) with the address of the system function from libc using the &quot;/bin…</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-09?rev=1670240186&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-12-05T13:36:26+03:00</dc:date>
        <title>Lab 09 - Return-Oriented Programming (Part 2)</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-09?rev=1670240186&amp;do=diff</link>
        <description>Introduction

In this lab, we will resume from where we left off our last session.

In many real-life cases you will encounter, a vulnerability will consist of a small buffer overflow, which will not allow you to chain a list of gadgets of arbitrary length. However, there are techniques to circumvent this. Today, we will look at two of these techniques.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-10?rev=1610377172&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-11T16:59:32+03:00</dc:date>
        <title>Lab 10 - Use After Free</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-10?rev=1610377172&amp;do=diff</link>
        <description>Introduction

Use-after-free refers to a class of bugs in which the data from a memory region is
still used after the region is freed.
The most common causes of use-after-free bugs are:

	*  Wrongly handled error conditions
	*  Unaccounted for program states
	*  Confusion over which part of the program is responsible for freeing the memory</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-11?rev=1642514389&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-01-18T15:59:49+03:00</dc:date>
        <title>Lab 11 - CTF Challenges (part 1)</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-11?rev=1642514389&amp;do=diff</link>
        <description>Resources

	*  CyberEdu CNS CTF platform

Feedback

In order to improve the Computer Network Security course, your opinions and suggestions are important to us. The feedback is anonymous and the results will only become visible after the final exam. You will find the link to the feedback form on the main page of the curs.pub.ro instance for your master's program CNS class (either PDCS or SRIC). It's not in the meta-course for all students.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-12-ctf-challenges-part-2?rev=1673280850&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-01-09T18:14:10+03:00</dc:date>
        <title>Lab 12 - CTF Challenges (part 2)</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-12-ctf-challenges-part-2?rev=1673280850&amp;do=diff</link>
        <description>Feedback

In order to improve the Computer Network Security course, your opinions and suggestions are important to us. The feedback is anonymous and the results will only become visible after the final exam. You will find the link to the feedback form on the main page of the curs.pub.ro instance for your master's program CNS class (either PDCS or SRIC). It's not in the meta-course for all students.</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-12?rev=1575811131&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-12-08T15:18:51+03:00</dc:date>
        <title>Extra - Integers</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-12?rev=1575811131&amp;do=diff</link>
        <description>Resources

	*  Two's complement
	*  CERT C Coding Standard: 04. Integers (INT)
	*  Basic Integer Overflows
	*  Why Not Mix Signed and Unsigned Values in C/C++?
	*  Deep C: Integer Promotion
	*  Improving Integer Security for Systems with KINT
	*  x86 DIV instruction
	*  Floating point number representation</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/lab-13?rev=1575811142&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-12-08T15:19:02+03:00</dc:date>
        <title>Extra - Advanced Binary Analysis</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/lab-13?rev=1575811142&amp;do=diff</link>
        <description>Resources

	*  American Fuzzy Lop
	*  Fuzzing With AFL-Fuzz, a Practical Example ( AFL vs Binutils )
	*  Fuzzing with American Fuzzy Lop (AFL)
	*  Concolic execution with S2E
	*  angr documentation (GitHub link)
	*  angr overview
	*  angr -- claripy solver engine
	*  angr -- program states
	*  angr -- path groups
	*  angr -- working with data and conventions
	*  angr examples</description>
    </item>
    <item rdf:about="http://ocw.cs.pub.ro/courses/cns/labs/start?rev=1442928892&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-09-22T16:34:52+03:00</dc:date>
        <title>Labs</title>
        <link>http://ocw.cs.pub.ro/courses/cns/labs/start?rev=1442928892&amp;do=diff</link>
        <description>Labs for the Computer and Network Security class.
labs index</description>
    </item>
</rdf:RDF>
